Saving the crew

The place to discuss scripting and game modifications for X4: Foundations.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

Phezzan
Posts: 126
Joined: Mon, 12. Nov 07, 05:48
x4

Saving the crew

Post by Phezzan »

Good crew is one of the most precious resources. There's no way to build a factory for 5-star crew to fill your fleets.

Presently your crew will rarely escape the death of an L or XL ship (they don't flee the death explosion)
So I'm trying to implement something like this
Phezzan wrote: Mon, 9. Sep 24, 20:34
  • Player escape pods search for a 'safe' player station/ship.
  • Escape pods should flee enemies
  • Escape pods low on oxygen should alert the player - one alert per sector when 'low oxygen' escape pods fail to find a rescue target.
  • Player stations (and possibly large ships) should accept some 'unassigned' crew (ie: rescued crew) beyond their normal crew amounts.
Specifically pods must flee their ship's death rattle and pods fly to a 'safe' player ship.

I figured out how to find all the pods and give them all an order right after spawning them.

I need a way of searching for a 'safe' player ship for them to approach / dock, but I don't know the find_ships API well enough.

I want to find ships that have free space for crew while being relatively idle (orders like 'hold position', 'patrol' or 'rescue'), but I don't know how to translate that into match clauses. Normally I'd grep the game's /md and /aiscript directories... but I don't know the terms to search for.

Any help is appreciated.
Thx.

Return to “X4: Foundations - Scripts and Modding”