Ordnance

Ordnance is the basic classlabel for ordnance ODFs (note however that if you set an ODF's classlabel to Ordnance, the ODF will crash the game). The commands available for the Ordnance classlabel are inherited by all ordnances that are subclasses of an ordnance. For instance, Phaser has all the commands that Beam has, and Unibeam has all commands that Phaser has, etc.

Weapons specify ordnances. Ordnances cannot be used except by a weapon. Some ordnances can spawn game objects.

Classlabels

Commands

Stock ODF Commands

shotGeometry

String, Default: Null

The model that is used for the ordnance. No file extension required.

Note that only specific Ordnance classlabels may use this command. This is specified on the appropriate class pages.

shotInfo

String, Default: Null

The event that is played when the ordnance hits its target.

lifeSpan

Float, Default: infinite

For non-Beam Ordnances, this is the maximum length of time in seconds that the ordnance lasts before hitting a target. If less than the time it takes to hit the target the Ordnance will not deal any damage.

If these ordnance misses the target, this is also the amount of time that it stays in-game before disappearing.

Beam Ordnances obey BEAM_MISS_LIFETIME command when missing a target and ignore any lifeSpan-shotSpeed interaction when they miss (described below).

For some Beam Ordnances lifeSpan modifies the speed of the shot by the following equation: ObservedShotSpeed = ~16200 * [(lifeSpan) ^ (-1)]. Consequently, a Beam with a lifeSpan of 10 will hit its target four times faster than a Beam with a lifeSpan of 40. Most of these Beam Ordnances do their damage / effects at the end of lifeSpan when hitting a target. These exceptions are noted on the appropriate classlabel pages.

For other Beam Ordnances lifeSpan sets the length of time that the ordnance continues to fire on the target and does not affect the (hardcoded) shot speed or the gameplay effects of the ordnance. This is almost always a purely visual effect. These exceptions are noted on the appropriate classlabel pages.

shotSpeed

Float, Default: 0.0 *

The maximum speed of the ordnance. *Not all ordnances use a shotSpeed.

Note that Beam and BeamToggle Ordnances do not actively use this command (shotSpeed is hardcoded to ~16200).

Note that for some Beam Ordnances, the in-game shot speed can be modified by lifeSpan by the following equation: ObservedShotSpeed = ~16200 * [(lifeSpan) ^ (-1)]. This is noted on the appropriate classlabel pages.

specialEnergyCost

Float, Default: 0.0

The amount of special weapons energy used when the ordnance is fired. Works best when used by a special weapon (special = 1), see below:

Note that when used by a regular weapon (special = 0), if the owner Craft's rangeScan is longer than the Weapon range, when a target enters the Craft's rangeScan - but not the Weapon range - specialEnergyCost will be used, ignoring any shot delay (exception: AreaEffectCannon and AreaEffectMissile will obey shotDelay), until all energy is depleted. When configured as a special weapon some weapon classlabels require needTarget to be true or they will exhibit this behavior as well. EXCEPTION: A CannonImp always obeys the Ordnance specialEnergyCost ODF command, regardless of Craft rangeScan - Weapon range mismatch.

Note the special default behavior when using a NebulaGeneration, AgentSaboteur, PointDefenseLaser or OrdnanceDefenseWeapon Weapon.

Some ordnances use specialEnergyCost per second while the weapon is active. This is noted on the appropriate classlabel pages.

hitSound

String, Default: Null

The sound file played when an ordnance hits its target. Requires file extension.

damageBase

Float, Default: 0.0, Pair Array

Determines the base amount of damage dealt by this weapon.

Note that not all ordnance can deal damage directly. Of Beam Ordnance, only the Phaser / Unibeam and ClairvoyantLink can. Of BeamToggle Ordnance, only the AccelCannon and ResourceExtractionBeam can. Of Bullet Ordnance, only the PulsePhaser can. Of Mine Ordnance, only AntiMatterMine can. Of Missile Ordnance, only ChainPulsar, PlasmaCannon, PolaronTorpedo, ShieldRemovingTorpedo, Unitorpedo can. Other Ordnance that can deal damage are the RepulsionWave and BlackHoleCreator.

damageBase = 100
     "monsoon.odf" 50.5

damageVariance

Float, Default: 0.0, Pair Array

Sets the random variation in damage per shot as defined by damageBase plus or minus the damageVariance.

damageVariance = 10
     "monsoon.odf" 3
     "shrike.odf" 4.4

damageThreshold

Float, Default: 0.0, Pair Array

The damage threshold per shot which must be exceeded to cause crew casualties prior to shield exhaustion.

Note that this command is affected by the RTS_CFG.h SHIELD_DAMAGE_PROTECTION command and by the Craft shieldProtection ODF command: if the Craft is fully protected by its shields, damageThreshold will have no effect.

damageThreshold = 60
      "neghvarY.odf" 100

shieldCrewModifer

Float, Default: 0.0, Pair Array

The modifier, by which any damage which exceeds the damageThreshold is multiplied by, to calculate the fraction of crew lost with that hit.

The amount of crew that is killed is calculated by the following equation: ( damageBase - damageThreshold ) * shieldCrewModifier = percent of crew killed (1.0 = 1.0%)

Note that this command is affected by the RTS_CFG.h SHIELD_DAMAGE_PROTECTION command and by the Craft shieldProtection ODF command: if the Craft is fully protected by its shields, shieldCrewModifier will have no effect.

shieldCrewModifier = 0.2
       "outpostY.odf" 0.05

hullCrewModifier

Float, Default: 0.0, Pair Array

The modifier, by which any damage which is applied to the hull is multiplied by, to calculate the fraction of crew lost with that hit.

The amount of crew that is killed is calculated by the following equation: damageBase * hullCrewModifier = percent of crew killed (1.0 = 1.0%)

hullCrewModifier = 0.05
      "outpostY.odf" 0.03

shieldGeometryName

String, Default: Null - uses Hit and HitCritical

Determines which shield model is used on the targeted GameObject when the ordnance hits it for as long as there are shield hitpoints. Does not require file extension and will cause a crash if the extension is included.

The command is hardcoded to only accept the following filenames:

xshldx01
xshlddie
wshldadd
wshldsub
wcorbrfr
wshldrmd
wmanhiem
WEclairlink1

shieldDuration

Float, Default: ~1.0

The length of time in seconds that the shields of the target GameObject display their animation after being hit.

Note that a value of 0.0 is infinite.

ignoreShield

Boolean, Default: FALSE

Only affects visuals. When set to true (1) the shield impact visual will appear when the ordnance hits its target (provided that the shields are up).

If set to false (0), the shield impact visual will not activate when an ordnance hits a unit and the ordnance will appear to hit the hull.

sprite

String, Default: *crash

Determines which sprite is used for the ordnance.

Note that only specific Ordnance classlabels may use this command. This is specified on the appropriate class pages. *For these classlabels, it requires a valid entry or Armada will crash.

spriteDuration

Float, Default: ???

The amount of time in seconds it takes to go through the animation for the sprite (repeated until the ordnance is removed).

shotColor

**RGB? seems to do nothing

lodShift

???

Length

Float, Default: ~10.0

Modifies the length of the sprite ordnance.

Note that this command does not appear to affect Beam or BeamToggle Ordnances.

radius

Float, Default: <1.0

Modifies the radius of the sprite ordnance.

specialValue

Float, Default: 0.0

Sets ordnance specific characteristics - usually the length of time in seconds that an effect lasts for. Described in more detail on Ordnance pages.

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 ordnance 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 ordnance 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).

ord_light

I think this is just a scripting reference, not a command

forceInvalidateTarget

Boolean, Default: FALSE

When set to true (1), the target is ignored by default (while this ordnance is used on the target), but you can still attack it as a player with an attack order, though the attacker will only shoot once.

Note that this effect is most noticeable in weapons that can be toggled, as forceInvalidateTarget is considered active for the duration of the firing. If a beam-type ordnance, the lifeSpan command sets how long the target is invalidated while the beam is firing on it.

Fleet Operations ODF Commands

explosionSizeFactor

Float, Default: 2.0

Modifes the size of the explosion as follows: Radius * explosionSizeFactor = the size of the explosion or explosionSprite (1.0 =100%).

explosionDuration

Float, Default: 1.0

The length of time in seconds that the sprite explosion lasts for. Note that only works for sprites. *explain better, doesn't seem to work*

explosionSprite

String, Default: "Explosion1"

The sprite used for the explosion that occurs when the ordnance impacts the target GameObject. Does not require file extension. *explain better, doesn't seem to work*

explosionHit

String, Default: Null

The Explosion ODF used when a Beam or Missile Ordnance impacts the hull of the target GameObject. Does not require file extension.

explosionHit = "romW_beamdisruptorH"

explosionShieldHit

String, Default: Null

The Explosion ODF used when a Beam or Missile Ordnance impacts the shield of the target GameObject. Does not require file extension.

explosionshieldhit = "fedW_pulsephaserHS"

registerTargetHit

Boolean, Default: TRUE

When set to false (0), the ordnance impact is not registered as having hit the target craft. Craft hit by an ordnance normally are "pulled" to the attacker. When this command is false, Craft that are hit will not seek their attacker.

Note this command does not disable events triggering.