From Naevwiki
Jump to: navigation, search


NPCs in naev are defined in two stages. The first stage is the ship definition (ship.xml), and the second stage is the fleet definition.

A fleet is a collection of ships. Ships in a fleet are called "pilots". All pilots in a fleet share the same faction and the same AI. When a script adds new pilots to the system using the pilot.add() command, it always references a fleet. Even if only a single ship is created, that ship is part of a fleet.


The following XML snippet demonstrates all the tags that make up fleet.xml.

 <fleet name="Dvaered Small Patrol">
  <flags />
   <pilot name="Vendetta" ship="Dvaered Vendetta"></pilot>
   <pilot name="Vendetta" ship="Dvaered Vendetta"></pilot>
   <pilot name="Ancestor" ship="Dvaered Ancestor"></pilot>
   <pilot name="Ancestor" ship="Dvaered Ancestor"></pilot>

Explanation of the major tags


The 'name' value is the name used to reference this fleet in scripts. This name will not show up in the game.


The default AI to be used for the pilots in this fleet. This can be overridden at any time by the script that spawned the fleet. AI scripts are stored in ai/.


This is the faction to which the fleet belongs. This determines the attitude of the pilots to other pilots and to the player.


These are optional flags for this fleet that influence how it behaves.


The pilots that make up the fleet are listed here. A fleet must have at least one pilot.


Each pilot tag adds one pilot to the fleet. The 'name' value is what the pilot will be called in the game. The 'ship' value is the ship to be used for this pilot. This name must match one of the ships in ship.xml.