Editing Mod API Reference:CustomSpecialUnit
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 9: | Line 9: | ||
* '''DamageAbsorbedWhenAttacked''' ''integer'': When this unit takes damage, it will reduce the amount of damage remaining to other units on this territory by this value. This value has no effect if the unit has a ''Health''. | * '''DamageAbsorbedWhenAttacked''' ''integer'': When this unit takes damage, it will reduce the amount of damage remaining to other units on this territory by this value. This value has no effect if the unit has a ''Health''. | ||
* '''DamageToKill''' ''integer'': The number of damage points it takes to kill this unit. This value has no effect if the unit has a ''Health'', as the health will be used instead. | * '''DamageToKill''' ''integer'': The number of damage points it takes to kill this unit. This value has no effect if the unit has a ''Health'', as the health will be used instead. | ||
− | * '''DefensePower''' ''integer'': The number of armies this unit adds to | + | * '''DefensePower''' ''integer'': The number of armies this unit adds to defence when it's on a territory that's attacked. |
− | * '''DefensePowerPercentage''' ''number'': When the unit is on a territory that's attacked, the total | + | * '''DefensePowerPercentage''' ''number'': When the unit is on a territory that's attacked, the total defence power is multiplied by this number. See AttackPowerPercentage. |
* '''Health''' ''[[Mod API Reference:Nullable|Nullable]]<integer>'': When not nil, this defines the health of the unit. The unit will automatically reduce its health when it's part of combat where it receives damage, and automatically die if the health goes below 1. | * '''Health''' ''[[Mod API Reference:Nullable|Nullable]]<integer>'': When not nil, this defines the health of the unit. The unit will automatically reduce its health when it's part of combat where it receives damage, and automatically die if the health goes below 1. | ||
* '''ImageFilename''' ''string'': The name of a png file in the SpecialUnitImages/ folder of the mod. This image must be a png and must be no bigger than 60x100 pixels. Mods may have up to 5 SpecialUnitImages. | * '''ImageFilename''' ''string'': The name of a png file in the SpecialUnitImages/ folder of the mod. This image must be a png and must be no bigger than 60x100 pixels. Mods may have up to 5 SpecialUnitImages. |