Script for activating gates under circumstances

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

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

Realspace
Posts: 1637
Joined: Wed, 15. Nov 06, 10:21
x4

Script for activating gates under circumstances

Post by Realspace »

I'd like to add new sectors in my XRSGE mod that will be populated by the Borons. But I wish to make them opening only after the plot is completed, as for Kingdom End.
Can someone points me to the code I've to watch? I've seen in the dlc's md but could not see/understand the part about gates reactivating.
Thank you
User avatar
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13482
Joined: Sun, 15. Feb 04, 20:12
x4

Re: Script for activating gates under circumstances

Post by euclid »

To my best knowledge there is no (script) way to activate a gate (or highway). However, I had a quick look and am pretty sure that (during the cutscene) the inactive gate is destroyed and replaced by an active gate.

Cheers Euclid
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.”
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786
DeadAirRT
Posts: 1124
Joined: Fri, 25. Jan 19, 03:26
x4

Re: Script for activating gates under circumstances

Post by DeadAirRT »

set_object_active
User avatar
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13482
Joined: Sun, 15. Feb 04, 20:12
x4

Re: Script for activating gates under circumstances

Post by euclid »

DeadAirRT wrote: Mon, 24. Apr 23, 01:53 set_object_active
Cool, cheers :-)
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.”
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786
sprIder
Posts: 134
Joined: Sat, 3. Jul 10, 23:23
x4

Re: Script for activating gates under circumstances

Post by sprIder »

In addition: \extensions\ego_dlc_split\maps\xu_ep2_universe\dlc4_zones.xml line 407 and following:

Code: Select all

<macro name="Zone002_Cluster_411_Sector001_macro" class="zone">
    <component ref="standardzone" />
    <connections>
      <connection name="connection_ClusterGate411To425" ref="gates">
        <offset>
          <position x="-1822.0482177734" y="0" z="40999.6484375" />
          <quaternion qx="0" qy="-0.9762960076" qz="0" qw="-0.2164396197" />
        </offset>
        <macro ref="props_gates_orb_accelerator_02_macro" connection="space" >
          <properties>
            <state active="false" />
          </properties>
        </macro>
      </connection>
    </connections>
  </macro>
The counterpart / gate 425To411 at line 1225 f.

Code: Select all

            <state active="false" />
implicates, that this gate is inactive and needs to be activated. Via the code from DeadAir.
From \extensions\ego_dlc_split\md\story_split.xml (lines 66 f and 1306):

Code: Select all

<find_sector name="$HeartOfAcrimonySector" macro="macro.Cluster_411_Sector001_macro" required="true" comment="not the Boneyard"/>
..
<find_gate   name="$FuneralGate"      accelerator="true" space="$HeartOfAcrimonySector"/>
...
<set_object_active object="$FuneralGate" activate="true"/>
It seems to be somehow similar with the boron DlC. You can find inactive gates in \extensions\ego_dlc_boron\maps\xu_ep2_universe\dlc_boron_zones.xml

But it also seems that in the code of the Boron Plot the "research gate" is destroyed and replaced by a "normal" one, as euclid said, see \extensions\ego_dlc_boron\md\story_boron.xml line 2500 and following.
Realspace
Posts: 1637
Joined: Wed, 15. Nov 06, 10:21
x4

Re: Script for activating gates under circumstances

Post by Realspace »

Thank you all ! :)
DeadAirRT
Posts: 1124
Joined: Fri, 25. Jan 19, 03:26
x4

Re: Script for activating gates under circumstances

Post by DeadAirRT »

sprIder wrote: Mon, 24. Apr 23, 18:02 In addition: \extensions\ego_dlc_split\maps\xu_ep2_universe\dlc4_zones.xml line 407 and following:

Code: Select all

<macro name="Zone002_Cluster_411_Sector001_macro" class="zone">
    <component ref="standardzone" />
    <connections>
      <connection name="connection_ClusterGate411To425" ref="gates">
        <offset>
          <position x="-1822.0482177734" y="0" z="40999.6484375" />
          <quaternion qx="0" qy="-0.9762960076" qz="0" qw="-0.2164396197" />
        </offset>
        <macro ref="props_gates_orb_accelerator_02_macro" connection="space" >
          <properties>
            <state active="false" />
          </properties>
        </macro>
      </connection>
    </connections>
  </macro>
The counterpart / gate 425To411 at line 1225 f.

Code: Select all

            <state active="false" />
implicates, that this gate is inactive and needs to be activated. Via the code from DeadAir.
From \extensions\ego_dlc_split\md\story_split.xml (lines 66 f and 1306):

Code: Select all

<find_sector name="$HeartOfAcrimonySector" macro="macro.Cluster_411_Sector001_macro" required="true" comment="not the Boneyard"/>
..
<find_gate   name="$FuneralGate"      accelerator="true" space="$HeartOfAcrimonySector"/>
...
<set_object_active object="$FuneralGate" activate="true"/>
It seems to be somehow similar with the boron DlC. You can find inactive gates in \extensions\ego_dlc_boron\maps\xu_ep2_universe\dlc_boron_zones.xml

But it also seems that in the code of the Boron Plot the "research gate" is destroyed and replaced by a "normal" one, as euclid said, see \extensions\ego_dlc_boron\md\story_boron.xml line 2500 and following.
Oooh i did not know they created a gate in md. I wonder if they finally made a way for us to do gate connections on the fly or if it still requires hard coding prior
User avatar
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13482
Joined: Sun, 15. Feb 04, 20:12
x4

Re: Script for activating gates under circumstances

Post by euclid »

DeadAirRT wrote: Tue, 25. Apr 23, 14:37 ..... I wonder if they finally made a way for us to do gate connections on the fly or if it still requires hard coding prior
Unfortunately not :-(

Cheers Euclid
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.”
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786
DeadAirRT
Posts: 1124
Joined: Fri, 25. Jan 19, 03:26
x4

Re: Script for activating gates under circumstances

Post by DeadAirRT »

euclid wrote: Tue, 25. Apr 23, 18:13
DeadAirRT wrote: Tue, 25. Apr 23, 14:37 ..... I wonder if they finally made a way for us to do gate connections on the fly or if it still requires hard coding prior
Unfortunately not :-(

Cheers Euclid
RIP

Return to “X4: Foundations - Scripts and Modding”