ReplaceWeapon

ReplaceWeapons are not affected by the techtree, except for their button.

Does not require an Ordnance file.

Does not obey firing arc restrictions.

The AI or special weapons autonomy cannot use this weapon unless the weapon is an instant replaceWeapon (replaceWeapon never interacts with AI processes).

Note that if special = 0 and the owner engages a target, the replaceWeapon will spawn classes at the target's root without respecting replacementInstantCycle or replacementInstantDelay.

classlabel = "replaceweapon"

Fleet Operations ODF Commands

replacementMode/replacementXClassY/replacementXCondition

Examples for these three commands:

Mode 0

replacementMode = 0 //Default. Direct vessel replace / separation mode
replacement0Class0 = "fed_akira" //With randomly one vessel ...
replacement0Class1 = "fed_galaxy" //...of this group AND...
replacement1Class0 = "kli_chorT" //...for separation, use a second group...
replacement1Class1 = "kli_vorcha.odf" //...so we get one Federation vessel, either an Akira or Galaxy class AND one of the Klingon vessels

Mode 1

replacementMode = 1 //Vessel faction based replace
replacement0Condition = "klingonempire" //If vessel is from "klingonempire" replace it randomly with
replacement0Class0 = "kli_chorT" //either this
replacement0Class1 = "kli_vorcha.odf" //or that vessel
replacement1Condition = "unitedfederation"
replacement1Class0 = "fed_defiant"
replacement1Class1 = "fed_sovereign"
replacement1Class2 = "fed_descent"

Mode 2

replacementMode = 2 //Vessel class based replace
replacement0Condition = "kli_brel" //If vessel is kli_brel replace it randomly with
replacement0Class0 = "kli_chorT" //either this
replacement0Class1 = "kli_vorcha.odf" //or that vessel
replacement1Condition = "kli_brel" //if vessel is kli_brel replace it randomly with
replacement1Class0 = "kli_chorT" //either this
replacement1Class1 = "kli_vorcha.odf" //or that vessel

Mode 3

replacementMode = 3 //Vessel replace based on vessel's specified map label, use only condition0

Mode 4

replacementMode = 4 //Vessel replaced into its next rank

Note that entries where NULL or LOUSYAPE has been defined are treated as empty by the replaceWeapon. These entries cause the weapon to abort and try to fire again until it finds a non-empty entry.

replacementKeepName

Boolean, Default: FALSE

If set to true (1), the replaced vessel keeps its prior name. Consequently, all units generated with the replaceweapon will keep the name of the original owner.

selectMode

Integer, Default: 0

Setting for how the cursor selection should be handled

0 (default) = like original vessel
1 = selected
2 = not selected

replacementInstantPlayer

Boolean, Default: FALSE

If set to true (1), the weapon is activated as soon as a human player becomes owner of the vessel. No resource costs (including energy) are accounted. Conditions can be used.

Note that the command obeys the base Weapon shotDelay ODF command when defined.

replacementInstantDerelict

Boolean, Default: FALSE

If set to true (1), the weapon is activated as soon as team 0 becomes owner of the craft (such as when the craft becomes derelict). No resource costs (including energy) are accounted. Conditions can be used.

Note that the command obeys the base Weapon shotDelay ODF command when defined.

replacementInstantAI

Boolean, Default: FALSE

If set to true (1), the weapon is activated as soon as an AI player becomes owner of the vessel. No resource costs (including energy) are accounted. Conditions can be used.

Note that the command obeys the base Weapon shotDelay ODF command when defined.

replacementDontRemoveFootprint

Boolean, Default: FALSE

If set to true (1), the building blocking area of the owner will not get removed when the owner is a station. This is a work around for when a station has to be replaced in order to avoid the removal of the original station's blocking area deleting the blocking area of the replacement station. 

replacementEvent

Event, Default: Null

An event that is triggered when the weapon is activated. Note that in order to be triggered, a Craft must be involved - either the replaceWeapon owner or the object resulting from the replaceWeapon use.

replacementEvent = "AvatarMayson"

replacementFractionSOD

If enabled, on activation of the weapon a SOD model is created and fragmented. This command is being used for the Klingon miners when they destroy their containers to switch to battle mode. Default: no object / fragmentation

replacementFractionSOD = "rom_rhienn"

dilithiumCost

Float, Default: 0.0

Dilithium spent to use this weapon. Note that the AI may not use weapons with a negative cost. Negative values add to the player's resource pool.

latinumCost

Float, Default: 0.0

Tritanium / Latinum spent to use this weapon. Note that the AI may not use weapons with a negative cost. Negative values add to the player's resource pool.

metalCost

Float, Default: 0.0

Metal spent to use this weapon. Note that the AI may not use weapons with a negative cost. Negative values add to the player's resource pool.

biomatterCost

Float, Default: 0.0

Supply / Biomatter spent to use this weapon. Note that the AI may not use weapons with a negative cost. Negative values add to the player's resource pool.

crewCost

Integer, Default: 0

Crew spent to use this weapon. Note that the AI may not use weapons with a negative cost. Negative values add to the player's resource pool.

requiredOfficers

Integer, Default: 0

Officers / Credits to be available to use this weapon. This is only a check, no resources get deducted

requiredDilithium

Float, Default: 0.0

Dilithium that needs to be available to use this weapon. This is only a check, no resources get deducted

requiredLatinum

Float, Default: 0.0

Tritanium / Latinum that needs to be available to use this weapon. This is only a check, no resources get deducted

requiredBiomatter

Float, Default: 0.0

Supply / Biomatter that needs to be available to use this weapon. This is only a check, no resources get deducted

requiredMetal

Float, Default: 0.0

Metal that needs to be available to use this weapon. This is only a check, no resources get deducted

requiredCrew

Integer, Default: 0

Crew that needs to be available to use this weapon. This is only a check, no resources get deducted

replacementUseLabelAsClass

Boolean, Default: TRUE

This command is currently used for map object replacement on maps. It is an ugly way to do the replacement and not recommended to be used except for creating map objects.

replacementResetCrew

Boolean, Default: FALSE

If set to true (1), the replacement vessel will have its default crew levels, instead of the ratio of crew of the original vessel.

replacementInstantDelay

Float, Default: 0.0

Delays instant replacement commands. Not affected by preserveStatus.

Note that the command is overwritten by the base Weapon shotDelay ODF command when defined.

replacementKeepOwner

Boolean, Default: FALSE

When set to true (1), the original vessel is not deleted.

replacementXClassXPosition

The replacement vessel is placed on a relative position to the original's position (X,Y,Z notation). Cannot be used with label replace.

replacement0Class0Position = 0,0,100

replacementCreationType

Integer, Default: 0

Defines how the newly created vessel should be shown in the Admiral's Log after the game.

0 = normal
1 = evolved
2 = fused
3 = separated
4 = taken
5 = assimilated

warpIn

Boolean, Default: FALSE

When set to true (1), the unit is brought from off the map to the selected location at warp speed. Currently it is hardcoded so that there may only be one warp flash effect per installation (all warp-ins will use the same specified effect).

Two hardcoded warp sound effects are also used:

warp_speed_in.wav is used for the sound a Craft makes when it warps in from off the map or when the Craft goes to warp and leaves.
warp_speed_out.wav is used for the sound a Craft makes when it slows to impulse.

warpInSpeed

Integer, Default: 400

The speed of the warp-drive of a unit called by warpIn.

Physics file entries for maximum speed are ignored while the warpIn unit is at warp speed. Note however that physics commands related to whether the Craft can move, turn, accelerate etc will impact the ability of the Craft to be warped in.

replacementResetSpecialEnergy

Boolean, Default: FALSE

If set to true (1), this resets special energy defaults on the replacement vessel instead of creating it with the special energy ratio of the original vessel. If the replacement vessel uses curSpecialEnergy command, when replacementResetSpecialEnergy is true, energy will be set to full.

replacementInstantCycle

Float, Default: 0.0

0 seconds means disabled. This applies only if the original vessel doesn't get removed (replacementKeepOwner enabled). After each cycle the replacement weapon activates again (regardless if the owner's weapon subsystem is disabled) and spawns more replacement vessels. 

replacementEnemyOfAll

Boolean, Default: FALSE

The created vessel is an enemy to all players. If spawned under a Team, the vessel is still controlled by that Team.

replacementMaintainOrders

Boolean, Default: FALSE

The replacement vessel keeps and carries out the orders (transporting, attacking, moving, etc) of the original vessel. More complex commands like waypoints may not be transferred to the replacement vessel correctly.

replacementAnimate

Boolean, Default: FALSE

Triggers the model's animation.

replacementRegisterAsNew

Boolean, Default: TRUE

If set to true (1), the created ship is treated as a new vessel in the Admiral's Log. If deactivated, no new entry is created, but the logging continues to the entry of the original vessel's Admiral's Log entry, even if that vessel still exists.

replacementIgnoreSameClass

Boolean, Default: FALSE

No replacement occurs if the chosen replacement vessel class is of the same type as the original vessel class.

replacementIgnoreFleetCap

Boolean, Default: FALSE

This allows the replacement(s) to be spawned regardless of any applicable fleetcaps.

replacementXClassYRandomWeight

Integer, Default: 1

This indicates the probability that you will get the given class as a replacement. If this command is not listed, then the value defaults to 1. Calculation is as follows:

This ones possibilities / (total of all possibilities for receiving a ship class replacement in this slot)

In this example, the replaceweapon creates a random number between 1-8 (7 possibilities). The higher the number, the higher the chance that the vessel is created on a random replace.

replacement0Class0 = "fed_galaxy" //1-1
replacement0Class1 = "fed_akira" //2-3
replacement0Class1RandomWeight = 2
replacement0Class2 = "fed_venture" //4-8
replacement0Class2RandomWeight = 4

replacementFindOpenSpot

Boolean, Default: FALSE

The replaceweapon creates the replacement vessels in an open location on the map.

fleetCapFile

String, Default: Null

Define a fleetCapFile here. This is only for the tooltip info and has no other meaning than that.

isToggledOn

Boolean, Default: FALSE

This is a visual effect for the replaceweapon special button. If this is set to true, the weapon appears to be in toggle mode.

concurrentChilds

Integer, Default: Infinite

The total number of units that may be constructed by a replaceweapon.

For instance, if a replaceweapon with this command continually / manually generates new units, it will only be able to do so until this capacity is reached.

concurrentChilds = 4 //Four fighter craft are supported by this unit

transferStats

Boolean, Default: TRUE

When set to true (1), the replacement unit inherits the parent's ratio of current shield/hull hitpoints and crew level. When false, the replaced unit reverts to its native, ODF-defined base statistics.

transferExtraWeapons

Boolean, Default: TRUE

When set to false (0), extraWeapons that are added to the owner unit by a replaceweapon are not kept by the unit when undergoing another replacement.

preserveStatus

This is not a replaceWeapon specific command, however the functionality when used with a replaceweapon can be more specific:

When set to true (1), the unit that spawns units via a replaceweapon "remembers" its spawned units and won't spawn more past the concurrentChilds cap.

For instance, if you have a level 1 fighter carrier that spawns 4 fighters, and preserve status is set to 0 for the level up function, the level 2 fighter carrier would spawn another 4 fighters in addition to the first 4 ones you got from the level 1 carrier (as they are considered two different vessels).

When set to true (1), weapons will remember their current cooldown status even if the owner unit uses a replaceWeapon (which normally resets cooldowns). If preserveStatus = 1 for a replaceWeapon with a timed effect and a cooldown, both the effect and cooldown will be remembered even if the unit ranks up and is replaced.