User Tools

Site Tools


modding:xml:playersettings

Overview

The <PlayerSettings> element is a sub-element of <ShipClass>. It defines the properties necessary to turn a ship into a player ship class.

If a ship class has no <PlayerSettings> the engine checks any inherited bases classes. If no <PlayerSettings> element is found the ship class is not considered a player ship.

Starting Ship

The adventure determines the set of player ship classes to offer as a starting ship. The AdventureDesc element has a startingShipCriteria parameter that defines the set of player ships to include. A player ship class may influence this choice with the initialClass parameter:

initialClass= This parameter influences whether or not this ship class is offered as a starting ship class when a new adventure is started. A value of true means that the ship class is offered provided that it matches the adventure's criteria. A value of false or no value at all means that the ship class is never offered as a starting ship (a player may, however, later switch to this ship class, if appropriate).

A value of always means that the ship class is always offered regardless of the adventure criteria. Note: This value should generally only be used for debugging purposes: it is rare for a ship class to be appropriate in all adventures.

Starting Ships for The Stars of the Pilgrim

In order to be included as a starting player ship in The Stars of the Pilgrim, the ship class must do the following:

  1. Include the special attribute 00200000_PlayerShip
  2. Set initialClass to true

Example:

<ShipClass ...
   attributes="00200000_PlayerShip"
   ...
   >

   <PlayerSettings ...
      initialClass="true"
      >
      ...
   </PlayerSettings>
</ShipClass>

Armor Display

The <ArmorDisplay> element is a sub-element of <PlayerSettings>; it defines the display of the ship's armor on the HUD.

If <ArmorDisplay> is omitted the engine looks for an <ArmorDisplay> element in an inherited base class. An error is returned if none is found.

Reactor Display

The <ReactorDisplay> element is a sub-element of <PlayerSettings>; it defines the display of the ship's fuel and reactor on the HUD.

If <ReactorDisplay> is omitted the engine looks for a <ReactorDisplay> element in an inherited base class. An error is returned if none is found.

Shield Display

The <ShieldDisplay> element is a sub-element of <PlayerSettings>; it defines the display of the ship's shield generator on the HUD.

shieldLevelEffect= The UNID of an effect to use to display the shield level.

If <ShieldDisplay> is omitted the engine looks for a <ShieldDisplay> element in an inherited base class. An error is returned if none is found.

See Also

modding/xml/playersettings.txt · Last modified: 2014/12/27 04:40 by 127.0.0.1