XML modding help - lists of properties?

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

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

emptyhead41
Posts: 14
Joined: Sat, 26. Mar 16, 19:51

XML modding help - lists of properties?

Post by emptyhead41 »

Trying to get my head around modding this wonderful game, but struggling to work out the properties to mod.

Eg. From the Script Property Document in the root of extracted cabs - the 'EngineBooster' type or Class has the following properties:
  • chargetime - time - Charge time until the boost starts
    boostduration - time - The duration of the current boost
    boostefficiency - float - The efficiency of the current boost as a percentage
    canboost - boolean - true iff the booster can be activated right now
    isboostactive - boolean - true iff the booster is currently active
    maxduration - time - The maximum duration possible
    minshield - integer - The minimum percentage of shields required to start boosting
    potentialduration - time - The duration if the boost was activated now
    potentialefficiency - float - The efficiency if the boost was activated now
    rechargetime - time - Time required to recharge after a boost
The file I was looking at playing with has the following code:

Code: Select all

<macros>
  <macro name="enginebooster_player_01_macro" class="enginebooster">
    <component ref="generic_enginebooster" />
    <properties>
      <boost charge="0" minshieldpercent="10" recharge="1">
        <speed forward="10" rotation="0.2" />
        <acceleration forward="5" reverse="1" strafe="5" rotation="0.25" />
      </boost>
...etc
So as I understand this, the xml file is creating a 'thing' that is of the 'enginebooster' class. Then it has the <properties> flag. One of the properties of this enginebooster class seems to be defining the 'boost' it produces.

Ok. So, where can I find what properties (or components) the enginebooster class has (like 'boost' - it also has 'effects', 'sounds' and 'hull' from the original file)?

Strangely the Script property document has some things which look similar - eg. 'minshield' in the document looks to be 'minshieldpercent' in the xml file. Likewise 'charge' and 'recharge' from the xml file seem to relate to 'chargetime' and rechargetime' from the script property document

:s

what gives? Any pointers anyone? Any help would be very gratefully received
User avatar
Lander1979
Posts: 1017
Joined: Mon, 4. Aug 14, 05:18
x4

Post by Lander1979 »

Try looking at the files in the Cabs under "\assets\props\EngineSystems" for the component file, and "\assets\props\EngineSystems\macros" for the macro file.

As all ships have their own engine qualities, you will have to find the component file and macro file specific to the ship's engine you wish to change.

Each Engine has a "_Macro.xml" file in the macro folder that defines it and a matching component file that tells the game where in 3d space to place the components defined by the macro file.

Also, the engine booster is a component of the engine, so it may be that the variables you are looking for are in the engine macro and component file rather than the booster's files. And in turn the engine is a component of the related ship, so it could also be feasible that there are related variables there as well.

For that reason, when modding anything it is best practice to start investigating the ship macro's first, and then work your way down through the various components associated with the ship macro file, use it like a road map.
0101...0011...0011...0101...2!
Sparky Sparkycorp
Moderator (English)
Moderator (English)
Posts: 8074
Joined: Tue, 30. Mar 04, 12:28
x4

Post by Sparky Sparkycorp »

The Modding Support part of the Rebirth wiki could help:

https://www.egosoft.com:8444/confluence ... ng+support
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

I think scriptproperties refers to how you can access, and sometimes change, these values via MD or AI scripts rather than detailing how the asset is set up. So you could find, for example, if a ship is boosting via $ship.isboostactive, or if a ship can boost right now via $ship.canboost.

I don't think there is any documentation on how the asset macros and components are set up.
emptyhead41
Posts: 14
Joined: Sat, 26. Mar 16, 19:51

Post by emptyhead41 »

Excellent replies guys, thank you very much.

Already tried the modding guide on the wiki. Is nicely detailed, but only seems to have advice about the ui component which I'll not be making use of just yet. I assume we can add to the Wik thoughi? Haven't checked yet.

Anyway thanks again. Very useful replies.
User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 25130
Joined: Sun, 2. Apr 06, 16:38
x4

Post by X2-Illuminatus »

emptyhead41 wrote:I assume we can add to the Wik thoughi?
Yes, everyone can add information to the wiki, create own pages and edit existing ones. The only exception are some pages, which are maintained by Egosoft devs only.
Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten

Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)

Neuauflage der fünf X-Romane als Taschenbuch

The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!

Return to “X Rebirth - Scripts and Modding”