Unidiff.xml

From Naevwiki
Jump to: navigation, search

Unidiff.xml controls "universe differences", which can be applied to Naev to change various aspects of the universe. For example, it can add or remove an asset from a system, or add an outfit for sale.

The unidiff.xml file can be found at ./naev/dat/unidiff.xml.

Possible Changes

As of this point in time, unidiff.xml only supports adding or removing an asset, adding or removing an outfit from a tech tree, adding or removing jump points, or changing the faction of an asset.

Format

Defining a new unidiff

To define a new unidiff, use <unidiff name="new_diff">, followed by all tags which will be changing things. End the diff with </unidiff>

Adding or Removing an Asset

First define a system to add or remove an asset to, and give which asset to add or remove.

<system name="foo">
 <asset name="vacationhotspot">add/remove</asset>
</system>

Adding or Removing a Jump Point

First define the system in which to add or remove a jump point. In the <jump> node, define the target system which the point will jump to, the x and y coordinates in the system in which to place the jump, and the hidden value.

<system name="foo">
 <jump target="oohbaby" x="100" y="-50" hide="0">add</jump>
</system>

If removing a jump point, only the target is needed.

  <jump target="oohbaby">remove</jump>

Adding or Removing an Outfit from a Tech

First define which tech tree to add or remove the outfit or ship to. Use the <add></add> tags to add, and <remove></remove> to remove.

 <tech name="Heavy Civilian Combat Ships">
  <add>__Collective</add>
 </tech>

Changing the Faction of an Asset

First define which asset you would like to change, then the faction which to change it to.

<asset name="areallywarmplanet">
 <faction>Soromid</faction>
</asset>

Example Unidiff File

The following combines all the previous examples into a valid unidiff file.

<unidiffs>
 <unidiff name="a_fun_unidiff">
  <system name="foo">
   <asset name="vacationhotspot">add</asset>
   <jump target="oohbaby" x="100" y="-50" hide="0">add</jump>
  </system>
  <tech name="Heavy Civilian Combat Ships">
   <add>__Collective</add>
  </tech>
  <asset name="areallywarmplanet">
   <faction>Soromid</faction>
  </asset>
 </unidiff>
</unidiffs>