Karos Graveyard ::
Function Reference :: Scope Reference :: Variable Reference
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.

AddShipMultiplier is called within a .ship file, while AddSubSystemMultiplier is called within a .subs file.

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:
 Comments [Hide comments/form]
Thanks, Nickerson, for inputting the basic info.
Reformated the entire page.
Clarified and corrected descriptions.
Fixed (many) typos.
Added AddSubSystemMultiplier function.
-- RangerHW (2003-10-10 16:15:52)
Made it even more pretty. :)
-- ThoughtProcess (2003-10-10 19:04:55)
Cleaned up page slightly to make more standardized with other pages.
-- RangerHW (2003-10-13 11:43:15)
Modified the order of arguments between min and max values; max comes first.
-- SunTzu (2006-03-11 15:13:29)
forget about that, I got confused :(
-- SunTzu (2006-03-12 06:18:26)
:: ::
Hide Download Bar
Ctrl + Shift + Z = Show/Hide Download Bar
Downloads
Download Manager (S3)
Clear
Left Click: Clear All Finished
Right Click: Undo last clear
100%
Download History
Download list is empty
FunctionAddShipAbility.html
100%
--:--
498 KB
-.--
FunctionAddShipAbility.html
Source:
From:
To:
G:\HWRMResources\tutorials\hw2wiki.net\Functions_StandAlone\FunctionAddShipAbility.html
Status:
498 KB / 498 KB ( -.-- )
File Size:
498 KB
Virus scan:
Time Start:
2019.08.20 - 18:27:44
Time to Complete:
00:01
Time Left:
--:--
Percent Done:
100%
Average Speed:
477 KB/s
mouse double click: download pause/resume
mouse middle click: download cancel
mouse double click: open file
mouse double click + Ctrl: open dir
mouse middle click: delete from list
mouse middle click + Ctrl: delete from system
press mouse button + Ctrl: drag & drop