[Dev] Request modding bugfixes/features

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

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

BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7465
Joined: Mon, 15. Dec 03, 18:53
x4

Re: [Dev] Request modding bugfixes/features

Post by BlackRain »

Take a look at encounters.xml

Code: Select all

<cue name="Khaak_S_Lone_New_Encounter_Check_Wait">
              <conditions>
                <event_cue_completed cue="Khaak_S_Lone_New_Encounter_Check"/>
              </conditions>
              <cues>
                <cue name="Khaak_S_Lone_New_Encounter_Warped">
                  <delay exact="1ms"/>
                  <actions>
                    <do_any>
                      <create_order object="$LeadShip" id="'Attack'">
                        <param name="primarytarget" value="player.ship"/>
                        <param name="pursuetargets" value="true"/>
                      </create_order>
                      <activate_job_ship_orders ship="$LeadShip"/>
                    </do_any>
                    <do_all exact="$WarpedSubordinates.count" counter="$i">
                      <activate_job_ship_orders ship="$WarpedSubordinates.{$i}"/>
                    </do_all>
                  </actions>
                </cue>
              </cues>
            </cue>
This has the <activate_job_ship_orders ship="$LeadShip"/> but that is just to make sure that once it is done attacking the player (like if the player goes away and doesn't destroy the ship) it will just go back to doing what jobs had it doing, but it seems like it is still a jobship. I could be reading the code wrong, but that is what it seems like to me?
DeadAirRT
Posts: 1124
Joined: Fri, 25. Jan 19, 03:26
x4

Re: [Dev] Request modding bugfixes/features

Post by DeadAirRT »

I always thought when faction logic commendered ships from a job, it ordered a new one right away and when the commendered ship was released, it searched for a suitable job to fill that didn't already have a ship ordered/filled.

My concern would be let's say i make the job have a quota of six, i change it's orders in md... Would it then order another ship and end up with more than six carriers for example.
BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7465
Joined: Mon, 15. Dec 03, 18:53
x4

Re: [Dev] Request modding bugfixes/features

Post by BlackRain »

DeadAirRT wrote: Tue, 3. Mar 20, 05:24 I always thought when faction logic commendered ships from a job, it ordered a new one right away and when the commendered ship was released, it searched for a suitable job to fill that didn't already have a ship ordered/filled.

My concern would be let's say i make the job have a quota of six, i change it's orders in md... Would it then order another ship and end up with more than six carriers for example.
This is different from factionlogic I think. The encounter system doesn’t seem to commandeer the ships as far as I can tell. They should also still be able to be commandeered by factionlogic though, unless you say false in jobs to that. You can compare the code from encounters and factionlogic. How they get the ships are different from what I can see. In my understanding, it just activates the script and allows you to have it do different orders without removing it from jobs.

Return to “X4: Foundations - Scripts and Modding”