Ship.xml

Documentation of the ship.xml ship definition

Ships are now in separate files, needs to be updated. = Introduction = NPCs in naev are defined in two stages. The first stage is the ship definition, and the second stage is the fleet definition (fleet.xml).

A ship is nothing more than a specification of a particular ship. The specification determines how the ship looks, how it handles and how capable it is in terms of carrying cargo, fighting, and maneuvering.

= Example = The following XML snippet demonstrates some of the tags that make up a ship XML file.

= Explanation of the major tags =

ship
The 'name' field is the ship's name. This is the name that will show up in the game, and it is also the name used to reference the ship in fleet definitions.

base_type
This is the base type of the ship. Ships that share the same base type are considered to be different models of the same basic design. This information can be used in mission and event scripts.

GFX
This tag determines what the ship looks like. The value is comprised of two parts, separated by an underscore. The first part is the name of the directory the sprite sheet is in. The first and second parts taken together form the file name of the sprite sheet (without the extension). This is all relative to gfx/ship/. The GFX tag takes optional 'sx' and 'sy' values that specify the size of the sprite sheet. If not specified, the game will assume 8x8.

GUI
This tag specifies which GUI to use when the player is using this particular  ship. This is useful for making different ships feel unique. The GUI files are found in gfx/gui. Note that currently only one GUI is available.

sound
This is the engine sound for the ship. Sounds are found in snd/sounds/. The value is the file name without the extension.

class
This is the ship's class.

price
This is the amount of money the player needs to shell out to purchase this ship.

fabricator
This is the ship's fabricator.

description
This is the descriptive text for this ship. It is shown on the shipyard screen.

movement
This section contains the thrust, turn and speed parameters that govern the  ship's acceleration, turning speed and maximum speed, respectively. Note that the ship's final performance also depends on mass.

health
This section contains the shield, armour and energy parameters, as well as their recharge rates.

characteristics
This section contains the amount of cpu, crew, mass, fuel and cargo capacity  of the ship. Note that mass affects the ship's maneuverability.

slots
This is a list of the slots on the ship. Each ship has a number of weapon, utility and structure slots. Weapon slots have a position on the ship's sprite, but utility and structure slots don't need a position definition.