Understanding ships
Ships and ship groups
A ship defined in ships.xml doesnt necessary mean a single ship, confused? Well, what I mean is ship A (for example) may have 2-3 other choices, which may use different files but are considered the same ship. So for example in X3AP we have had a Argon Titan, in X-R this could be a single macro, or vary between 2 or 3 variants, but to the game would classed the different variants as the same ship.So the first thing to do is to look at ships.xml. Lets break-down one entry:
<ship id="albion_miner_ions_large" macro="units_size_l_ions_collector_macro">
<category tags="[albion, miner, ions, mission]" faction="[albionenergy, beryll, heartofalbion, leddaindustrial, nolimits, plutarch, wholesomefoods]" size="ship_l"/>
<pilot ref="trader_albion_random"/>
<cargo>
<wares list="[ions]" chance="80">
<fillpercent min="10" max="60"/>
</wares>
<wares list="[fuelcells]">
<fillpercent min="30" max="80"/>
</wares>
</cargo>
<units>
<unit category="gascollector" mk="1" min="10" max="20"/>
<unit category="gascollector" mk="2" min="10" max="20"/>
<unit category="gascollector" mk="3" min="10" max="20"/>
<unit category="transport" mk="1" min="60" max="90"/>
</units>
<drop ref="standardammo"/>
</ship>
<category tags="[albion, miner, ions, mission]" faction="[albionenergy, beryll, heartofalbion, leddaindustrial, nolimits, plutarch, wholesomefoods]" size="ship_l"/>
<pilot ref="trader_albion_random"/>
<cargo>
<wares list="[ions]" chance="80">
<fillpercent min="10" max="60"/>
</wares>
<wares list="[fuelcells]">
<fillpercent min="30" max="80"/>
</wares>
</cargo>
<units>
<unit category="gascollector" mk="1" min="10" max="20"/>
<unit category="gascollector" mk="2" min="10" max="20"/>
<unit category="gascollector" mk="3" min="10" max="20"/>
<unit category="transport" mk="1" min="60" max="90"/>
</units>
<drop ref="standardammo"/>
</ship>
First line
Probably the most important, as this tells us one very important factor.. well two. The id is the name used in-game - like all the other files. However the next bit can vary. In the example above there is the keyword macro, this means the ship is defined in a single file (so does not change).However if the keyword group was there instead, then we need to go into shipgroups.xml and search for the group id. Once you have found the group, you will see a bunch of ships are assigned to that group, each with a macro-name. These are the possible macros that could be used for this one ship. The weight being the chance out of 100, 100 being high.
Now we need to open-up the correct macro name, either by using the one in ships.xml (if defined) or in shipgroups.xml.