Table of Contents

Discuss this page.

Summary

Fields

Inherits SpaceObject fields

Properties

Inherits SpaceObject properties

Overview

<ShipClass> defines the properties and behavior of a type of ship, including player ships.

Basic Attributes

UNID= The UNID of the ship class.

attributes=

score=

mass=

cargoSpace=

Names

{Naming the ship class; naming individual ships with the <Names> element}

Image

{<Image> element}

Armor

{<Armor> element}

Devices

{<Devices> element}

Drive

{thrust, maneuverability, maxSpeed attributes plus effect of devices. Plus <DriveImages>}

Items

{<Items> element}

Explosions & Wrecks

{leavesWreck attrib, plus wreck type and explosion attributes}

AI Settings

{<AISettings> element}

Events

<CanDockAsPlayer>

[NOTE: This event was implemented in 1.08.]

This event is raised when a player attempts to dock with an object (using the 'D' key). The event may return True to indicate that docking should proceed. Or, to prevent docking, it may return a text string explaining the reason for failure.

gSource is the player ship object that is attempting to dock.

aDockTarget is the object that the ship is attempting to dock with.

<CanInstallItem>

[API Version 18] This event is called when an armor segment is installed on the ship. The event may return True to allow installation or it may return a string explaining why the item cannot be installed. The following arguments are defined:

gSource: The ship object.

gItem: The item being installed.

aArmorSeg: The armor segment being installed. Note that this value is guaranteed to be set if an item is actually being installed, but it may be Nil if the caller is merely interested in the possibility of installation (and not concerned about location).

<GetExplosionType>

<OnAttacked>

<OnAttackedByPlayer>

<OnCreate>

<OnCreateOrders>

<OnDamage>

<OnDestroy>

<OnEnteredGate>

<OnEnteredSystem>

<OnLoad>

<OnObjDestroyed>

<OnObjDocked>

<OnObjEnteredGate>

<OnObjJumped>

<OnObjJumpPosAdj>

<OnObjReconned>

<OnOrderChanged>

<OnOrdersCompleted>

<OnPlayerEnteredSystem>

<OnPlayerLeftSystem>

<OnSystemExplosion>

<OnSystemObjAttacked>

<OnSystemObjDestroyed>

<OnSystemWeaponFire>

<OnTranslateMessage>

Player Ships

See: Player ships See: PlayerSettings

1)
CShipArmorSegmentDesc.cpp, 139