Need Some help with a mod

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

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

Union
Posts: 87
Joined: Sun, 23. May 04, 17:44
x4

Need Some help with a mod

Post by Union »

Hi guys, i am learning how to make a mod, Below is code i have made to change the bulk storage size in the game. However it does not seems to work. can anyone tell me why and possible show me what i am doing wrong?

Code: Select all

<diff>
  <!-- Changes station storage-->
  <replace sel="assets/props/StorageModules/macros/[@name='cargobay_station_bulk_01_macro']/component/properties">
    <properties> <cargo max="999800000" tags="bulk" /> </properties>
  </replace>
</diff> 
User avatar
YorrickVander
Posts: 2774
Joined: Tue, 29. Oct 13, 21:59
x4

Post by YorrickVander »

try (untested)

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<diff>
  <!-- Changes station storage-->
  <replace sel="//cargo[@max='800000']">
    <cargo max="999800000" tags="bulk" />
  </replace>
</diff>
in a file named cargobay_station_bulk_01_macro.xml

make the \assets\props\StorageModules\macros in your extensions folder and drop the xml patch in :)

Also read the very good XML patch guide sticky on this forum, and W3 Schools XPath guides for more info
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.
Union
Posts: 87
Joined: Sun, 23. May 04, 17:44
x4

Post by Union »

Thanks for your reply.

I could not get it to work however. I think the problem is my selection path. But i don't know what i am doing wrong.
User avatar
YorrickVander
Posts: 2774
Joined: Tue, 29. Oct 13, 21:59
x4

Post by YorrickVander »

To check error log, open steam client > XR > Properties > game launch options :

-debug all -logfile rebirth.log

and find text log in C:\Users\Me\Documents\Egosoft\X Rebirth\54443424 or similar

that log will tell you what the problem is
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.
YellowBelllyBlackSnake
Posts: 19
Joined: Sun, 12. Jan 14, 23:05
x4

Post by YellowBelllyBlackSnake »

Try this.

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<diff>
  <!-- Changes station storage-->
  <replace sel="/macros/macro/properties">
    <properties>
      <cargo max="999800000" tags="bulk" />
    </properties>
  </replace>
</diff> 
If this doesn't work make sure that the xml file is called "cargobay_station_bulk_01_macro.xml"

and that it is in the correct folder: extensions\"your mods name"\assets\props\StorageModules\macros

Return to “X Rebirth - Scripts and Modding”