Changing values in the game

The place to discuss scripting and game modifications for X Rebirth.

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

Post Reply
ArgonExplorer3579
Posts: 12
Joined: Sun, 31. May 20, 22:56
x4

Changing values in the game

Post by ArgonExplorer3579 » Tue, 30. Jun 20, 15:06

I have been studying how you mod X Rebirth. However, the syntax to replace an existing item is a little confusing to me especially the replace sel. I want to change the hull , weapon and shields for the Foltor Sentinel to something different.

<diff>
<replace sel >
<hull max="75000"
<connection ref="connection_shieldgen01">
<macro ref="shieldgenerator_ship_s_10_macro" connection="Connection01" />
</connection>
<connection ref="connection_weapon_prim01">
<macro ref="weapon_invisible_impulse_mk3_macro" connection="connection_component01" />
</connection>
<connection ref="connection_weapon_prim02">
<macro ref="weapon_invisible_impulse_mk3_macro" connection="connection_component01" />
</connection>
<connection ref="connection_weapon_prim03">
<macro ref="weapon_invisible_impulse_mk3_macro" connection="connection_component01" />
</connection>
<connection ref="connection_weapon_prim04">
<macro ref="weapon_invisible_impulse_mk3_macro" connection="connection_component01" />
</connection>
<connection ref="connection_weapon_prim05">
<macro ref="weapon_invisible_impulse_mk3_macro" connection="connection_component01" />
</connection>
<connection ref="connection_weapon_prim06">
<macro ref="weapon_invisible_impulse_mk3_macro" connection="connection_component01" />
</connection>
<connection ref="connection_weapon_prim07">
<macro ref="weapon_invisible_impulse_mk3_macro" connection="connection_component01" />
</connection>
<connection ref="connection_weapon_prim08">
<macro ref="weapon_invisible_impulse_mk3_macro" connection="connection_component01" />
</connection>
</connections>
</replace>


</diff>
Any help will be gladly appreciated

User avatar
KrYcHokE
Posts: 259
Joined: Wed, 2. Dec 15, 13:15
x4

Re: Changing values in the game

Post by KrYcHokE » Wed, 1. Jul 20, 17:57

Should be like this:

Code: Select all

<diff>
  <replace sel="/macros/macro/properties/hull">
        <hull max="75000" />
  </replace>
  <replace sel="/macros/macro/connections/connection[@ref='connection_shieldgen01']/macro">
        <macro ref="shieldgenerator_ship_s_10_macro" connection="Connection01" />
  </replace>
  <replace sel="/macros/macro/connections/connection[@ref='connection_weapon_prim01']/macro">
	 <macro ref="weapon_invisible_impulse_mk3_macro" connection="connection_component01" />
  </replace>
  <replace sel="/macros/macro/connections/connection[@ref='connection_weapon_prim02']/macro">
	 <macro ref="weapon_invisible_impulse_mk3_macro" connection="connection_component01" />
  </replace>
  <replace sel="/macros/macro/connections/connection[@ref='connection_weapon_prim03']/macro">
	 <macro ref="weapon_invisible_impulse_mk3_macro" connection="connection_component01" />
  </replace>
  <replace sel="/macros/macro/connections/connection[@ref='connection_weapon_prim04']/macro">
	 <macro ref="weapon_invisible_impulse_mk3_macro" connection="connection_component01" />
  </replace>
  <replace sel="/macros/macro/connections/connection[@ref='connection_weapon_prim05']/macro">
	 <macro ref="weapon_invisible_impulse_mk3_macro" connection="connection_component01" />
  </replace>
  <replace sel="/macros/macro/connections/connection[@ref='connection_weapon_prim06']/macro">
	 <macro ref="weapon_invisible_impulse_mk3_macro" connection="connection_component01" />
  </replace>
  <replace sel="/macros/macro/connections/connection[@ref='connection_weapon_prim07']/macro">
	 <macro ref="weapon_invisible_impulse_mk3_macro" connection="connection_component01" />
  </replace>
  <replace sel="/macros/macro/connections/connection[@ref='connection_weapon_prim08']/macro">
	 <macro ref="weapon_invisible_impulse_mk3_macro" connection="connection_component01" />
  </replace>
</diff>

ArgonExplorer3579
Posts: 12
Joined: Sun, 31. May 20, 22:56
x4

Re: Changing values in the game

Post by ArgonExplorer3579 » Fri, 3. Jul 20, 03:46

Thanks for the info I have been having a hard time with that function

Post Reply

Return to “X Rebirth - Scripts and Modding”