Functions Documentation
View Function Edit Function
Name shpGetDataField
Syntax (shpGetDataField number string)
Argument List number: the space object or the shipclass UNID of the ship you want data from.
string: the name of the data field of the ship.
Returns expression: returns the value or the string of the data field. If there is no value, nothing is returned, not even Nil
Category unid, 0.99, ship
Description This function retrieves some base data from a ship. It can access some of the values from the ship class's xml, and some other values. (see below).
Example
(shpGetDataField (shpGetClass gPlayership) "score")
Returns 105 for the Freighter.
(shpGetDataField gPlayerShip "level")

Returns 2 for the Sapphire.
Comment An important function that can retrieve some base data about a ship. Specifically the following fields can be retrieved:
cargoSpace
explosion
fireAccuracy
fireRangeAdj
fireRateAdj
launcher
launcherUNID
level
maxSpeed
maneuver
manufacturer
name
primaryArmor
primaryArmorUNID
primaryWeapon
primaryWeaponRange
primaryWeaponRangeAdj
primaryWeaponUNID
score
shield
shieldsUNID
thrustToWeight
There might be more values that can be retrieved, but at the moment those are the ones that are known.