My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
ShipXML  
Documentation of the ship.xml ship definitions.
Updated May 11, 2010 by BTA...@gmail.com

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 all the tags that make up fleet.xml.

 <ship name="Llama">
  <base_type>Llama</base_type>
  <GFX sx="8" sy="8">llama</GFX>
  <GUI>minimal</GUI>
  <sound>engine</sound>
  <class>Yacht</class>
  <price>120000</price>
  <fabricator>Melendez Corp.</fabricator>
  <description>One of the most widely used ships in the galaxy. Renowned for its stability and stubbornness. The design hasn't been modified much since its creation many many years ago. It was one of the first civilian use spacecrafts, first used by aristocracy and now used by everyone who cannot afford better.</description>
  <movement>
   <thrust>220</thrust>
   <turn>150</turn>
   <speed>260</speed>
  </movement>
  <health>
   <shield>100</shield>
   <armour>120</armour>
   <energy>320</energy>
   <shield_regen>80</shield_regen>
   <armour_regen>0</armour_regen>
   <energy_regen>1000</energy_regen>
  </health>
  <characteristics>
   <cpu>18</cpu>
   <crew>2</crew>
   <mass>83</mass>
   <fuel>400</fuel>
   <cap_cargo>20</cap_cargo>
  </characteristics>
  <slots>
   <high x="7"   y="0" h="1" />
   <high x="-3"  y="0" h="2" />
   <medium/>
   <medium/>
   <low/>
   <low/>
  </slots>
 </ship>

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 high, medium and low slots. High slots are for weapons, and weapons have a position on the ship's sprite. Medium and low slots don't need a position definition.


Sign in to add a comment
Powered by Google Project Hosting