(Crazy) Hack / Plugin Request - NPC system travel
-
Since all manner of crazy hacks have been accomplished, I figured I’d take the liberty and make a really crazy request - somehow enable NPC travel between systems. Normally, NPCs use gates and all that, they just don’t appear on the other side. M0tah tried an FLHook method of simply catching and not destroying the NPC when it uses the gate, but that causes a server crash.
Any thoughts? Or is this just too crazy?
-
How about letting them be destroyed at jumping process as before but to create a duplicate of them once the player spawned in the other system?
-
I’m almost positive that if there’s a patrol path to the next system, an npc will appear if it’s following it. For normal encounters i agree, they don’t show up on the other side.
One interesting fact i found ages ago, you can have a small trading encounter near a planet, and if you follow any trade ships, they will automatically fly to the nearest jumphole or jumpgate, no matter how far it is away. Could be 100k, they will still happily fly towards it.
-
guess it is not possible without massive engine changes which would cause to an overload of the server anyway. npc’s are being spawn always and only where players are (or in a certain distance) while the universe is actually empty of them. so, npc’s are spawn once you enter a system’s populated zone and a proper way to transfer npc’s to other systems together with you is actually not possible. they don’t know where they jump, they just leave the area, that’s what they want to do.
-
Agreed, the best solution would probably be to have FLHook spawn an NPC of the same faction, archetype and loadout on the other side of the hole.
That said, somewhere in an NPC’s info there should be a jumper flag. If you use mission scripting to set the jumper flag on a mission-spawned NPC, that NPC will jump with you when you leave the system (but only when you switch systems, and I don’t think it matters if the NPC itself used the gate or not - if another player is watching this happen, the mission-spawned NPCs simply disappear from the previous system and jump into the new system via the gate the player used). Thus, perhaps it’d be possible to set the jumper flag to true for all NPCs within a certain distance to a player?