Craft

The base AI process is called "CraftProcess".

classlabel = "craft"

Table of Contents

Stock ODF Commands

shieldDelay

Float, Default: 0.0

Determines how long in seconds it takes for shield regeneration to resume once the shields are down, as well as how long until the shields reestablish themselves if they are lowered or temporarily disabled (time after the disable weapon ends).

shieldRate

Float, Default: 0.0

Amount of shield hitpoints regenerated per second while the Craft's shields are active. If healthRate is not specified, shieldRate / 5 describes the amount of hull hitpoints regenerated per second as well.

If shieldRate is 0, the Craft's shields (or hull, if healthRate is undefined) will not be repaired by a RepairShip or at a Shipyard (the Craft can still be targeted or sit in the queue, but hitpoints will not change). A Shipyard repairs hitpoints at a rate per second of  50 * shieldRate.

healthRate

Float, Default: shieldRate / 5.0

Amount of hull hitpoints regenerated per second.

If healthRate is 0, the Craft's hull will not be repaired by a RepairShip or at a Shipyard (the Craft can still be targeted or sit in the queue, but hitpoints will not change). A Shipyard repairs hitpoints at a rate per second of  100 * healthRate.

disableShieldsOnTransport

Boolean, Default: TRUE

When set to false (0), the shields are not disabled when the craft uses its transporters.

shipIsBuiltByShips

Boolean, Default: FALSE

Used by the AI only. When set to true (1), it allows AI players to build the vessel from a ConstructionRig (builds the unit with workerbees).

shipIsBuiltByEvolution

Boolean, Default: FALSE

Used by the AI only. When set to true (1), it allows AI players to build the Craft from other GameObjects using Evolver functionalities (builds a cocoon around the unit).

saneCrewLossMethod

Boolean, Default: FALSE

When set to true (1), ordnances which have a specified hullCrewModifier and / or shieldCrewModifier (if shieldProtection is less than 1.0) do not cause a percentage loss of crew for the Craft (crew loss is lessened).

specialEnergyRate

Float, Default: 0.0

Amount of special weapons energy regenerated per second. Negative values are invalid.

maximumCrew

Integer, Default: crewCost

The maximum amount of crew a Craft may carry. Note this is not the starting amount of crew, which is set by crewCost.

If maximumCrew is less than crewCost, the Craft cannot increase its crew complement past maximumCrew by any means (only once crew levels drop below the number specified by maximumCrew).

Note that if crewCost = 0 and maximumCrew is >0, the game will crash.

intrinsicValue

Float, Default: ???

Determines the intrinsic value of a target for AI global goal evaluation (influences where the AI attacks): locations with higher intrinsicValue Craft are preferred targets.

Consequently, if given a choice between sending units to investigate low intrinsicValue Craft and high intrinsicValue Craft, the AI will investigate the high intrinsicValue Craft. Note, that once the vessels are at the target, they will still choose targets based on the attackPower of target Craft in the area.

The inputted value affects how the AI behaves when combined with the AIP command, int intrinsic_value_bonus. See the Artificial Intelligence page for more information.

intrinsicvalue = 23.3

attackPower

Float, Default: 1.0

Influences how the AI evaluates and compares Craft to determine attack priorities on a case by case basis for normal and special weapons. This affects how Craft without explicit attack orders determine which targets to attack as well. Note that Craft with negative attackPower will not be preferred until non-negative Craft (including 0.0!) are removed (in this case the more negative the attackPower, the less preferred).

The calculation for determining attack priorities is as follows: Current Hitpoints / attackPower = Craft Attack Value. Take the following example:

attackPower of target Craft-A is 5.0 and has 2000 total hitpoints (shield + hull hitpoints), which gives an attack value of 400
attackPower of target Craft-B is 1.0 and has 2000 total hitpoints (shield + hull hitpoints), which gives an attack value of 2000

If presented with both targets, an enemy Craft will be overwhelmingly likely to attack Craft-A, as 400 < 2000. If the total hitpoints of Craft-B are reduced to 400, the two targets are equally preferred. If the total hitpoints of Craft-B are reduced to 399 or lower, Craft-B is targeted exclusively.

Note that the choice of target can be influenced by which target appeared within sensor range first (add ~1 attack value) and distance to the target (closer targets are preferred).

attackPower = 42.0

In stock Armada II, attackPower only considered shield hitpoints.

defaultGreenAlert

Boolean, Default: FALSE

Sets the default alert status of the Craft to green when it is constructed.

When set to FALSE, Alert, Special Weapon and Movement Autonomy status is inherited from the constructing vessel or station.
When set to TRUE, Alert status is set to Green. Special Weapon Autonomy is set to None. Movement Autonomy is set to Low.

Note this is independent of whether the Craft can display alert statuses.

alwaysUseSpecialWeapons *

Boolean, Default: ???

Unknown: probably  used for the Craft AI for a special weapon that fires forever.

canAttack

Boolean, Default: TRUE

When set to false (0), a Craft with weapons will not pursue a target it has attacked automatically and will not close to weapon firing range if an enemy unit approaches. The Craft will also be unable to ignore its current Alert status. A Craft with weapons will also not turn to face enemy Craft when idle, when given an attack order, or when in combat (when within existing weapons range for the latter two) without a movement order.

When set to true (1), this is used even by Craft that have weapons which cannot target other Craft. These Craft (except for those with MiningBeams) will chase after opponents. The Craft will always close to firing range if given an attack order.

Note the parent command override when COMBAT = 0 (canAttack is always false).

canAttackPlanets

Boolean, Default: FALSE

When set to true (1), the Craft can be ordered to attack Planets with its regular weapons and will get an attack cursor when ordered to do so.

Note that when true, this command partially overrides the Weapon targetEnemyPlanets ODF command, such that Craft with targetEnemyPlanets = 0 can still use special weapons automatically on Planets via the AI / Special Weapons Autonomy.

canOnlyAttackPlanets

Boolean, Default: FALSE

When set to true (1), the Craft can only attack Planets with its regular weapons and cannot be ordered to attack other GameObjects. Note that the attack cursor is still present for normal Craft.

scout

Boolean, Default: FALSE

Used by the AI only. When set to true (1), the AI uses these Craft as scouts. Although such Craft may still attack vessels in range, their primary command will be to explore the map.

is_starbase

Boolean, Default: FALSE

When set to true (1), the Craft generates a footPrintBuffer when it has finished construction, preventing other buildings from being built in this area. It will also provide a ghost structure for the cursor when built by a ConstructionRig. When false (0), footPrintBuffer is nullified.

When true, the Craft will not be affected by most physics: it cannot be commanded to move (and a TractorBeam Ordnance cannot select the Craft as a target), although if it is given a build order, it will move to the location if the Craft has a Physics configuration file and engine subsystem hitpoints. The Craft will not be affected by ordnance or explosion based repelling, nor collisions, such that while other GameObjects may bump into the Craft, they cannot push it out of the way. Note that this command affects how certain Weapon and Ordnance commands affect it, as described in the respective sections.

When true, the Craft will always be decommissioned at its current location.

When true, the Craft cannot be double click selected with others of this type and only one Craft of this type may be selected at a time. If attempting to box select with Craft which have this command set to false, only the latter units will be selected.

When the GameObject is an Evolver, if the buildItem has is_starbase = 1, this lets you place that buildItem where you want the GameObject to evolve (the Evolver moves to the desired location and evolves into that buildItem), rather then just evolving on the spot.

footPrintBuffer

Float, Default: *

Sets the default rectangular area of the GameObject's footprint when it has finished construction: see is_starbase for additional functionality. This prevents other buildings from being built in this area. Area is calculated from the center of the GameObject's model.

Note that a GameObject's warpSpeed is inhibited while within a footprint.

* footPrintBuffer default changes based on the model's size. A smaller model produces a smaller default footPrintBuffer.

footprintbuffer = 25.0

eastBuffer

Float, Default: footPrintBuffer

Modifies the amount of rectangular area determined by footPrintBuffer in a particular direction (footPrintBuffer plus or minus eastBuffer). Cardinal directions concur with the fixed camera of Armada II (up is north, down is south, etc).

westBuffer

Float, Default: footPrintBuffer

Modifies the amount of rectangular area determined by footPrintBuffer in a particular direction (footPrintBuffer plus or minus westBuffer). Cardinal directions concur with the fixed camera of Armada II (up is north, down is south, etc).

northBuffer

Float, Default: footPrintBuffer

Modifies the amount of rectangular area determined by footPrintBuffer in a particular direction (footPrintBuffer plus or minus northBuffer). Cardinal directions concur with the fixed camera of Armada II (up is north, down is south, etc).

southBuffer

Float, Default: footPrintBuffer

Modifies the amount of rectangular area determined by footPrintBuffer in a particular direction (footPrintBuffer plus or minus southBuffer). Cardinal directions concur with the fixed camera of Armada II (up is north, down is south, etc).

downBuffer *

???

upBuffer *

???

isHero

Boolean, Default: FALSE

When set to true (1), the Craft has no commission stardate in the Admiral's Log. The command also increases the length of the ship death sequence ("floating in space" animation, prior to blowing up) and behavior related to ship naming (currently unknown).

Note that this command modifies the behavior of units controlled by High Weapons Autonomy / AI such that they will not use the following classes on a Craft with this label:

Of Ordnances: affects UniOrdnance Boarding, KlingonCommandoTeam, BorgBore, ComputerOverride, HoldingBeam.

Of Weapons: affects Drones, SelfDestruct

lifesupportLoss

Float, Default: 0.0

Percent of crew lost (out of the total remaining) per second while the lifesupport system is disabled or destroyed (1.0 = 1.0%).

shieldgeneratorCrewLoss

Float, Default: 0.0

Percent of crew lost (out of the total remaining) when the subsystem is destroyed (1.0 = 1.0%).

sensorsCrewLoss

Float, Default: 0.0

Percent of crew lost (out of the total remaining) when the subsystem is destroyed (1.0 = 1.0%).

enginesCrewLoss

Float, Default: 0.0

Percent of crew lost (out of the total remaining) when the subsystem is destroyed (1.0 = 1.0%).

lifesupportCrewloss

Float, Default: 0.0

Percent of crew lost (out of the total remaining) when the subsystem is destroyed (1.0 = 1.0%).

weaponsHitPercent

Float, Default: 0.0

The percent chance of a weapon hitting this subsystem (1.0 = 1.0%). Must add up to 100% with the other HitPercent commands. Note that once the subsystem is destroyed, it will no longer be attacked until it is functional again.

crewHitPercent

Float, Default: 0.0

The percent chance of a weapon directly killing crew (1.0 = 1.0%). Must add up to 100% with the other HitPercent commands.

sensorsHitPercent

Float, Default: 0.0

The percent chance of a weapon hitting this subsystem (1.0 = 1.0%). Must add up to 100% with the other HitPercent commands. Note that once the subsystem is destroyed, it will no longer be attacked until it is functional again.

shieldgeneratorHitPercent

Float, Default: 0.0

The percent chance of a weapon hitting this subsystem (1.0 = 1.0%). Must add up to 100% with the other HitPercent commands. Note that once the subsystem is destroyed, it will no longer be attacked until it is functional again.

lifesupportHitPercent

Float, Default: 0.0

The percent chance of a weapon hitting this subsystem (1.0 = 1.0%). Must add up to 100% with the other HitPercent commands. Note that once the subsystem is destroyed, it will no longer be attacked until it is functional again.

enginesHitPercent

Float, Default: 0.0

The percent chance of a weapon hitting this subsystem (1.0 = 1.0%). Must add up to 100% with the other HitPercent commands. Note that once the subsystem is destroyed, it will no longer be attacked until it is functional again.

hullHitPercent

Float, Default: 100.0 (if HitPercent for other subsystems is not defined)

The percent chance of a weapon hitting the hull (1.0 = 1.0%). Must add up to 100% with the other HitPercent commands.

lifesupportHitpoints

Float, Default: 1.0

The amount of hitpoints the subsystem has. If the subsystem hitpoints are set to 0, the Craft does not have that subsystem (and the icon for the subsystem appears greyed out): crewless Craft do not need the subsystem.

shieldGeneratorHitpoints

Float, Default: 1.0

The amount of hitpoints the subsystem has. If the subsystem hitpoints are set to 0, the Craft does not have that subsystem (and the icon for the subsystem appears greyed out): shields will not be regenerated after loss. However a Craft may still start out with shield hitpoints and the shield hitpoints can be regained via Shipyard or RepairShip repair.

sensorsHitpoints

Float, Default: 1.0

The amount of hitpoints the subsystem has. If the subsystem hitpoints are set to 0, the Craft does not have that subsystem (and the icon for the subsystem appears greyed out): rangeScan however will be unaffected.

enginesHitpoints

Float, Default: 1.0

The amount of hitpoints the subsystem has. If the subsystem hitpoints are set to 0, the Craft does not have that subsystem (and the icon for the subsystem appears greyed out).

Even if the Craft has enginesHitpoints defined, a Craft must have a valid physicsFile set as well in order to move about the battlefield.

Note that a Craft that has no enginesHitpoints defined will be hit by all weapons regardless of the base Weapon hitChance ODF command.

weaponsHitpoints

Float, Default: 1.0

The amount of hitpoints the subsystem has. If the subsystem hitpoints are set to 0, the Craft does not have that subsystem (and the icon for the subsystem appears greyed out): any weapons the Craft may have cannot be used.

enginesRepairTime

Float, Default: 1.0

The amount of time in seconds to repair one hitpoint of damage to the subsystem. Subsystems do not repair while disabled.

The value can be modified by the Faction configuration commands and the current crew status.

weaponsRepairTime

Float, Default: 1.0

The amount of time in seconds to repair one hitpoint of damage to the subsystem. Note that even if weaponsRepairTime = 0, weapons that rely on the subsystem will be disabled momentarily when the subsystem is destroyed (the subsystem will flash grey in addition). Subsystems do not repair while disabled.

The value can be modified by the Faction configuration commands and the current crew status.

shieldGeneratorRepairTime

Float, Default: 1.0

The amount of time in seconds to repair one hitpoint of damage to the subsystem. Subsystems do not repair while disabled.

The value can be modified by the Faction configuration commands and the current crew status.

lifesupportRepairTime

Float, Default: 1.0

The amount of time in seconds to repair one hitpoint of damage to the subsystem. Subsystems do not repair while disabled.

The value can be modified by the Faction configuration commands and the current crew status.

sensorsRepairTime

Float, Default: 1.0

The amount of time in seconds to repair one hitpoint of damage to the subsystem. Subsystems do not repair while disabled.

The value can be modified by the Faction configuration commands and the current crew status.

sparkTime

Float, Default: 0.5

The amount of time in seconds a spark will last (if specified by the sprites) on the hardpoints of damaged subsystems.

hullTargetHardpoints

String, Default: "root"

Determines where weapon fire will hit when striking crew directly. The model must have the appropriate hardpoints.

hulltargethardpoints = "hp13" "hp14" "hp15" "hp16"

sensorsTargetHardpoints

String, Default: "root"

Determines where weapon fire will hit when striking the subsystem directly. Any bleed-over damage will be dealt to the hull. Once the subsystem is destroyed, its hardpoints will no longer be attacked. The model must have the appropriate hardpoints.

lifesupportTargetHardpoints

String, Default: "root"

Determines where weapon fire will hit when striking the subsystem directly. Any bleed-over damage will be dealt to the hull. Once the subsystem is destroyed, its hardpoints will no longer be attacked. The model must have the appropriate hardpoints.

enginesTargetHardpoints

String, Default: "root"

Determines where weapon fire will hit when striking the subsystem directly. Any bleed-over damage will be dealt to the hull. Once the subsystem is destroyed, its hardpoints will no longer be attacked. The model must have the appropriate hardpoints.

shieldgeneratorTargetHardpoints

String, Default: "root"

Determines where weapon fire will hit when striking the subsystem directly. Any bleed-over damage will be dealt to the hull. Once the subsystem is destroyed, its hardpoints will no longer be attacked. The model must have the appropriate hardpoints.

weaponsTargetHardpoints

String, Default: "root"

Determines where weapon fire will hit when striking the subsystem directly. Any bleed-over damage will be dealt to the hull. Once the subsystem is destroyed, its hardpoints will no longer be attacked. The model must have the appropriate hardpoints.

possibleCraftNames

String, Default: Null, Array

Lists the possible names for the Craft, which will be placed before the unitName in-game entry. Craft names are chosen randomly when the craft is produced. Each separate name must be in quotes. If all names have been used once, additional craft of this type will reuse the same names with an additional letter suffix: USS Accel - A

possiblecraftnames = "USS Accel" "USS Africa"
   "USS Al Rammah"
   "USS Aquila"
   "Abirus" "Accius" "Agius"
   "Ahinius" "Asilius" "Aurtus" "Ausius" "Avifius"

criticalTargetHardpoints

String, Default: "root"

Determines where weapon fire will hit when dealing damage to the hull directly. The model must have the appropriate hardpoints.

maxShields

Float, Default: maxHealth

Sets the Craft's shield hitpoints when it is constructed. If the Craft is a Planet, this sets the maximum shield hitpoints if the Planet researches a PlanetShield.

shieldProtection

Float, Default: RTS_CFG.h SHIELD_DAMAGE_PROTECTION

The fraction of incoming damage that is imparted on the shields before hitting the hull (1.0 = 100%).

Note that when this command provides 100% protection for the Craft, damageThreshold and shieldCrewModifier are nullified for the ShockwaveExplosion / Ordnance / Nebula / Drones classes.

addToPlanner

Boolean, Default: TRUE

When set to false (0), Craft that would normally generate a footprint during construction and after finishing construction will no longer do so. When false for this type of Craft, GameObjects will not plan a path around the Craft, but will bump into it if ordered to the far side of the Craft.

shipType

String, Default: "?"

Used to determine the Craft's position in an AI formation. In Armada II:

S = Scout
F = Frigate
D = Destroyer
C = Cruiser
B = Battleship
X = Assault, Special
N = Non Combat

Note that this is especially important for the BioPulse Weapon (a "formation" weapon).

shipClass

String, Default: "scout"

Used for determining statistics in the Admiral's Log. Choices are:

"scout"
"frigate"
"destroyer"
"cruiser"
"battleship"
"special"
"mining"
"cargo"
"colony"
"construction"
"repair"

rangeScan

Float, Default: ~180 *

Sets the radius for the line of sight of the Craft when its sensor subsystem is operational.

This also affects if the Craft orients to enemy Craft if turnToFire is true: Craft will turn to face the most desirable target only when the target is within rangeScan (or when within the weapon's range).

This also positively correlates with the maximum width of a Cloverleaf formation's attack arcs.

Note that this affects how most Weapon classes operate:

When given a specialEnergyCost for their Ordnance, if the owner Craft's rangeScan is longer than the weapon range, specialEnergyCost will be used, ignoring any shot delay, until all energy is depleted. EXCEPTION: A CannonImp always obeys the Ordnance specialEnergyCost ODF command, regardless of Craft rangeScan - Weapon range mismatch.

Craft will continue to try to attack a target within their rangeScan even if it is out of the Weapon's range. If rangeScan matches Weapon range, they will switch to another target once the first target passes out of rangeScan.

* If rangeScan is set to 0, the game will crash when the Craft becomes available.

damagedScan

Float, Default: 0.0

Sets the radius for the line of sight of the Craft when its sensor subsystem is destroyed.

selfDestruct

String, Default: "xselfbal" *

Must be a valid explosion ODF. No .odf extension required. *Appears to only affect the Freighter and MineArray classes: if the default ODF is not available and the command is invalid the game will crash.

Has special functionality for a Freighter: this string specifies the Explosion ODF which will be triggered when the Freighter is destroyed while transporting latinum (hardcoded).

Has special functionality for a MineArray: this string specifies the Explosion ODF which will be triggered when the MineArray self destructs when it hits its target.

fireball

String, Default: "xfirebal"

Determines which Explosion ODF to use when the Craft is destroyed. Does not require .odf extension.

Note that if the default ODF is not available and the command is invalid the game will crash.

maxExtraWeapons

Integer, Default: 0

The maximum amount of additional weapons a Craft may assimilate from other GameObjects. In Fleet Operations, this is also the maximum number of extraWeapons a Craft may carry.

recyclesInPlace

Boolean, Default: FALSE

When set to true (1), the Craft may recycle at its current location.

boardingPartyStrength

Float, Default: 1.0

Modifies the strength (not the size) of the crew complement of this Craft for boarding actions.

percentNebulaWarn

Float, Default: 0.3

Once remaining hull health and / or crew drops below this percentage (1.0 = 100%) the NebulaDeathImminent event is triggered.

recrewRate

Float, Default: 10.0

Modifies the number of crew added to the crew complement per second when GameObjects are using the Recrew Command.

missileDetonator

String, Default: Null

In stock Armada II this command determined which weapon was used to specify the Cardassian Dreadnought's self-destructing missile-like ordnance.

When defined, the Craft's behavior is changed such that if given an attack command, the Craft will move to within the missileDetonator's range of the target (instead of its longest ranged weapon). The missileDetonator Craft will fire all its weapons while at the missileDetonator's range. Note that if the Craft is on Green Alert, it will only fire its missileDetonator weapon, and no other weapons.

The string specified by missileDetonator must be a valid weapon (with associated hardpoint) with the same name, otherwise Armada will crash. No .odf extension required.

missileDetonator = "gcDreadnaught"

Note that the AI process, "MissileProcess", further modifies the missileDetonator's behavior:

The missileDetonator Craft ignores its Physics configuration combatSpeed ODF Command when in combat or when given an attack Command and proceeds at impulseSpeed.

The missileDetonator Craft will disengage any weapons not specified by the missileDetonator string. If not given an express attack command, the Craft will continue to fire with its normal weapons (although it will try to seek out a hostile target to use its missileDetonator weapon and thus disengage its other weapons).

Upon reaching the missileDetonator's weapon range, the weapon will fire, however, if the specified weapon does not destroy the owner Craft (as it would with a BlackHoleCreator ordnance), this missileDetonator Craft will seek the root of the target, regardless of the missileDetonator weapon's range. This presumably serves to make the stock Armada II Cardassian Dreadnought seeking behavior look good.

eventSelect

String, Default: Null

The event that is played when the Craft is selected.

eventAttack

String, Default: Null

The event that is played when the Craft is given an attack command.

eventRedAlert

String, Default: Null

The event that is played when the Craft is set to red alert status. Overwrites the hardcoded event label ComputerRedAlert.

eventYellowAlert

String, Default: Null

The event that is played when the Craft is set to yellow alert status. Overwrites the hardcoded event label ComputerYellowAlert.

eventGreenAlert

String, Default: Null

The event that is played when the Craft is set to green alert status. Overwrites the hardcoded event label ComputerGreenAlert.

eventStop

String, Default: Null

The event that is played when the Craft is given a stop command.

eventMove

String, Default: Null

The event that is played when the Craft is given a movement command.

eventRepair

String, Default: Null

The event that is played when the Craft is given a repair command.

eventTransport

String, Default: Null

The event that is played when the Craft is given a transport command.

eventCloakEngage

String, Default: Null

The event that is played when the Craft is ordered to engage its cloak.

eventCloakDisengage

String, Default: Null

The event that is played when the Craft is ordered to disengage its cloak.

eventStandDown

String, Default: Null

In Armada 1 this was the event that was played when a Craft was given a stand down order (order the vessel to stop its current action and perform no further actions until it is so ordered.). Has no effect in Stock Armada II or Fleet Ops.

eventAcknowledge

String, Default: Null

The event that is played when the Craft is ordered to change movement, special weapons autonomies, or use a special weapon (Special = 1).

eventCancelBuild

String, Default: Null

The event that is played when the Craft is ordered to halt construction.

eventRepairTargetShip

String, Default: Null

The event that is played when the RepairShip is given a repair command on a vessel.

eventRepairTargetStation

String, Default: Null

The event that is played when the RepairShip is given a repair command on a station.

physicsFile

String, Default: Null

Determines which Physics configuration ODF file will be used for this Craft to specify all aspects of its movement (including if the Craft is repelled or collided with). Does not require .odf file extension.

Note that a Craft that has no valid physicsFile defined will be hit by all weapons regardless of the base Weapon hitChance ODF command. Likewise the weapons of Craft which have no valid physicsFile defined will hit their targets with 100% accuracy. Note also that combatSpeed must be greater than 0 for the Craft's physicsFile to be considered valid for hitChance.

physicsFile = "8472_sbattphys"

Movement aspects of the physicsFile are overwritten by the Craft is_starbase ODF command.

trekPhysicsFile

String, Default: Null

Determines which Physics configuration ODF file will be used for this Craft to specify all aspects of its movement when the Game Setup option, TrekPhysics, is on. Does not require .odf file extension.

resourcesCanHandle

String, Default: Null

Determines which resources the Craft can mine: multiple resources can be specified. The four choices are dilithium, latinum, metal, and biomatter.

Freighters / PlanetMiningBases that can mine resources will be able to mine the resource(s) specified by resourcesCanHandle. They will thus be able to fire their MiningBeam at the appropriate target.

For Freighters, an order to mine can be given by clicking the Mine button, clicking on the Resource object, or giving a mining order by clicking on a MiningStation / Starbase when the appropriate TransferRate command is present. Note the Freighter will display its mining cursor icon only when hovered over a Resource object that has a matching resource specified by resourcesCanHandle.

resourcesCanHandle = "dilithium" "latinum" "metal" "biomatter"

Fleet Operations ODF Commands

shieldHit

String, Default: "shield_hit.sod" renamed from Xshldx01.sod

Determines the model used to display the shield animation when the shields of the Craft are above 20%. File extension not required.

shieldhit = "shield_dom_hitM"

shieldDown

String, Default: "shield_down.sod" renamed from Xshldx01.sod

Determines the model used to display the shield animation when the shields of the Craft are at zero hitpoints. File extension not required.

shielddown = "shield_dom_down"

ShieldAdd

String, Default: "shield_add.sod" renamed from Wshldadd.sod

Determines the model used to display the shield animation when a EnergyShieldConverter Ordnance is used on this Craft. File extension not required.

ShieldSub

String, Default: "shield_sub.sod" renamed from Wshldinv.sod

Determines the model used to display the shield animation when a ShieldInversion Ordnance is used on this Craft. File extension not required.

ShieldSpecial1

String, Default: "Wcorbrfr.sod"

Determines the model used to display the shield animation when a ReflectWeapon Weapon is used on this Craft. File extension not required.

ShieldSpecial2

String, Default: "Wshldrmd.sod"

Determines the model used to display the shield animation when a ShieldRemodulation Ordnance is used on this Craft. File extension not required.

ShieldSpecial3

String, Default: "Wmanhiem.sod"

Determines the model used to display the shield animation when a ManheimEffect Ordnance is used on this Craft. File extension not required.

ShieldSpecial4

String, Default: "WEclairlink1.sod"

Determines the model used to display the shield animation when a ClairvoyantLink Ordnance is used on this Craft. File extension not required.

shieldHitCritical

String, Default: "shield_hit.sod" renamed from Xshldx01.sod

Determines the model used to display the shield animation when the shields of the Craft are below 20%, but not zero hitpoints. File extension not required.

shieldhitcritical = "shield_dom_hitcritM"

buildableByOwnerRaceOnly

Boolean, Default: FALSE ???

When set to true (1), the Craft may only be built by the faction it belongs to. This affects the build buttons of the craft as well, which will not be displayed if the command is true.

removed in 3.2.6

requiredAlliedRace

String, Default: Null

Expects the name of the faction as input in the {race}.odf. This determines if the unit can only be built when the player's faction is allied with the required allied faction.

requiredAlliedRace = "borg"

removed in 3.2.6

createFootprint

Boolean, Default: TRUE

Only works for stations. When set to false (0) the command overwrites footprint creation.

destroyFootprint

Boolean, Default: TRUE

Only works for stations. When set to false (0), when a station is destroyed its footprint remains.

destroyMeWithResearchStation

Boolean, Default: TRUE

When set to false (0), the Craft will not be destroyed along with the ResearchStation if the Craft is being used as a pod. This can be used to prevent research from being lost when the station is decommissioned / destroyed.

Note that this can also be used to prevent ResearchPods built by other types of Producers from exploding upon completion.

avatarBoxIcon

String, Default: Null

Used so you can put the avatar sprite on the GUI when the Craft was built or otherwise appeared. Once the Craft appears in-game, the avatar sprite will not disappear even if the Craft is lost. Only one avatarBoxIcon can be displayed at a time.

avatarBoxIcon = "doca_icon"

avatarBoxTooltip

String, Default: Null

Sets the tooltip for the avatarBoxIcon when hovering the cursor over it. Dynamic_Localized_Strings.h file can be used to save space and store longer tooltips.

worthXP

Float, Default: 0.0

Determines the amount of experience this Craft gives to the unit that destroyed it. Does not spillover to the next rank if a Craft ranks up. Also determines the weighting of a Craft for the Admiral's Log.

nextRankXP

Float, Default: 0.0

The amount of experience required by the Craft to be replaced into its next rank.

nextRankClass

String, Default: Null

Determines the Craft that it replaces into when replaced into its next rank. Does not require .odf extension.

nextrankclass = "dom_heavy_cruiser_romr2"

originalClass

String, Default: Null

This is used for selection: when you double click on a qualifying ship (one with this command present or the craft that this command lists) any ships with the same originalClass name (either the ODF name, or the name listed in the command) are treated the same for selection purposes. This makes double-clicking across ranks possible.

originalclass = "dom_heavy_cruiser_rom"

XPlevel

Integer, Default: Null

The current experience level of the Craft: the base level should be set to 1. If XPlevel is not set, the Craft cannot level up.

Also used to determine which rank icon to display when the Craft levels up.

XPlevel = 1

allowBuildQueuePop

Boolean, Default: TRUE

When set to false (0), the owner craft cannot be cleared from the build queue. Used for the starting units for each faction in Fleet Operations.

showChoiceDialog

Boolean, Default: FALSE

When set to true (1), the GameObject displays the CommandInfoBar dialog (GUI). This dialog may be linked with other weapons by using the sprite files, such as in Fleet Operations where it is used to bring up the Avatar Button selection.

fleetCapFile

removed in 3.2.6

Fleet Cap Files use this unit. Requires .odf file extension.

specialEnergyDisplayMode

Integer, Default: 0

0 = Display as a percent.
1 = Display as remaining energy over the maximum. Example: 131/144
2 = Display as * when full or as remaining time until reloaded.

*If the specialEnergyDisplayMode on a craft is set to 2, then instead of hardcoded text ('Ready') two variables for the dynamic localized strings are used. These are GUI_SD_SPE_READY (used when energy is full) and GUI_SD_SPE_EMPTY (used when maxSpecialEnergy = 0).

overlaySod

String, Default: Null

Indicates the SOD that is displayed around a craft. In Fleet Operations this is used to show the shuttle animations around buildings for instance.

overlaysod = "fed_s_shuttlesL"

IamGameToTheDeathCondition

Boolean, Default: TRUE

When set to false (0), the destruction of this Craft is not needed to end the game.

constructionVoice

Integer, Default: 0

Determines which hardcoded event labels to use when the Craft begins construction, finishes construction, or when construction is cancelled:

0 = Default: the default event that is used. See below*
1 = ShipConstructionBegin, ShipConstructionComplete, ConstructionCancelled
2 = FacilityConstructionBegin, FacilityConstructionComplete, ConstructionCancelled
3 = ResearchBegin, ResearchComplete, ResearchCancelled
4 = ShipUpgradeBegin, ShipUpgradeComplete, ShipUpgradeCancelled
5 = Empty (no event)

*More information on hardcoded event labels and their requirements can be found on the Sound Editing page.

turnToFire

Boolean, Default: TRUE

When set to false (0), Craft with weapons will not turn to face enemy Craft when idle, when given an attack order, or when in combat (when within existing weapons range for the latter two).

Note that this command is used even by Craft that have weapons which cannot normally target other Craft (such as Freighter MiningBeams). If the command is true, these types of Craft will turn to face any nearby opponents when idle.

canShipyardRepair

Boolean, Default: TRUE

When set to false (0), Craft cannot be repaired at a Shipyard.

perceivedNeutral

Boolean, Default: FALSE

When set to true (1), Craft are treated as if they are in Team 0 (perceivedTeam = 0) and are not automatically fired upon by human players or the AI. The Attack cursor is not displayed when hovering over the Craft: to fire on the Craft, the player must use the Attack command / hotkey.

Note that a CannonImp Weapon with usePrimaryTarget = 0 will be unable to ever fire on a Craft that is perceivedNeutral.

autoExpireTime

Float, Default: 0

When the value is set to 0 (seconds), nothing happens at all. If a time is set, the Craft simply vanishes after the specified time. Things like temporary upgrades and automatic sensor stations that disappear are made possible.

eventSelectEasyCombat

String, Default: Null

The event that is played when the Craft is selected while in a fight against inferior opponents. How the Craft decides it is in SelectEasyCombat is as follows:

AttackPowerRatio = combatSituation.enemyAttackPower / (combatSituation.friendlyAttackPower + craft.attackPower)

If AttackPowerRatio is below 0.6, then SelectEasyCombat is used. AttackPower is the Craft command.

eventSelectCombat

String, Default: Null

The event that is played when the Craft is selected while in a balanced fight. How the Craft decides to use SelectCombat is as follows:

AttackPowerRatio = combatSituation.enemyAttackPower / (combatSituation.friendlyAttackPower + craft.attackPower)

If AttackPowerRatio is above 0.6 and below 1.5, then SelectCombat is used. AttackPower is the Craft command.

eventSelectHardCombat

String, Default: Null

The event that is played when the Craft is selected while in a tough fight. How the Craft decides it is in SelectHardCombat is as follows:

AttackPowerRatio = combatSituation.enemyAttackPower / (combatSituation.friendlyAttackPower + craft.attackPower)

If AttackPowerRatio is above 1.5, then SelectHardCombat is used. AttackPower is the Craft command.

eventRepairCombat

String, Default: Null

The event that is played when the Craft is ordered to repair while in combat.

eventSelectAfterCombat

String, Default: Null

The event that is played when the Craft is selected within 60 seconds after combat.

eventMoveFleeCombat

String, Default: Null

The event that is played when the Craft is given a movement command that exceeds 500 units.

weaponXiconpos

Determines the location of icons on the wireframe that are used to indicate weapons / abilities. The X must correspond to the weaponX value.

The first number determines how far along the X-axis it is placed: the higher the number, the further to the right the icon is. The second number determines how far along the Y-axis it is placed: the higher the number, the further the icon moves up. 50 is in the center of the Y-axis. (50 50 is centered)

If systemicon_default is defined in the sprite files, if the sprite files do not define an explicit icon, Fleet Operations will use the listed default(s).

A maximum of 32 icons may be used per unit.

weapon1iconpos = 65    28

rankupDilithium

Float, Default: 0.0

The amount of dilithium gained by the Craft (and put into the player's pool) when it has destroyed a unit.

rankupLatinum

Float, Default: 0.0

The amount of tritanium / latinum gained by the Craft (and put into the player's pool) when it has destroyed a unit.

rankupMetal

Float, Default: 0.0

The amount of Collective Connections / metal gained by the Craft (and put into the player's pool) when it has destroyed a unit.

rankupCrew

Integer, Default: 0

The amount of crew gained by the Craft (and put into the player's pool) when it has destroyed a unit.

rankupBiomatter

Float, Default: 0.0

The amount of supply / biomatter gained by the Craft (and put into the player's pool) when it has destroyed a unit.

recycleDilithium

Float, Default: 0.0*

The amount of dilithium returned to the player when the Craft is decomissioned.

*If no Craft recycling costs are defined (recycleDilithium, recycleMetal, recycleLatinum, and/or recycleBiomatter cannot even be present in the ODF) the Shipyard dilithiumRecyclingFraction or Faction Configuration recycleDilithiumFraction is used.

recycleMetal

Float, Default: 0.0*

The amount of Collective Connections / metal returned to the player when the Craft is decomissioned.

*If no Craft recycling costs are defined (recycleDilithium, recycleMetal, recycleLatinum, and/or recycleBiomatter cannot even be present in the ODF) the Shipyard metalRecyclingFraction or Faction Configuration recycleMetalFraction is used.

recycleLatinum

Float, Default: 0.0*

The amount of tritanium / latinum returned to the player when the Craft is decomissioned.

*Stock Armada II has no latinum recycling commands. Crew also has no commands, however crew is recycled as the current amount aboard the Craft.

recycleBiomatter

Float, Default: RTS_CFG.h BIOMATTER_RECYCLE_FRACTION command

The amount of supply / biomatter returned to the player when the Craft is decomissioned.

recycleTime

Float, Default: buildTime * deconstruct_percent_time (RTS_CFG.h command)

The length of time the Craft takes to decomission.

canRepairshipRepair

Boolean, Default: TRUE

When set to false (0), the Craft cannot be repaired by a RepairShip.

preferredSelect

Boolean, Default: TRUE

When set to false (0) for some Craft, if you box select a group of units, the Craft that have this command set to 1 will be selected preferentially and the Craft with the command set to 0 will not be selected.

destroyedDilithiumCost

Float, Default: 0.0

The amount of dilithium that is deducted from the player's dilithium pool when the Craft is destroyed or captured. If resources are at zero, it will fail to deduct.

destroyedCrewCost

Integer, Default: 0

The amount of crew that is deducted from the player's crew pool when the Craft is destroyed or captured. If resources are at zero, it will fail to deduct.

destroyedMetalCost

Float, Default: 0.0

The amount of Collective Connections / metal that is deducted from the player's metal pool when the Craft is destroyed or captured. If resources are at zero, it will fail to deduct.

destroyedLatinumCost

Float, Default: 0.0

The amount of tritanium / latinum that is deducted from the player's tritanium pool when the Craft is destroyed or captured. If resources are at zero, it will fail to deduct.

destroyedBiomatterCost

Float, Default: 0.0

The amount of Supply / Biomatter that is deducted from the player's supply pool when the Craft is destroyed or captured. If resources are at zero, it will fail to deduct.

beneficialBuild

Boolean, Default: FALSE, Pair Array

When the craft is built by a station constructor, next to the objects defined here, the placement indicator will turn blue instead of green (blue = planet placement indicator). This is visual only.

Note that beneficialBuild functions currently only work with player owned GameObjects, and not with allied, enemy, or neutral GameObjects.

Does not require .odf file extension.

The AI will build Craft with this command only within the beneficialBuildRadius.

beneficialbuild = 0
    "rom_singularitytrans.odf" 1
    "rom_singularitytransZ.odf" 1

beneficialBuildRadius

Float, Default: 300.0

The area within which beneficialBuild defined objects turn placement indicators blue ('beneficial').

The AI will build Craft with beneficialBuild only within the beneficialBuildRadius.

beneficialBuildForce

Boolean, Default: FALSE

When set to true (1), the object can only be built within the radius of gameObjects defined by 'beneficialBuild'.

Note that the AI will be unable to build a unit with this command.

freighterSize

Integer, Default: 1

For the AI only. Sets the "size" of the Freighters (defined by the same ODF) to determine how many may fit into the number of Freighters specified by the configuration AIFreightersPerMoon ODF command.

For instance, if AIFreightersPerMoon = 5 and freighterSize = 2, two Freighters of this ODF type may be used to mine a resource object (5 / 2 = 2, as the AI cannot deal with non-integers). If there are more than two types of Freighters present, 5 is still the maximum number of total Freighters per resource object.

giveIsAllowed

Boolean, Default: TRUE

When set to false (0), the Craft cannot be given to another Player via the in-game Communications Menu (if the Game Setup options allow giving units).