GameObject

GameObject is the basic classlabel for game object ODFs (note however that if you set an ODF's classlabel to GameObject, the ODF will crash the game). The commands available for the GameObject classlabel are inherited by all game objects that are subclasses of a game object. For instance, Craft has all the commands that GameObject has, and CargoShip has all commands that Craft has, etc.

A game object is any unit. Game objects may use and carry weapons. Game objects may also be specified by some Ordnance classlabels and thereby spawned in-game.

Classlabels

Commands

Stock ODF Commands

race

String, Default: Null

Determines which race (a relay to the Faction configuration name ODF command) the GameObject belongs to and thus sets the global attributes of the GameObject. TerrainObjects seemingly do not require this command, although it will change their race identification in the Map Editor.

NPC CargoShip and Scavenger types must use a race that cannot be selected by a Player in order to function correctly. If an NPC Scavenger has an invalid race, it will cause a crash when a Craft loses engines or reaches zero crew.

Note that for Craft the game will crash if the command is invalid (it must refer to one of the factions defined in the game) if placed via the Map Editor. Doesn’t crash immediately otherwise, but will cause a crash when you view the Admiral’s Log.

baseName

String, Default: Null

Expects a SOD model file as an entry. This is the model used for a GameObject. When the SOD name is set to "dlight", a directional light is created.

This defines an alternate SOD file to use. e.g. basename = "fed_intrepid" will use the fed_intrepid model for that ODF. It will also use the build button and ship images associated with fed_intrepid.

Thus if fed_intrepidZ.odf uses baseName and then tries to add a buildbutton entry b_fed_intrepidZ this will do nothing as the game is now looking for b_fed_intrepid

dilithiumCost

Float, Default: 0.0

The amount of dilithium required to build the GameObject. Note that the AI may not build structures with a negative cost. Negative values add to the player's resource pool.

latinumCost

Float, Default: 0.0

The amount of tritanium / latinum required to build the GameObject. Note that the AI may not build structures with a negative cost. Negative values add to the player's resource pool.

metalCost

Float, Default: 0.0

The amount of Collective Connections / metal required to build the GameObject. Note that the AI may not build structures with a negative cost. Negative values add to the player's resource pool.

officerCost

Integer, Default: 1

The amount of officers required to build the GameObject. As long as the GameObject exists, the officerCost is deducted. Once the GameObject is removed, the officers are returned to the player's officer pool.

Negative values reduce the current officer count, but do not affect the total officer pool. If the negative officerCost should result in the officer count going below zero, the current officer count will display a negative value equal to the Craft's cost (and briefly X+X[or Y] the Craft's cost, while another Craft of the same [X] or different type [Y] is being built), until a Craft is destroyed or created. A Craft costing a negative officerCost cannot be restricted by the officer pool.

crewCost

Integer, Default: 0

The amount of crew required to build the GameObject. This is also the initial crew complement of the GameObject when construction is complete if maximumCrew is not specified. If the GameObject does not have lifesupportHitpoints, but specifies a crew complement, the crew will die and the unit will become derelict.

Note that the AI may not use weapons with a negative cost. Negative values add to the player's resource pool. A Craft with a negative crewCost cannot be board or be boarded and will not display a crew complement.

Note that when on the Lots resource setting, if a GameObject that requires crew starts construction (in any form) and is then cancelled, the crewCost is still deducted from the Player's global crew resource .

biomatterCost

Float, Default: 0.0

The amount of supply / biomatter required to build the unit. Note that the AI may not build structures with a negative cost. Negative values add to the player's resource pool.

buildTime

Float, Default: 5.0 *

The amount of time in seconds required to build the unit. This also affects the amount of time required for vessel disassembling and recycling.

* If buildTime is present as an empty or invalid command, buildTime defaults to 0.

animation

Integer, Default: 0

If the GameObject has an animation built into its model, this determines how it shows up in Armada II.

0 = No animation
1 = Animation plays once from the last time increment
2 = Animation plays continuously
3 = Animation plays once and freezes on the last frame

Note that certain classes have a special default setting for their animations (which may conflict or override the above settings):

MiningStations (and TradingStations) will animate continuously when a Freighter / CargoShip is docked. The animation will reset when no Craft is docked.

Freighters will animate continuously when mining resources.

If allowed to animate upon decommission / repair, Shipyards (and Starbases, BuildYards) will animate once as a Craft enters to decommission / repair. If allowed to animate on build, the Shipyard will animate once when constructed, once when the Shipyard begins construction of a Craft, and once when that Craft completes construction.

ConstructionRigs animate once upon starting construction of a Craft and once upon completing (or cancelling) construction of the Craft.

weldingSpriteName

String, Default: "Xspark01"

Determines which sprite to use for the build animation sparks that move over the GameObject while it is being constructed or decommissioned by another GameObject. Does not require file extension.

weldingspritename = "8472beam"

weldingSpeed

Float, Default: 1.0

Modifies the speed at which the build animation sparks move over the GameObject while it is being constructed or decommissioned by another GameObject (the larger the value, the faster the sparks fly over the model).

weldingAnimSpeed

Float, Default: ???

unused/untested - doesn't change anything to do with objects build in Shipyard...how fast the flash goes?

weldingRadius

Float, Default: 1.0

This is the size of the build animation sparks that move over the GameObject while it is being constructed or decommissioned by another GameObject.

maxHealth

Float, Default: 0.0

Sets the hitpoints of the GameObject when it has been produced and its maximum amount of hitpoints. When the GameObject can have shields, maxHealth specifies the amount of hitpoints for the shields and those for the hull (the hitpoints are not divided between the two). When maxShields is specified for Craft GameObjects, maxHealth only determines the GameObject's hull hitpoints when it is constructed and its maximum amount of hull hitpoints. Note that a GameObject will not explode if it has zero maxHealth.

Note that LatinumNebulae and Scrap have special behavior associated with maxHealth, which is detailed in the respective classlabels.

maxSpecialEnergy

Integer, Default: 0

The maximum amount of Special Energy of the GameObject. This is also the amount of Special Energy the GameObject spawns with.

Any negative value causes the Craft to spawn with 4294967296 energy. This value will not be displayed.

Note that if a GameObject gains more than 100% energy for any reason, the next time the unit uses a weapon of any type, the Special Energy will be reset to 100%.

shieldPad

Float, Default: 0.5

The value can be positive or negative. This command can be used to change the collision area of a vessel or station, but it also changes the radius of the shield bubble. Thus it is important not to make this value too small otherwise the shields will cut through what they should be defending. Collision avoidance is based on the shield bubble size and making this value too big can result in pathing issues as well.

shieldpad = 40

unitName

String, Default: Name of the ODF

Used for the GameObject's in-game tooltip. It is the name of the unit's class in the unit display window and in the Map Editor menu and the tooltip. Also used to display the technology requirements string.

The string is limited to 112 characters (a long string will extend off the screen however).

Note that unitName text entered into the ODF directly will appear in a single row on-screen regardless if the text is entered in multiple rows.

unitname = "Remore Class"

hotkeyLabel

String, Default: Null

Refers to the GameObject's hotkey as specified in the input.map file. Cannot have spaces between letters.

hotkeylabel = "GAME-HOTKEY-H"

tooltip

String, Default: Null

The first tooltip displayed (replaces unitName when hovered). In Fleet Ops this is not used actively (and thus always has the same name as unitName). The Dynamic_Localized_Strings.h file can be used to save space and store longer, more complex tooltips.

Note that tooltip text entered into the ODF directly will appear in a single row on-screen regardless if the text is entered in multiple rows.

tooltip = "Remore Class"

verboseTooltip

String, Default: Null

Longer description of the GameObject that pops up when the GameObject is hovered for longer. Appears below the tooltip. The Dynamic_Localized_Strings.h file can be used to save space and store longer, more complex tooltips.

Note that tooltip text entered into the ODF directly will appear in a single row on-screen regardless if the text is entered in multiple rows.

label

String, Default: Null

Overwrites the Map Editor menu unitName of the unit with this entry. Used for hero ships to assign a name used in script files.

ambientSound

String, Default: Null

Limited to <32 characters (31 characters).

The sound file that is played when within the range of the owner GameObject. Ambient sounds loop constantly. Requires file extension.

ambientMinimumFactor

Float, Default: minimumDistance3D in audio.odf ?

Modifies the minimum distance for ambientSound attenuation (in the audio.odf relay) to begin. Everything within the minimum distance is played at full volume.

ambientMaximumFactor

Float, Default: maximumDistance3D in audio.odf ?

Modifies the maximum distance for ambientSound attenuation (in the audio.odf relay) to reach zero. Everything further from the maximum distance is played at zero volume.

aiName

String, Default: Null

Sets the GameObject's AI to fit a function specified by the classlabel. When the aiName is not specified for Craft and its child classlabels, these units will be uncommandable. Note that the aiName processes are case sensitive! AI processes cannot be combined.

All processes are based on CraftProcess, since the other processes modify Craft behavior slightly and pass the rest of the functions to CraftProcess. Thus, the classlabel and aiName are not bound to each other in all cases, although specific functions may be lost when paired with the incorrect classlabel (and crashes may ensue). For instance, "CraftProcess" can be applied to the "fighter" classlabel, although FighterProcess grants the cool Cloverleaf maneuvers.

aiName AI Process Functions Compatible Classlabels
"CargoShipProcess" All aspects of trading "cargo_ship"
"ColonyShipProcess" All aspects of colonizing "colony"
"CraftProcess" All Craft functions "craft", "fighter"
"FighterProcess" Cloverleaf maneuvering "fighter", "craft"
"MineProcess" Seek and destroy "minearray"
"MissileProcess" See Craft missileDetonator for more information "craft": all children as long as missileDetonator ODF command is valid
"RepairShipProcess" Using a repair weapon "repairship"
"SalvageProcess" Seeks out derelicts, spawns from off-map "scavenger"
"StarbaseProcess" Build queue handling, but disables special weapons autonomy: e.g., CraftProcess handles queues wrong: cancelling the first item freezes the queue until cleared or an item is added all structures
"TraderProcess" Trades with TradingStations, spawns from off-map "cargo_ship"

collisionRadius

Float, Default: ???

unsused command in Armada 2 odfs. ***Appears to have no function in A2 or FO.

mapSize

Integer, Default: 1

Modifies the size of the mapSprite as a factor of its size as defined in the sprite files.

mapSprite

String, Default: TeamColor pixels scaled to model size

Determines the sprite that represents the GameObject on the minimap. MapSprites scale with the size of a map (on a larger map the mapSprite will appear smaller and vice versa).

A mapSprite is not hidden by the Fog of War ever (still hidden by Shroud). Does not require file extension.

mapIcon

String, Default: TeamColor pixels scaled to model size

Determines the sprite that represents the GameObject on the minimap. MapIcons remain at a constant size regardless of the size of the map.

A mapIcon is hidden by the Fog of War until explored by the player for the first time. Does not require file extension.

avoidMe

Boolean, Default: TRUE

When set to false (0), the GameObject will be treated as empty space. All units will pass through it rather than try and go around.

Note that it may be necessary to have avoidMe = 0 for modular Craft that have a repairHardpoint (otherwise repairing Craft may bump into the station instead of going into the repair queue).

Note that this command is important in allowing moveable ResearchStations to build pods without experiencing movement issues.

moveBelowCombatArea

Boolean, Default: FALSE

When set to true (1), if the GameObject is constructed by a ConstructionRig, it is built X units below the map grid, where X is equal to the SHIP_COMBAT_FLOOR set in the RTS_CFG.h file. This cannot be changed with shift keys and this cannot be changed by distanceBelowGrid.

When set to true, if the GameObject is constructed by a Producer and distanceBelowGrid is defined, units will be constructed at that depth / height and initial move orders will occur at that depth (but can be changed). Any starting units with these commands will be initially placed at this depth / height as well. ResearchPods ignore these commands and are built on the ResearchStation's hardpoints directly. TerrainObjects will be placed at the indicated depth when added via the Map Editor.

distanceBelowGrid

Float, Default: 0.0

If using a positive value, this is the distance the GameObject is placed below the zero plane of the map grid in the Y axis when moveBelowCombatArea = 1. A negative value sets the Y axis value above the plane. See moveBelowCombatArea for more information.

avoidanceClass

Integer, Default: 1000

note: how does that work???

Maximum value seems to be 1000 as used on AsteroidField class by default.

hidden

Boolean, Default: FALSE

When set to true (1), the GameObject can neither be targeted (passively or actively) nor selected, although it still uses its AI to fire any weapons it might have.

The GameObject is not visible (either on the minimap display or on the screen) except when in the Map Editor. Used for dlight.odf .

weaponX

String, Default: Null

Defines the weapon the GameObject carries. Each weaponX reference must correspond to its weaponHardpointsX designation and no entries should be missed (if the first X entry is missed no weapons will fire). An invalid (misspelled) weaponX string will cause Armada to crash.

The first X entry must be 1. Does not require .odf extension.

weapon1 = "fedW_intrepidY1"

Note, when making weapons, by replacing the ODF name with NULL the weapon will be cleared. This must be placed at the end of the list you are clearing. For instance, if you are using the #include instruction to combine commands from separate ODFs, and you do not want a particular parent ODF weapon to show up in the child ODF setting the child to weaponX = NULL will clear the weapon

weapon4 = "8472_make_veteran" // ParentODF: Allows the vessel to become a veteran by pushing the "Make Veteran" button

weapon4 = NULL // ChildODF: The "Make Veteran" button is not displayed

weaponHardpointsX

String, Default: Null

Defines the hardpoint on the GameObject's model where the Weapon will fire the Ordnance from. The model must have the appropriate hardpoint and each X must be in ascending order, with no entries missed (if the first X entry is missed, and a weaponX is defined, no weapons will fire). WeaponHardpointsX must correspond with the weaponX it belongs to. The first X entry must be 1.

If the Weapon does not fire an Ordnance (such as the ReflectingWeapon or SeparatingWeapon) and thus does not require a hardpoint to fire from, this command does not need to be defined.

weaponhardpointsX = hpxx // Most modelers name their hardpoints "hp" for consistency.

Note that if no hardpoints are defined, yet each weaponX has a corresponding weaponHardpointsX command listed in the ODF, other weapons will work correctly (just not the one defined by X).

scaleSOD

Float, Default: 1.0

Modifies the size of the GameObject by this percent. A SOD model with animations will become distorted.

When using scaleSOD on some models, they may appear of a different size when in cinematic (strategic) view, as compared to normal top-down view. To fix this, simply set the following command in the RTS_CFG.h file to 1.00:

// What's the maximum strategic view scale factor?
float cfgMAX_STRATEGIC_VIEW_OBJECT_SCALE = 0.75;

COMBAT

Boolean, Default: FALSE

Used as a relay for the Commands configuration files. When set to true (1), the GameObject's Attack Command is displayed and useable. If set to false (0), the GameObject cannot be commanded to attack particular targets, although it will attack targets on its own.

Note that this command overrides the Craft canAttack ODF command: when COMBAT = 0, canAttack is always false.

SHIP

Boolean, Default: FALSE

Used as a relay for the Commands configuration files. When set to true (1), the GameObject's Formations and Orders menus are displayed and the latter's are useable. The AI Commands menu is not made visible. Commands unspecified by boolean options here are displayed and useable.

FACILITY

Boolean, Default: FALSE

Used as a relay for the Commands configuration files. When set to true (1), the GameObject's Recrew Command is displayed and useable (when not under attack for at least 10 seconds): HAS_CREW must be true (1) to display the Recrew Command. Commands unspecified by boolean options here are displayed and useable.

ALERT

Boolean, Default: FALSE

Used as a relay for the Commands configuration files. When set to true (1), the GameObject's Formations and AI Commands menu and the latter's nested Alert Commands are displayed and useable.

TRANSPORTER

Boolean, Default: TRUE

Used as a relay for the Commands configuration files. When set to false (0), the GameObject's Transport Command is displayed and useable. Does not affect whether enemy / friendly units may transport to this vessel.

SELF_DESTRUCT *

Boolean, Default: FALSE ???

Used as a relay for the Commands configuration files. When set to true (1)...

appears to be unused in commands configuration....

BUILDER_SHIP

Boolean, Default: FALSE

Used as a relay for the Commands configuration files. When set to true (1), the GameObject's Build Options button is displayed if available. Provides the Rally Point command (when SHIP = 0).

BUILDER_FACILITY

Boolean, Default: FALSE

Used as a relay for the Commands configuration files. When set to true (1), the GameObject's Build Options button is displayed if available.

MINER

Boolean, Default: FALSE

Used as a relay for the Commands configuration files. When set to true (1), the Freighter's Mine Command is displayed and useable.

SPATIAL_OBJECT

Boolean, Default: FALSE

Used as a relay for the Commands configuration files. When set to true (1), the GameObject loses the gamut of the command pallet (and thus cannot be given any orders of any sort).

HAS_RESOURCE

Boolean, Default: FALSE

Used as a relay for the Commands configuration files. When set to true (1), GameObjects with Miner = 1 can use the hotkey for Harvest while hovering your cursor over the target. If the target GameObject has resources the unit will attempt to mine from it. If the target GameObject does not have resources, this action will cause the unit to seek out the nearest valid Resource object.

HAS_HITPOINTS

Boolean, Default: FALSE

Used as a relay for the Commands configuration files. When set to true (1), GameObjects will attack other units when selecting the hotkey for Attack while hovering your cursor over the target (friend or foe). If set to false (0) for a target, when selecting the hotkey for Attack when hovering over the target, the GameObject will not attack it until clicking the target.

HAS_CREW

Boolean, Default: FALSE

Used as a relay for the Commands configuration files. When set to true (1), the GameObject will display the Recrew command and may Recrew if FACILITY = 1. If set to false (0) for a friendly transport target (or a hostile target with no shields), when selecting the hotkey for Transport to transport on this vessel it will not automatically begin transporting, but will require you to click on the target (when hovering your cursor over the target).

RESEARCH

Boolean, Default: FALSE

Used as a relay for the Commands configuration files. When set to true (1), the GameObject's Research menu is displayed and useable (overwrites the Build menu if present).

CARGO_SHIP

Boolean, Default: FALSE

Used as a relay for the Commands configuration files. When set to true (1), the CargoShip's Trade menu and nested Trade Commands are displayed and useable.

TRADE_STATION

Boolean, Default: FALSE

Used as a relay for the Commands configuration files. When set to true (1), the TradingStation's Trade menu's nested Trade Commands are displayed and useable. Buying or selling resources is hardcoded at 70% efficiency, with 100 units being standard fare (100 units of X sold to receive 70 units of Y, 100 units of Y bought for 143 units of Z)

COLONY_SHIP

Boolean, Default: FALSE

Used as a relay for the Commands configuration files. When set to true (1), the Colony's Colonize Command is displayed and useable. Selecting the hotkey for Colonize while hovering your cursor over the target will cause the Colony to begin colonization.

REPAIR_SHIP

Boolean, Default: FALSE

Used as a relay for the Commands configuration files. When set to true (1), the RepairShip's Repair-unit Command is displayed and useable. Selecting the hotkey for Repair while hovering your cursor over the target will cause the RepairShip to begin repairing.

PLANET

Boolean, Default: FALSE

Used as a relay for the Commands configuration files. When set to true (1), the GameObject's Decomission Command is not displayed or useable and the GameObject also cannot be sent to a Shipyard to repair.

EVOLVE

Boolean, Default: FALSE

Used as a relay for the Commands configuration files. When set to true (1), the GameObject's Evolve menu is displayed and useable (overwrites the Build menu if present).

ASSAULT

Boolean, Default: FALSE

Used as a relay for the Commands configuration files. When set to true (1), the GameObject's Assault Transport Command is displayed and useable.

Special Weapons Autonomy allows the Assault unit to automatically attempt to board nearby shieldless enemy vessels.

SHOW_SW_AUTONOMY

Boolean, Default: TRUE

Used as a relay for the Commands configuration files. When set to true (1), GameObject may utilize special weapon autonomy and the buttons are displayed if available.

SHOW_MOVEMENT_AUTONOMY

Boolean, Default: FALSE

Used as a relay for the Commands configuration files. When set to true (1), GameObject may utilize movement autonomy and the buttons are displayed if available.

CAN_REPAIR

Boolean, Default: TRUE

Used as a relay for the Commands configuration files. When set to false (0), the GameObject's Repair Commands are displayed and useable.

RECYCLER

Boolean, Default: FALSE

Used as a relay for the Commands configuration files. When set to true (1), the Shipyard's Recycle Commands (Dilithium into Metal and Metal into Dilithium buttons) are displayed and useable.

Ratio of recycling is set by the Shipyard recycleExchangeRate ODF command.

CAN_GUARD

Boolean, Default: TRUE

Used as a relay for the Commands configuration files. When set to false (0), the GameObject's Guard Command is not displayed or useable. If true (1) and SHIP = 1 the Guard Command is available.

CAN_SANDD

Boolean, Default: FALSE

Used as a relay for the Commands configuration files. When set to true (1), the GameObject's Search and Destroy Command is displayed and useable.

CAN_EXPLORE

Boolean, Default: FALSE

Used as a relay for the Commands configuration files. When set to true (1), the GameObject's Search / Explore Command is displayed and useable.

SPECIES_MINE *

Boolean, Default:???

Used as a relay for the Commands configuration files. When set to true (1),

On fbattle.odf ... appears to be unused in commands configuration....

resource

String, Default: Null

Determines which resource object is used by this GameObject. This GameObject does not contain resources itself, but serves as a relay for the indicated object's Resource configuration file. Does not require .odf file extension.

When defined, the GameObject is also treated as having resources by Freighters: the Mining icon will be displayed over this GameObject and Freighters will circle the GameObject if given a Mine command.

resource = "map_dilithium_moon_res"

directorRadiusScale *

Float, Default: ???

comment from stock armada ODFs: Director radius scale. So the director zooms out a bit from it. Changes the 3d cam view???

Fleet Operations ODF Commands

ignoreInterface

Boolean, Default: FALSE

When set to true (1), an object cannot be selected by any method (including mining orders!), however the unit can still be attacked automatically. Used for the pre-Avatar selection starbase as well as fighters in Fleet Operations.

Does not work with any AreaEffectObject, BackgroundObject or AsteroidField GameObjects.

extraWeaponHardpoints

String, Default: first hardpoint listed in weaponsTargetHardpoints *

Even though the command states hardpoint>s<, only one hardpoint can be defined here to act as the default hardpoint if an extraweapon is added to a vessel.

extraWeaponHardpoints = "root"

* If the hardpoint is not valid, weapons which use an ordnance will not fire (they will still consume resources however).

invincible

Boolean, Default: FALSE

When set to true (1), the target can be fired upon, but will be undamaged.

ignoredAsTarget

Boolean, Default: FALSE

When set to true (1), the target is ignored by default, but you may still attack it as a player with an attack order (or with right-clicking). The Attack cursor is displayed when hovering over the Craft. Note "ignored" targets are not treated as "invalid" targets.

invalidAsTarget

Boolean, Default: FALSE

When set to true (1), the target is ignored by default, but you can still attack it as a player with an attack order (or with right-clicking), though the attacker will only shoot once. The Attack cursor is displayed when hovering over the Craft.

clearsFog

Boolean, Default: TRUE

When set to false (0), the unit will not clear the Fog of War (or the Shroud), regardless if the GameObject has working sensors (the unit behaves as if it does not belong to your team and so the sensors are completely non-functional).

As soon as a GameObject enters the Shroud or Fog of War via the player's command, the unit is deselected from the Player and cannot be selected by the Player until another craft reveals it.

selectHighlight

Boolean, Default: FALSE

When set to true (1), a unit's model will be highlighted (appear light colored) upon cursor selection. This was intended for the Klingon Field Yard, to more easiliy distinguish between the modules.

lightColor

Float, Default: 0 0 0, Array

The red, green, blue (RGB) color of glow color used which will emanate from the center of the GameObject and reflect off nearby GameObjects. Three float values between 0.0 and 1.0 .

lightcolor = 0.9 0.2 1.0

lightFalloffStart

Float, Default: 100.0

How far from the center of the GameObject before the intensity of lightColor begins to drop off.

lightFalloffRange

Float, Default: 5.0

How far from lightFalloffStart before intensity of lightColor is zero (at lightFalloffStart + lightFalloffRange the intensity of the light is zero).

priorityBuild

Boolean, Default: FALSE

When set to true (1), if this GameObject is added to a build queue it will be placed immediately after the first actively building GameObject in the build queue. If the build queue is full, it will remove the last object to make space. In Fleet Operations this is used for the Halt Construction button.

footprintAligned *included in v4.0

Boolean, Default: FALSE

When set to true (1), a station gets "auto aligned" when built through a ConstructionRig. Consequently, when being placed, the station will snap to the grid rather than be placed anywhere (thus allowing the station to always take up a defined number of grid spaces).