AddShipMultiplier(<rShip>, <sMultiplierType>, <sTarget>, <sScaleType>, <fMinMultiplier>, <fMaxMultiplier>, <fRadius>)
AddSubSystemMultiplier(<rSubSystem>, <sMultiplierType>, <sTarget>, <sScaleType>, <fMinMultiplier>, <fMaxMultiplier>, <fRadius>)
Description
These functions give a ship or subsystem the ability to increase or decrease the specified statistic of itself, or of all friendly ships including itself, other friendly ships excluding itself, or all enemies within the specified radius. The amount of increase or decrease depends on the specified multiplier, and the multiplier can vary depending on the current health of the ship or subsystem providing the multiplier.
Example
AddShipMultiplier(NewShipType, "WeaponAccuracy", "OwnShipsWithinRadiusExcludingThisShip", "Linear", 1.15, 1.15, 4500)
AddSubSystemMultiplier(NewSubSystemType, "BuildSpeed", "ThisShipOnly", "Linear", 1.3, 1, 0)
Arguments
<rShip> and
<rSubSystem>: Reference to the ship or subsystem. Generally, this will be
NewShipType or
NewSubSystemType, respectively.
<sMultiplierType>: Specifies the statistic to be affected by the multiplier. See
Modifiable Values.
<sTarget>: Specifies which ships within the fRadius receive the specified multiplier. Possible values are
EnemyShipsWithinRadius,
OwnShipsWithinRadius,
OwnShipsWithinRadiusExcludingThisShip, and
ThisShipOnly.
<sScaleType>: Possible values are
Linear and
None. If set to
Linear, the actual multiplier applied depends on the current health of the ship or subsystem providing the multiplier. If the ship or subsystem has 0 health, the fMinMultiplier is used. With any health greater than 0, the multiplier is scaled in a linear fashion up to the value of fMaxMultiplier if the ship or subsystem has full health. If set to
None, the fMaxMultiplier value is always used for all affected ships.
<fMinMultiplier>: The minimum possible multiplier if sScaleType is set to
Linear and the ship or subsystem providing the multiplier has 0 health.
<fMaxMultiplier>: The maximum possible multiplier if sScaleType is set to
Linear and the ship or subsystem providing the multiplier has full health, or the multiplier if sScaleType is set to
None.
<fRadius>: The radius within which any ship allowed by the sTarget setting is affected by the specified multiplier type.
Related Pages: