[Question] about rebuild="true"

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

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

nephilim
Posts: 31
Joined: Wed, 6. Nov 02, 20:31
x4

[Question] about rebuild="true"

Post by nephilim »

Does this actually do anything? And if yes then how is it used?

I would really like to make jobs (fleets) that rebuild their lost subordinates.

Code: Select all

<modifiers subordinate="true" rebuild="true"/>

<subordinate job="..." rebuild="true"/>
Mysterial
Posts: 665
Joined: Wed, 6. Nov 02, 20:31
x4

Re: [Question] about rebuild="true"

Post by Mysterial »

There's an order/interrupt to restock that includes requesting rebuild of subordinates with that flag. Not sure all the cases where it might be triggered - I know it runs if a ship with only launchers as primaries runs out of missiles but there are probably other cases.
BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7465
Joined: Mon, 15. Dec 03, 18:53
x4

Re: [Question] about rebuild="true"

Post by BlackRain »

Lead ships already rebuild their subordinates designated in jobs. What you are asking is just simply code so they can set rebuild false for some of the trade ships which spawn at new game but they dont want to ever be rebuilt. All ships in jobs are rebuilt by default unless otherwise specified
nephilim
Posts: 31
Joined: Wed, 6. Nov 02, 20:31
x4

Re: [Question] about rebuild="true"

Post by nephilim »

BlackRain wrote: Tue, 1. Jan 19, 05:03 Lead ships already rebuild their subordinates designated in jobs. What you are asking is just simply code so they can set rebuild false for some of the trade ships which spawn at new game but they dont want to ever be rebuilt. All ships in jobs are rebuilt by default unless otherwise specified
Have you ever verified in a test that they actually do rebuild their subordinates? I have seen them sending damages ships to repair but never rebuild their subordinates. I just saw the fleet slowly loosing its escort fighters and never saw the amount of escorts even increase once. I had it running a while with multiple battles. The wharfs had no shortages too.

Guess i just have to test it again in a more controlled enviroment where i remove subordinates myself and wait for them rebuild.
BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7465
Joined: Mon, 15. Dec 03, 18:53
x4

Re: [Question] about rebuild="true"

Post by BlackRain »

nephilim wrote: Tue, 1. Jan 19, 13:21
BlackRain wrote: Tue, 1. Jan 19, 05:03 Lead ships already rebuild their subordinates designated in jobs. What you are asking is just simply code so they can set rebuild false for some of the trade ships which spawn at new game but they dont want to ever be rebuilt. All ships in jobs are rebuilt by default unless otherwise specified
Have you ever verified in a test that they actually do rebuild their subordinates? I have seen them sending damages ships to repair but never rebuild their subordinates. I just saw the fleet slowly loosing its escort fighters and never saw the amount of escorts even increase once. I had it running a while with multiple battles. The wharfs had no shortages too.

Guess i just have to test it again in a more controlled enviroment where i remove subordinates myself and wait for them rebuild.
It does happen but it depends on whether they can or not when they get the command resupply.
BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7465
Joined: Mon, 15. Dec 03, 18:53
x4

Re: [Question] about rebuild="true"

Post by BlackRain »

I think the issue is, and why you may not realize it is going on, is that when a leader ship (from jobs) orders its subordinates, they don't immediately group up into a squad. This is how the vanilla script functions right now and I imagine it is not complete yet. The subordinates are ordered and then seem to fly off on their own somewhere (maybe the expected patrol destination of the lead ship). They only seem to group up after completing a patrol or something (assuming they don't die).

Return to “X4: Foundations - Scripts and Modding”