Starship Properties

This section describes all ship properties. These can be accessed using `Ship(id).FIELD', using a `ForEach' loop, and with the search and print functions.

Many ship properties are only known for own ships. Some are also known for visual contacts, and only a few for non-visual contacts. (you may get non-visual contacts if you receive DOS-style RST files). Ships whose position was guessed by PCC also count as non-visual contacts. Unknown values are EMPTY, even if not explicitly stated here.

Ship properties can be prefixed with `Ship.'. This makes it possible to refer to a ship property which is currently shadowed by an equally-named property of another object. For example, the following is a more complicated way to say `CargoUpload "300n"':

  With Planet(Orbit$) Do CargoTransfer Ship.Id, "300n"

Without the explicit `Ship.', this would pass a planet Id where `CargoTransfer' expects a ship Id, which makes no sense.

Some of the ship properties can be assigned. If that would violate any constraint of a fleet (i.e. you try to change the speed of an ordinary member), the assignment is silently ignored.

Aux

The auxiliary weapon of the ship, "Fighters" or a torpedo system name. EMPTY if no auxiliary weapon or not known

See also: Torpedo Systems

Aux$

The auxiliary weapon of the ship, number code: 1 to 10 if torpedoes, 11 if fighters, EMPTY if none or not known

See also: Storage.Ammo(x)

See also: Torpedo Systems

Aux.Ammo

Number of torpedoes or fighters aboard the ship

Aux.Count

Number of auxiliary weapons (fighter bays, torpedo launchers) on the ship, 0 if none

Aux.Short

The auxiliary weapon of the ship, 3 character code: "Ftr" (fighters) or a torpedo system code. EMPTY if no auxiliary weapon or not known

See also: Torpedo Systems

Beam

The name of the beam weapon of the ship. EMPTY if no beam weapon or not known

See also: Beams

Beam$

Type of beam weapon on this ship, 0 if none

See also: Beams

Beam.Count

Number of beam weapons on this ship

Beam.Max

Maximum number of beams

Beam.Short

The beam weapon of the ship, 3 character code. EMPTY if no beam weapon or not known

See also: Beams

Cargo.Colonists

Number of colonist clans in cargo hold

Cargo.D

Amount of Duranium in cargo hold

Cargo.Free

Free cargo space in kt. Negative if ship is overloaded

Cargo.M

Amount of Molybdenum in cargo hold

Cargo.Max

Maximum cargo on this ship

Cargo.MaxFuel

Maximum fuel on this ship

Cargo.Money

Megacredits in cargo hold (don't occupy space)

Cargo.N

Amount of fuel (Neutronium) aboard the ship

Cargo.Str

All cargo of this ship, as a cargo set. This will include minerals, fuel, colonists, supplies, money, and ammunition.

Cargo.Supplies

Amount of supplies in cargo hold

Cargo.T

Amount of Tritanium in cargo hold

Comment

Your comment as entered with [F9]. Since PCC 1.0.8, this is a normal property (which can, for example, be assigned to using the `:=' operator)

See also: CreateShipProperty, CreatePlanetProperty

Crew

Crew members aboard the ship

Crew.Normal

Number of crew members usually on this ship

Damage

Damage, in percent

Enemy

The primary enemy of the ship if set (short name), or EMPTY

Enemy$

Primary enemy, player number or 0. This property can be assigned to

Enemy.Adj

The primary enemy of the ship if set (adjective), or EMPTY

Engine

The engine of the ship

Engine$

Engine type (1 to 9)

Engine.Count

Number of engines in this ship

FCode

The friendly code. This property can be assigned to.

Fighter.Bays

Number of fighter bays in this ship

Fighter.Count

Number of fighters on the ship

Fleet

Name of the fleet this ship is in, or EMPTY if none. This name is intended for printout; if the user did not set one, it is the name of the leader ship.

Fleet$

Id of the fleet this ship is in, 0 if none

Fleet.Name

This property is only defined for fleet leaders; it is the name of the fleet. This value can be assigned to.

Fleet.Status

This ship's status in respect to fleets:

  • "-" if lone ranger;
  • "leader" if a fleet leader;
  • "member" if an ordinary fleet member;
  • EMPTY if not your ship
HasFunction(name)

True if the ship has the specified hull function. The parameter is either the name ("Gravitonic") or number (7) of the function, as it can be used in SHIPLIST.TXT. Considers all functions assigned to this ship type as well as to this individual ship, and honors level restrictions.

See also: Hull.Special

See also: Hull Functions

Heading

Heading as a compass point, EMPTY if no waypoint set or not moving. Usually known for visual contacts

See also: Compass

Heading$

Heading of ship in degrees. EMPTY if no waypoint set or not known. Usually known for visual contacts

See also: Compass

Hull

Name of this ship's hull. Same as `Hull(Hull$).Name'. Usually known for visual contacts

Hull$

Hull type (1 to 105). Usually known for visual contacts

Hull.Short

Short name (12 characters) of this ship's hull. Same as `Hull(Hull$).Name.Short'. Usually known for visual contacts

Hull.Special

Important special capabilities of this ship, as a string of code letters. Under PHost, not necessarily the same as `Hull(Hull$).Special'; it will include abilities available to this very ship only.

This field is provided for simplicity, and for compatibility with older versions of PCC. To access all hull functions, use `HasFunction(name)'.

See also: Hull Capabilities

Hull.Special.Str

This field is no longer supported since PCC 1.1.12.

In PCC up to 1.1.11, this field contains a free-form string describing the ship's special capabilities; it is the same as `Hull(Hull$).Special.Str'.

Id

Id number

Level

Experience level, if PHost experience system in use and level is known. EMPTY otherwise.

Level.Gain

Experience level gain, if PHost experience system in use. For ships, honors a possible Training mission. For planets, honors the planet's happiness. For both, includes general aging. EMPTY if not applicable.

Level.Name

Name of experience level, if PHost experience system in use and level is known. EMPTY otherwise.

Level.Points

Experience points, if PHost experience system in use and points are known. EMPTY otherwise.

Loc

Location of this ship

  • "(xxx,yyy)" if in deep space;
  • "nnn (#id)" if at planet nnn, Id #id.

Known for all ships on the map

Loc.X

X coordinate of the ship. Known for all ships on the map

Loc.Y

Y coordinate of the ship. Known for all ships on the map

Marked

TRUE if the ship is marked, else FALSE

Mass

Mass of ship in kt, or EMPTY if not known

Mission

The starship mission, or EMPTY if not known. If known, this field contains the mission name as shown in the mission selection window

Mission$

Numeric mission code. This property can be assigned to.

Mission.Intercept

I parameter of mission (Id of ship to intercept if `Mission$=8'). This property can be assigned to

Mission.Short

The starship mission (short name, 7 characters), or EMPTY if not known

Mission.Tow

T parameter of mission (Id of ship to tow if `Mission$=7'). This property can be assigned to

Move.Eta

Estimated time of arrival, in turns. EMPTY if hyperdriving, waypoint set but no speed, or not known. Note that if the ship takes more than 30 turns to reach the waypoint, PCC 1.0.18 and later will report it as unknown. I hope you do not attempt to go such large distances in one run...

Move.Fuel

Fuel usage for current waypoint. EMPTY if hyperdriving, waypoint set but no speed, or not known. Like for Move.Eta, PCC 1.0.18 reports this value as unknown if the movement time is more than 30 turns.

Name

Name of the ship. Usually known for visual contacts. This property can be assigned to if you own the ship

Orbit

Name of planet this ship is orbiting, EMPTY if none. Known for all ships on the map

Orbit$

Id number of planet this ship is orbiting, 0 if none. Known for all ships on the map

Owner

Owner of the ship, short race name. Known for all ships on the map

Owner$

Owner of the ship, player number. Known for all ships on the map

Owner.Adj

Owner of the ship, adjective. Known for all ships on the map

Owner.Real

Real owner of the ship, player number. For ships under remote control, this is the original owner; otherwise it is the same as `Owner$'. Usually known for all ships on the map

Played

True if this unit is played, false if it is a foreign or unknown unit

Score(x)

PHost can associate various scores with ships and planets (UTIL.DAT records 49 and 50). This property makes these scores available to scripts. Valid parameters can be found in the PHost documentation. As of PHost 4.1, the following values are valid:

  • Score(1): experience level (same as `Level')
  • Score(2): experience points (same as `Level.Points')

This property yields EMPTY if the respective score does not exist or is not known.

Speed

The speed of the ship as a string ("Warp X" or "Hyperdrive"), EMPTY if not known. The warp factor is usually known for visual contacts

Speed$

Warp factor of ship. No special treatment for Hyperdrive (activating the Hyperdrive using PCC's warp window sets `Speed$=2'). Usually known for visual contacts. This property can be assigned to if you own the ship

Tech.Hull

Hull tech level

Torp

The name of the torpedo system on the ship, or EMPTY if none or not known

See also: Torpedo Systems

Torp$

Type of torpedo system aboard the ship, or 0.

Bug: some programs (Dominate?) generate ships which have fighters, but `Torp$' nonzero. By default, PCC corrects this during unpack, but other unpacks don't

See also: Torpedo Systems

Torp.Count

Number of torpedoes on ship

Torp.LCount

Number of torpedo launchers

Torp.LMax

Maximum number of torpedo launchers

Torp.Short

The torpedo system on the ship, 3 character code, or EMPTY if none or not known

See also: Torpedo Systems

Transfer.Ship

TRUE if this ship is transferring cargo to an other race's ship, FALSE if not, EMPTY if not known

Transfer.Ship.Colonists

Number of colonist clans being transferred to another race's ship

Transfer.Ship.D

Amount of Duranium being transferred to another race's ship

Transfer.Ship.Id

Id of the ship we're transferring cargo to, or 0

Transfer.Ship.M

Amount of Molybdenum being transferred to another race's ship

Transfer.Ship.N

Amount of Neutronium being transferred to another race's ship

Transfer.Ship.Name

Name of ship this ship is transferring cargo to (in the form "name (#id)" or "Ship #id"), EMPTY if none or not known

Transfer.Ship.Supplies

Number of supplies being transferred to another race's ship

Transfer.Ship.T

Amount of Tritanium being transferred to another race's ship

Transfer.Unload

TRUE if this ship is unloading cargo to a planet or jettisoning into deep space, FALSE if not, EMPTY if not known

Transfer.Unload.Colonists

Number of colonist clans being unloaded/jettisoned

Transfer.Unload.D

Amount of Duranium being unloaded/jettisoned

Transfer.Unload.Id

Id of planet we're unloading cargo to, 0 if none or jettison

Transfer.Unload.M

Amount of Molybdenum being unloaded/jettisoned

Transfer.Unload.N

Amount of Neutronium being unloaded/jettisoned

Transfer.Unload.Name

Name of planet this ship is unloading cargo to, "jettison" if jettisoning into space, EMPTY if no transfer or not known

Transfer.Unload.Supplies

Number of supplies clans being unloaded/jettisoned

Transfer.Unload.T

Amount of Tritanium being unloaded/jettisoned

Type

Type of this ship (one of "Carrier", "Torpedo Ship", "Beam Weapons", "Freighter"), or EMPTY. Usually known for visual contacts

Type.Short

Type of this ship (one of "C", "T", "B" or "F"), or EMPTY. Usually known for visual contacts

Waypoint

Waypoint of the ship:

  • "(Location)" if no waypoint set;
  • `ShipName(Mission.Intercept)' if we're on an intercept course;
  • "(xxx,yyy)" if waypoint in deep space;
  • "nnn (#id)" if waypoint is planet nnn, Id #id;
  • EMPTY if not known
Waypoint.Dist

Distance to waypoint in ly, as a real number

Waypoint.DX

Distance to waypoint in X direction

Waypoint.DY

Distance to waypoint in Y direction

Waypoint.Planet

Id of planet at waypoint, 0 if none

Waypoint.X

X coordinate of waypoint

Waypoint.Y

Y coordinate of waypoint


[ << Previous | Up | Next >> ]

Stefan Reuther <Streu@gmx.de>