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 6: | Line 6: | ||
* '''CanBeGiftedWithGiftCard''' ''boolean'': If true, players can gift this unit to another player if it's on the territory they play a Gift Card on. | * '''CanBeGiftedWithGiftCard''' ''boolean'': If true, players can gift this unit to another player if it's on the territory they play a Gift Card on. | ||
* '''CanBeTransferredToTeammate''' ''boolean'': If true, players can transfer this unit to a teammate using an attack/transfer order. | * '''CanBeTransferredToTeammate''' ''boolean'': If true, players can transfer this unit to a teammate using an attack/transfer order. | ||
− | * '''CombatOrder''' ''integer'': Determines which special units take damage before others if multiple special units are on the same territory. The lower the number, the sooner your special unit takes damage | + | * '''CombatOrder''' ''integer'': Determines which special units take damage before others if multiple special units are on the same territory. The lower the number, the sooner your special unit takes damage. A commander has a DamageOrder of 10000, so if you want your special unit to protect the commander you should use a number less than 10000. You should try to use a number that no other mod is using so that damage order is consistent. For this reason, avoid round numbers like 0, 1, or 1000, etc. |
* '''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. | ||
Line 64: | Line 64: | ||
* '''DefensePower''' ''integer'': | * '''DefensePower''' ''integer'': | ||
* '''DefensePowerPercentage''' ''number'': | * '''DefensePowerPercentage''' ''number'': | ||
− | |||
* '''ImageFilename''' ''string'': | * '''ImageFilename''' ''string'': | ||
* '''IncludeABeforeName''' ''boolean'': | * '''IncludeABeforeName''' ''boolean'': | ||
Line 78: | Line 77: | ||
* '''WL.CustomSpecialUnitBuilder.CreateCopy'''('''clone''' ''[[Mod API Reference:CustomSpecialUnit|CustomSpecialUnit]]'') (static) returns [[Mod API Reference:CustomSpecialUnitBuilder|CustomSpecialUnitBuilder]]: | * '''WL.CustomSpecialUnitBuilder.CreateCopy'''('''clone''' ''[[Mod API Reference:CustomSpecialUnit|CustomSpecialUnit]]'') (static) returns [[Mod API Reference:CustomSpecialUnitBuilder|CustomSpecialUnitBuilder]]: | ||
* '''Build'''() returns [[Mod API Reference:CustomSpecialUnit|CustomSpecialUnit]]: | * '''Build'''() returns [[Mod API Reference:CustomSpecialUnit|CustomSpecialUnit]]: | ||
− | |||
− |