Freighter

Defines a Craft which may mine Resource objects. Important ODF commands for this class: resourcesCanHandle.

Freighters have a resource bar (and text labels) that displays the amount and type of resources that are currently carried by the Craft (resources that the Freighter mined). If a Resource object is depleted (gives zero resources), the Freighter will search out other non-depleted Resource objects of the same resource type on the map regardless if the player has scouted them. Note that Freighters cannot harvest from Planets that have PlanetMiningBases.

Amount of resources mined from a Resource object for every second the MiningBeam is active is determined by: lifeSpan (of the MiningBeam Ordnance) * miningRate.

classlabel = "freighter"

Stock ODF Commands

maxDilithium

Float, Default: 0.0

The maximum amount of dilithium the Freighter can carry.

maxLatinum

Float, Default: 0.0

The maximum amount of latinum / tritanium the Freighter can carry.

maxMetal

Float, Default: 0.0

The maximum amount of metal / Collective Connections the Freighter can carry.

maxBiomatter

Float, Default: 0.0

The maximum amount of supply / biomatter the Freighter can carry.

explosionUnitsPerLatinum

Float, Default: ~3

Determines the radius of the Explosion shockwave resulting from the Freighter's destruction (while carrying latinum) for every additional unit of latinum that is carried if the Craft selfDestruct ODF command is defined.

Note that since shockwaves deal damage over time as they expand, the increased size of the shockwave results in a proportionally increased amount of damage.

speedFractionCarryingLatinum

Float, Default: ~0.3

Modifies the impulseSpeed of the Freighter while it carries latinum by this fraction (1.0 = 100%).

latinum_spray_hardpoint

String, Default: Null

Defines the hardpoint on the GameObject's model where the latinum spray will come from. The model must have the appropriate hardpoint.

latinum_spray_hardpoint = hpxx

latinum_spray_emitter

String, Default: Null

Defines the emitter type (a sprite entry) to use for showing the spray when carrying latinum / tritanium.

latinum_spray_emitter = "latinum_spray"

weaponIndexForShips

Integer, Default: Null

When defined the command causes the Freighter to use a mining cursor when targeting enemy Craft. Used in Armada II to make the resourceExtractionBeam have a mining cursor icon when attacking other Craft.

When defined it also determines attack priorities: the AI will not attack enemy Craft and if the Player gives the Freighter a mining command it will not attack enemy Craft.

Note that if the Freighter has two weapons in order which are mining weapons (X and Y), the Freighter will briefly fire its first weaponX mining weapon at enemy Craft when weaponIndexForShips = X.

Note that the game will crash if the Freighter is given an Attack command when weaponIndexForShips is set to the same integer as the highest weaponX value.