Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - ninekorn

Pages: [1] 2 3 ... 11
1
Help section / Re: array of object inside objective
« on: May 12, 2019, 03:32:44 pm »
nevermind... this solution wont work for multiplayer as other player`s drones will crunch the data in the arrays that were setup on the player before them... I will try to find another solution. By the way? is there a way to modify the data inside of an objective without having to recreate the objective?

I guess my only solution at this point might be to use the Global variables otherwise the new drone scripts won`t work in multiplayer.

2
Help section / Re: array of object inside objective
« on: May 10, 2019, 02:46:35 pm »
The AI of the npcs (the scripts that contains function Decision(args)) are Global. All Global variables are shared with all of my NPC Drones. This means I couldnt use global variables  to reset functions and any other settings in side the script without resetting ALL of my NPC drones at the same time.

I found a solution.

Since the variables are global for NPCs that share the same AI scripts (and this Global feature is is kinda cool), and since I have a maximum of 5 drones at the same time, i just initialize an array containing 5 length... The arrays are accessible by the formation position that is assigned to the Global variable linked to the NPC ID at their creation. I am then able to get the EXACT variable linked to the drone from the arrays that were initialized once.

Code: [Select]
    if (initStartingStuff == 1)
    {
        player_id = npc.GetTag(SHIP_ID, "ownerPlayerShipId");

        for (var i = 0; i < 5; i++) {
            lastDistanceToWaypoint.push(0);
            lastDistanceToWaypointAdjacentFB.push(0);
            lastDistanceToWaypointOppositeRL.push(0);


            lastSpeedNPC.push(0);
            lastSpeedPlayer.push(0);

            frontPushCounter.push(0);
            backPushCounter.push(0);
            leftPushCounter.push(0);
            rightPushCounter.push(0);

            lastFrontPushCounter.push(0);
            lastBackPushCounter.push(0);
            lastLeftPushCounter.push(0);
            lastRightPushCounter.push(0);

            lastSomeOtherRLDOT.push(0);
            lastSomeOtherFBDOT.push(0);
            lastSomeOtherRLDOTTWO.push(0);

            pushLEFT.push(0);
            pushRIGHT.push(0);
            pushBACK.push(0);
            pushFRONT.push(0);

            formationSwitches.push(1);
            mainSwitches.push(0);

            selectedTarget.push(-1);
            lockSwitches.push(0);
            lockBattlePositionSwitches.push({ x: null, y: null });
            lockBattlePositionSpeedValueSwitch.push(7);
            lockLastBattleDOTDirectionValueSwitch.push(0);

        }
        initStartingStuff = 0;
    }


In order to reproduce this Global "issue" in the AI script, it's super easy... You create an AI script that is used by a couple NPCs, you add +1 to the variable at each frames... And then you debug in the console the variable... You will notice that ALL AI's have the exact SAME value and they are just making the value get bigger, faster, even IF the AI's were initialized at a different time, they still have the same counting value as the other NPC AI's...

For instance, let's say the NPC1 was spawned and it's value is Now at 1000...You spawn a second NPC, named NPC2 that is created 1 minute later so "normally" it would be supposed to have the counting value at 0 because it was just initialized, but the counting value is actually 1000 instead of 0... and after that, you have TWO drones that are increasing the value +1 each frames so the value increases twice as fast.




Maybe it was meant to be this way in Void Expanse, maybe it doesn't, but personally, I like it.

nine

3
Help section / array of object inside objective
« on: May 09, 2019, 09:48:14 pm »
Hi,

I need some help trying to put an array of objects inside of an objective? Is it possible and if it is, how do I do it?

On the official wiki page it shows this: "npc.AddObjective(25334, "go_to_jumpgate", {jumpgate_id: 15});"

But if I put and array of objects instead inside the "object parameter", it gives me the error below?




Does anyone have any ideas?

nine

4
Another boring night on TWITCH.TV. I finally found pretty much all of the lines of code I need to script a better AI but man, it is soooo confusing to have to control the rotLeft/rotRight/GoForward/GoBackward/strafeLeft/StrafeRight of the NPC... I'm having a hard time focusing here ;)

5
Currently Streaming but it's gonna be a boring 3 hours of recoding the AI for the combat drones or any follower drones for that matter. Feel free to watch if you're interested. You might have a chance to see the full interior station MOD in action, building turrets from the station Terminal INSIDE of the station or accessing the Ship OnBoard computer to spawn combat/mining/repair drones or even accessing the galaxy Market from within the player ship. It's pretty cool but things need to be polished on the AI for the drones as I am tired of seeing some jerky movements and whatever when I see the drones in Combat crashing into each other and crashing on me.

Feel free to log in Twitch.TV to have a quick look, just feel free to ask me and I will show you INGame the things mentioned above. Otherwise Im gonna be working on the drone AI.

EDIT: Beware - you will be bored to death as I have not been coding the AI for weeks litterally... So I've got to dive back in and re-learn my dusty scripts.

EDIT: Wow... what a wasted night on Twitch because of me... 3 hours wasted trying to dive back in my old scripts to build a better AI for my mods. I know i can do it. I just need to remember and re-understand whatever I coded way back when. Sorry for wasting your time. I might stream tomorrow too.

EDIT: finally found what i was looking for. Those are lines of codes that I DO understand or remember what theyre actually outputting ... I'm gonna work on them tonight with the new drone movement AI that I want to build as I am unsatisfied with the current one.


Code: [Select]
         
     
    //NPC SHIP ROTATION AND DIRECTION
    var angler = ship.GetRotation(SHIP_ID);
    var radToDegrer = angler * (180.0 / Math.PI);
    var npcPointX00 = (1 * Math.cos(radToDegrer * Math.PI / 180)) + currentNpcCoord.x;
    var npcPointY00 = (1 * Math.sin(radToDegrer * Math.PI / 180)) + currentNpcCoord.y;
    var dirX00 = npcPointX00 - currentNpcCoord.x;
    var dirY00 = npcPointY00 - currentNpcCoord.y;
    var forwardNPC = { x: dirX00, y: dirY00 };
    var rightNPC = { x: dirY00, y: -dirX00 };
    //--------------------------------

    //PLAYER SHIP ROTATION AND DIRECTION
    var currentCoordsPlayer = ship.GetCoordinates(player_id);
    var anglerOfPlayer = ship.GetRotation(player_id);
    var radToDegrerOfPlayer = anglerOfPlayer * (180.0 / Math.PI);
    var pointXOfPlayer = (1 * Math.cos(radToDegrerOfPlayer * Math.PI / 180)) + currentCoordsPlayer.x;
    var pointYOfPlayer = (1 * Math.sin(radToDegrerOfPlayer * Math.PI / 180)) + currentCoordsPlayer.y;
    var dirXOfPlayer = pointXOfPlayer - currentCoordsPlayer.x;
    var dirYOfPlayer = pointYOfPlayer - currentCoordsPlayer.y;
    var forwardOfPlayer = { x: dirXOfPlayer, y: dirYOfPlayer };
    var rightOfPlayer = { x: dirYOfPlayer, y: -dirXOfPlayer };
    //--------------------------------

    if (npc.CountObjectives(nextCommandToDispatch.id) > 0)
    {
        var currentObjective = npc.GetCurrentObjective(nextCommandToDispatch.id);

        if (currentObjective.id == nextCommandToDispatch.id)
        {
            var currentFormationWaypoint = goToFormationWaypoint(nextCommandToDispatch);

            var distToWaypoint = Math.sqrt(((currentFormationWaypoint.x - currentNpcCoord.x) * (currentFormationWaypoint.x - currentNpcCoord.x)) + ((currentFormationWaypoint.y - currentNpcCoord.y) * (currentFormationWaypoint.y - currentNpcCoord.y)));
            var distToPlayer = Math.sqrt(((currentFormationWaypoint.x - currentCoordsPlayer.x) * (currentFormationWaypoint.x - currentCoordsPlayer.x)) + ((currentFormationWaypoint.y - currentCoordsPlayer.y) * (currentFormationWaypoint.y - currentCoordsPlayer.y)));
            var distPlayerToDrone = Math.sqrt(((currentNpcCoord.x - currentCoordsPlayer.x) * (currentNpcCoord.x - currentCoordsPlayer.x)) + ((currentNpcCoord.y - currentCoordsPlayer.y) * (currentNpcCoord.y - currentCoordsPlayer.y)));

            var dirToWaypointX = (currentFormationWaypoint.x - currentNpcCoord.x) / distToWaypoint;
            var dirToWaypointY = (currentFormationWaypoint.y - currentNpcCoord.y) / distToWaypoint;
            var dirToWaypoint = { x: dirToWaypointX, y: dirToWaypointY };

            var dirPlayerToWaypointX = (currentFormationWaypoint.x - currentCoordsPlayer.x) / distToPlayer;
            var dirPlayerToWaypointY = (currentFormationWaypoint.y - currentCoordsPlayer.y) / distToPlayer;
            var dirPlayerToWaypoint = { x: dirPlayerToWaypointX, y: dirPlayerToWaypointY };

            var dirPlayerToDroneX = (currentNpcCoord.x - currentCoordsPlayer.x) / distPlayerToDrone;
            var dirPlayerToDroneY = (currentNpcCoord.y - currentCoordsPlayer.y) / distPlayerToDrone;
            var dirPlayerToDrone = { x: dirPlayerToDroneX, y: dirPlayerToDroneY };

            var alignedDirectionForwardDOT = Dot(forwardNPC.x, forwardNPC.y, dirToWaypointX, dirToWaypointY);
            var alignedDirectionLRDOT = Dot(rightNPC.x, rightNPC.y, dirToWaypointX, dirToWaypointY);

            var pointInFrontOfWaypointX = currentFormationWaypoint.x + forwardOfPlayer.x;
            var pointInFrontOfWaypointY = currentFormationWaypoint.y + forwardOfPlayer.y;

            var pointInFrontOfWaypoint = { x: pointInFrontOfWaypointX, y: pointInFrontOfWaypointY};

            var isFrontOrBack = NSEWDIST(currentCoordsPlayer, currentFormationWaypoint, currentNpcCoord);
            var isLeftOrRight = NSEWDIST(currentFormationWaypoint, pointInFrontOfWaypoint, currentNpcCoord);

         }
   }

I will save and put on Youtube the streams that are not junk... yesterday was junk so no youtube lol.

6
Mods / Re: Drone/Follower mod // in-progress
« on: May 04, 2019, 12:55:23 am »
Things have evolved in an all out branching of my MODS... release of the Station Interior MOD is delayed as it will not just be the station interior mod anymore.

Here is my current map of development.

URGENT
1. create a new AI. The Station Siege Pirates// group of AI's. - spawn based on tech level of station or player level if i can get the player level somewhere. Spawning waves of enemies from time to time to attack the bases. Different types of enemies based on the level of the player or tech level. Notes: the headhunter chases the player. I would prefer the pirates to have a chance to hunt the player or go attack the bases. Also, waves of enemies that use my "formation system".
2.Choosing different types of Turrets like laser turrets and ballistic turrets at the player's choice for each station when they create station turrets.
3. making some lights or drawing "DOCKING" on the floor of the station where the players can dock.
4. REPAIRING TURRETS with the Station Terminal
5.making players PAY for turrets repair and turret building
6. INSTEAD OF WRITTING LOC 0/LOC 1/LOC 2/LOC 3 when creating a turret, i'll instead write the correct position with the current angle that the station is at. // GOTTA put the LOC in a clockwise or counterClockwise fashion also.
7. create a destroyed hull on death for each ships. to add also destroyed parts later. Which means, creating models of destroyed ships for all ships in the game...
8. salvaging.
9. Destructible stations.
10. buildable stations.

VERY URGENT
1.Also fix the spawning of the jumpgates/ergrekterminal/jumpgateTurrets/miners to be further away from the stations when spawning. (ABSOLUTELY VERY IMPORTANT). This might be one of the reasons the game is having colliders issues since sometimes they spawn right inside of the colliders and it creates some unexpected behavior... Might be the reason it crashes sometimes OUT of the blue in other systems.
2.fix the damage increase of collision and fuel consumption that happens the more you play... It's some kind of a bug. The more you play, the more damage you get from collisions and the more your ship consumes fuel... (ABSOLUTELY VERY IMPORTANT)

THE LESS URGENT
1. UPGRADING TURRETS
2. Stations with different turret behavior (attack any player/enemy on sight or enemy yes but player no etc.)
3. option to go back in the menu of building turrets.
4. REMOVE the SendGalaxyUpdate to RE-BLOCK THE JUMPGATES
5.Gotta COMPLETELY restart the unwalkable tiles. But NOT now. I will release the basic Station Interior MOD without the unwalkable tiles. I will ONLY put unwalkable tiles INSIDE of the station. It makes more sense and it will use much LESS memory (with arrays)
6. fixing the stations "geometric edge" looks of division walls. They look a bit too squared... (MAYBE)

THE SURPRISE
1. incorporate the rest. aka: surprise.

SOME OF WHAT I HAVE DONE TODAY AND YESTERDAY
1. replace all the market ships of the GALAXY MARKET with invisible ships instead to decrease the NPC ship Objects "overhead" (if any overhead) at the base. DONE
2. Building turrets from the station terminal from each station . DONE
3. Constructing the station terminal in order to create new turrets. (instead of calling it Maintenance terminal.) DONE
4. reincorporating the market Terminal DONE
5. COLLIDERS OF THE REFUEL/REPAIR Platforms to align correctly. DONE
6.Preparing the xml Files for the rotated stations. DONE
7.Preparing the xml Files for the rotated repair/refuel platforms.    DONE
8. DOCKING POINTS for the stations - priority. - DONE
9. Setting up the arrayOfStations in systemspreset.js and spawning the rotated stations DONE
10. Setting up the arrayOfRepair/Refuel platforms in systemPresets.js and spawning the rotated platforms for each station.  DONE
11. Spawning Turrets at the correct location based on the angle of the stations. DONE
13. gotta rename all stations XML to also incorporate the ANGLE of itself in their XML names. This will make the angle accessible in the scripts. This will make it possible to spawn turrets at the EXACT location that they need to be. im gonna make it with a 45 degree angle each station so 8 angles per stations. gotta do the same with the refuel and repair platform. DONE




And yes... I can code all of it. It is just a matter of time now...
nine



EDIT: The list of priorities have been changed to this instead. Once the list of VERY URGENT is done, I will release the basic Version of my mod to the community. Not more than 1-2 weeks to release this whole package. I will keep the community up to date on the development of my mod.

VERY URGENT
1.fix the damage increase of collision and fuel consumption that happens the more you play... It's some kind of a bug. The more you play, the more damage you get from collisions and the more your ship consumes fuel... (ABSOLUTELY VERY IMPORTANT)
2. Fix the spawning of the jumpgates/ergrekterminal/jumpgateTurrets/miners to be further away from the stations when spawning. (ABSOLUTELY VERY IMPORTANT). This might be one of the reasons the game is having colliders issues since sometimes they spawn right inside of the colliders and it creates some unexpected behavior... Might be the reason it crashes sometimes OUT of the blue in other systems.
3. create a new AI. The Station Siege Pirates// group of AI's. - spawn based on tech level of station or player level if i can get the player level somewhere. Spawning waves of enemies from time to time to attack the bases. Different types of enemies based on the level of the player or tech level. Notes: the headhunter chases the player. I would prefer the pirates to have a chance to hunt the player or go attack the bases. Also, waves of enemies that use my "formation system".
4. Reincorporate the onboard ship computer  DONE
5. ReIncorporate the Drones MOD for using drones OUTSIDE of the base. that was the surprise  DONE
6. create 4 types of combat drones / ballistic/laser beam / laser pulse/Rocket  instead of just the laser beam type.
7. create 4 types of base turrets / ballistic/laser beam /laser pulse/Rocket to be built at each stations  instead of just the Rocket type and ADD an option in the station Terminal so that players will be able to choose before building them.
8. Release of basic station interior MOD INCLUDING the Galaxy Market Terminal and buying of Turrets and the drones MOD basic version.

URGENT
1. making some lights or drawing "DOCKING" on the floor of the station where the players can dock.
2. REPAIRING TURRETS with the Station Terminal
3.making players PAY for turrets repair and turret building
4. INSTEAD OF WRITTING LOC 0/LOC 1/LOC 2/LOC 3 when creating a turret, i'll instead write the correct position with the current angle that the station is at. // GOTTA put the LOC in a clockwise or counterClockwise fashion also.
5. create a destroyed hull on death for each ships. to add also destroyed parts later. Which means, creating models of destroyed ships for all ships in the game... Fun stuff but long. Gotta learn HOW to use the knife tool in Blender to cut parts of the mesh to bend it and make as if the metal got ripped or even make big cannon holes in the "metal hull" for destroyed ships.
6. salvaging.
7. Destructible stations.
8. buildable stations.

THE LESS URGENT
1. UPGRADING TURRETS
2. Stations with different turret behavior (attack any player/enemy on sight or enemy yes but player no etc.)
3. option to go back in the menu of building turrets.
4. REMOVE the SendGalaxyUpdate to RE-BLOCK THE JUMPGATES
5. Incorporating a logic that the enemies to spawn at a lower rate at some point when control of the system has succeeded. So that the player advances to the next system to finally get to the aliens systems.
6.Gotta COMPLETELY restart the unwalkable tiles. But NOT now. I will release the basic Station Interior MOD without the unwalkable tiles. I will ONLY put unwalkable tiles INSIDE of the station. It makes more sense and it will use much LESS memory (with arrays)
7. fixing the stations "geometric edge" looks of division walls. They look a bit too squared... (MAYBE)

DONE
5. replace all the market ships of the GALAXY MARKET with invisible ships instead to decrease the NPC ship Objects "overhead" (if any overhead) at the base.  DONE
1. FINISHING BUILDING TURRETS WITH THE TERMINAL FOR ALL STATIONS. DONE
2. Constructing the station terminal in order to repair turrets or buy new turrets. (instead of calling it Maintenance terminal.)  DONE
6. reincorporating the market Terminal  DONE
1. COLLIDERS OF THE REFUEL/REPAIR Platforms to align correctly.  DONE
1.Preparing the xml Files for the rotated stations.  DONE
2.Preparing the xml Files for the rotated repair/refuel platforms.    DONE
3. DOCKING POINTS for the stations - priority. -  DONE
4. Setting up the arrayOfStations in systemspreset.js and spawning the rotated stations DONE
5. Setting up the arrayOfRepair/Refuel platforms in systemPresets.js and spawning the rotated platforms for each station.   DONE
6. Spawning Turrets at the correct location based on the angle of the stations.  DONE
7.REDUCE the Rotated stations and limit them to NOT see the mining station from behind or any stations at 90 degrees.  WONT DO THIS AS IT SEEMS FINE
DONE
8. gotta rename all stations XML to also incorporate the ANGLE of itself in their XML names. This will make the angle accessible in the scripts. This will make it possible to spawn turrets at the EXACT location that they need to be. im gonna make it with a 45 degree angle each station so 8 angles per stations. gotta do the same with the refuel and repair platform.  DONE























7
Bug reports / Colliders Server Thread Aborted crash?
« on: May 03, 2019, 05:02:16 pm »
Hi,

Here is the image of the current bug I am facing. Is it due to too many colliders on the same object?


8
Oh and I might need help on correctly UV mapping dif_1021 and norm_1024 and spec_1024 and Ilum_1024. I don't even know what they mean or how they are created. Im gonna work on that tonight. I need the models to look sharp for tomorrow.

What I mean is are they able to be done in Blender and how... like pointing me to a good tutorial.

EDIT: Nevermind ;) found some good stuff on Youtube.

9
Hi,

I am trying to correctly UVmap the Station Interior in Blender. The problem is that Void Expanse at it's highest graphics is awesome but NOT my UV mapping as blender is doing things wrong. This is still a question that is for Void Expanse importing .obj models.

I am doing the SEAMS of the objects separately and THEN using SmartUVMapping and THEN use CTRL-J to join/fusion all objects... At that point, I press Tab to go in EDIT mode and the UV mapping is all wrong. Alternative is if I use UNWRAP in Edit Mode on the fusioned Model, the UV mappings are on TOP of each other which doesnt work either.

I gotta work on this tonight in order to release the station Interior MOD tomorrow. If anyone has ANY ideas of another free program or how to perfectly do UV mapping in Blender with COMPLEX objects of 9000 vertex++, please help.

thank you,
nine


EDIT: Nevermind... I might have found the solution. It seems that I hadn't correctly done the seams on the Mining station. I did also activate the "Magic UV" pluggin... Dunno if that helped.

10
Help section / Re: static NPC?
« on: May 02, 2019, 03:41:38 pm »
Wow... why didn't I think of that??? This is a game changed for the station mod in many ways. thank you ai_enabled for pointing me in the right direction.

11
Help section / Re: player spawning question?
« on: May 01, 2019, 08:24:16 pm »
That fixed the problem of the initial spawn point! Thank you ai_enabled

12
Help section / static NPC?
« on: May 01, 2019, 04:58:11 pm »
Hi ai_enabled or/and Lurler,

Again, the basic interior station MOD V1.0 is almost completed. But I wanted to know if there is something that i can do to have a static NPC. Meaning - a NPC that doesn't move.

I have thought of a couple of things:

  • making a NPC Stick to point
  • to make its WEIGHT super HEAVY.
  • to make the collider WEIGHT super HEAVY.
  • to make its speed 0 and acceleration 0 inside of the calculateShip.js script
  • to use opposite direction force with addtorque/addforce
  • All of the above combined


The reason is I want the interior station MOD V1.1 to incorporate destructible stations. I can put a NPC that has an empty hull but individually attach the Stations colliders to it to make it stay EXACTLY where the station is and BAM if the npc is destroyed by hitting its colliders that are positioned EXACTLY where the station walls are, the station is also destroyed... That is how i have thought of making them destructible.

Any ideas of a better way or static NPC function?

Oh and i have got no clue if 30++ colliders on an NPC will affect the game performance. It might hit it hard.

nine

13
Mods / Re: Drone/Follower mod // in-progress
« on: May 01, 2019, 12:08:16 am »
15 minutes Video. Showing off the station Colliders. Forgot about the science station though and showed the business station twice... Enjoy Watching if you have 15 minutes to spare.

https://drive.google.com/open?id=1XCEtVfU5WlkLFUb0mt_ahYIcarLV9ifL


YOUTUBE LINK ===>>> https://www.youtube.com/watch?v=fX08o3ra9ro&feature=youtu.be

14
Help section / player spawning question?
« on: April 30, 2019, 10:20:16 pm »
Hi, The station MOD is almost ready for release. The basics and most important are done: interior station models, colliders, unwalkable tiles...

Now I need to setup the spawn points for players to be more distanced to the starting station but cannot seem to find the setting where to modify it.

I would need help on that. I think i know how to spawn turrets already and specify which position i need them.
nine

15
Help section / Re: cleaning up of my posts on the forums?
« on: April 30, 2019, 10:17:33 pm »
ok ill find the posts that i need moving and ask for them to be moved after if thats okay.
nine

Pages: [1] 2 3 ... 11