Adding Gates - my head is up in smoke

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

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

User avatar
MarcusInVR
Posts: 117
Joined: Fri, 15. Apr 22, 14:33

Adding Gates - my head is up in smoke

Post by MarcusInVR »

So I am playing around with the idea to add custom gates. I did find this super useful page: https://github.com/enenra/x4modding/wik ... ed---gates .

After some reading, I thought I had it down. So I tried to add a connection from Grand Exchange I to Grand Exchange III (useless in a normal game, I know - but just for test).

zones.xml:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<diff>
	<!-- GE I to GE III -->
	<add sel="//macros">
		<macro name="zones_rescale_Cluster_01_Sector001_macro" class="zone">
			<component ref="standardzone"/>
			<connections>
				<connection name="rescale_01_001_positive" ref="gates">
					<offset>
						<position x="239444" y="0" z="1100000"/>
					</offset>
					<macro ref="props_gates_anc_gate_macro" connection="space"/>
				</connection>
			</connections>
		</macro>
	</add>

	<!-- GE III to GE I -->
	<add sel="//macros">
		<macro name="zones_rescale_Cluster_01_Sector002_macro" class="zone">
			<component ref="standardzone"/>
			<connections>
				<connection name="rescale_01_002_negative" ref="gates">
					<offset>
						<position x="246625" y="0" z="1100000"/>
					</offset>
					<macro ref="props_gates_anc_gate_macro" connection="space"/>
				</connection>
			</connections>
		</macro>
	</add>
</diff>

galaxy.xml:

Code: Select all

<?xml version='1.0' encoding='utf-8'?>
<diff>
<!-- GE I x GE III -->
  <add sel="/macros/macro[@name='XU_EP2_universe_macro']/connections">
    <connection name="rescale_ge_1_3" ref="destination" path="../Cluster_01_connection/Cluster_01_Sector001_connection/zones_rescale_Cluster_01_Sector001_macro/rescale_01_001_positive">
      <macro connection="destination" path="../../../../../Cluster_01_connection/Cluster_01_Sector002_connection/zones_rescale_Cluster_01_Sector002_macro/rescale_01_002_negative"/>
    </connection>
  </add>
</diff>

If I pack this into a (or my) mod, the save loads, gets to like 35%... game turns black and jumps back to title screen (as of 6.0 HF 3).

Can anyone shed some light on this, or point me in the right direction? I believe to have done it right.
User avatar
MarcusInVR
Posts: 117
Joined: Fri, 15. Apr 22, 14:33

Re: Adding Gates - my head is up in smoke

Post by MarcusInVR »

No one? :(
DeadAirRT
Posts: 1124
Joined: Fri, 25. Jan 19, 03:26
x4

Re: Adding Gates - my head is up in smoke

Post by DeadAirRT »

Best bet is to run debug, it will tell you about syntax errors or any other issues.
User avatar
MarcusInVR
Posts: 117
Joined: Fri, 15. Apr 22, 14:33

Re: Adding Gates - my head is up in smoke

Post by MarcusInVR »

Learned to do it myself now. It's a bit complicated but it does work now.
Halpog
Posts: 540
Joined: Sat, 13. Feb 21, 14:09
x4

Re: Adding Gates - my head is up in smoke

Post by Halpog »

can u try to make this gate connections too plz ?
because nomatter what i try its not working.and iam realy dumpo in such things

viewtopic.php?f=181&t=454473

Return to “X4: Foundations - Scripts and Modding”