Asset.xml

From Naevwiki
Jump to: navigation, search

Documentation of the asset.xml asset definitions.

Introduction

asset.xml, previously known as planet.xml, is where you will find definitions of assets. An asset is usually a planet or a station, but it can also be a virtual asset. Virtual assets have no tangible representation in the game world. It is important to know that assets not only exist, they also generate presence. Presence is explained in the presence proposal. It is also important to note that much of the contents of asset.xml are generated by the in-game galaxy editor. This galaxy editor can be accessed by starting the game with the --devmode command-line parameter. Caution: the galaxy editor saves its output in the naev root directory!

Example

The following XML snippet demonstrates all the tags that make up asset.xml. It lists one real asset and one virtual asset.

 <asset name="Ammu">
  <pos>
   <x>90.000000</x>
   <y>2490.000000</y>
  </pos>
  <GFX>
   <space>A00.png</space>
   <exterior>lava.png</exterior>
  </GFX>
  <presence>
   <faction>Empire</faction>
   <value>100.000000</value>
   <range>2</range>
  </presence>
  <general>
   <class>A</class>
   <population>60000</population>
   <services>
    <land/>
    <refuel/>
    <bar/>
    <missions/>
    <commodity/>
    <outfits/>
    <shipyard/>
   </services>
   <commodities>
    <commodity>Food</commodity>
    <commodity>Ore</commodity>
    <commodity>Industrial Goods</commodity>
   </commodities>
   <description>Ammu is a generally calm planet, once one is accustomed to the constant rumbling of the lava flows. Lava eruptions are often felt in the subterranean spaceport, but the way it doesn't seem to phase the locals reassures you.</description>
   <bar>The Ammu Spaceport Bar, known as "The Heatsink" due to its frigid temperatures, in contrast to the rest of the station. While primarily known for their temperature, that's not to say they can't whip up a mean Pan-Galactic Gargle Blaster.</bar>
  </general>
  <tech>
   <item>Basic Outfits 1</item>
  </tech>
 </asset>
 
 <asset name="Virtual Civilian Standard">
  <virtual/>
  <presence>
   <faction>Civilian</faction>
   <value>50.000000</value>
   <range>0</range>
  </presence>
 </asset>

Explanation of the major tags

pos

The position of the asset. The information within is generated by the galaxy editor.

GFX

The graphics for the planet, both in-space and landed. The in-space graphic can be edited in the galaxy editor.

presence

The presence definition for this asset. This also determines which faction the asset belongs to. The value of the generated presence is the presence that will be added to the current system. If the range of the presence is greater than 1, all adjacent systems will also be given presence for this asset, in a reduced measure.

general

Contains the definitions for class, population, services, and commodities, and the descriptions for the land and bar screens.

class

The class of the planet. Stations are class 0.

population

The population of the planet or station. The default value is "0".

services

Contains tags for individual services that exist on this planet. Possible services are: land, refuel, bar, missions, commodity, outfits and shipyard. Note: if the planet lacks the land service, the player can't land on this asset.

commodities

The commodities that this asset trades. Caution: this information will likely be removed when the economy is revamped.

description

This is the text that shows up on the asset's land screen. The default value is "(null)".

bar

This is the text that shows up on the asset's bar screen. The default value is "(null)".

tech

This is a list of the techs associated with this asset. Techs are essentially groups of outfits or ships that are available to the outfitter and shipyard. Tech groups are defined in tech.xml. For more information about tech, refer to the planet tech proposal.

virtual

This tag marks the asset as virtual. Virtual assets only need presence information.