Template:UnitAbility/base: Difference between revisions
From Heroes of Might and Magic: Olden Era Official Wiki
Added |link= to focus charge icons to make them not open the image when click or tapped |
Added support for manual ability rank info |
||
| Line 34: | Line 34: | ||
}}<!-- | }}<!-- | ||
--></div><!-- end type | --></div><!-- end type | ||
--><div class='title'><!-- | --><div class='title'><!--TODO: language support for the rank blurb? currently all manual since it will be added manually in any case | ||
-->{{{title}}}<!-- | -->{{{title}}} {{#if:{{{rank|}}}|<small> - {{Hint|{{{rank}}}|{{{rank_explanation|This ability has multiple versions.}}}}}</small>}}<!-- | ||
--></div><!-- end title | --></div><!-- end title | ||
--><div class='extra'><!-- | --><div class='extra'><!-- | ||
| Line 304: | Line 304: | ||
| tier = 3 | | tier = 3 | ||
| info_description = Does not end the turn. | | info_description = Does not end the turn. | ||
}} | |||
<br> | |||
<br> | |||
<br> | |||
---- | |||
8. Manually added rank information after the ability title ({{b|rank}}) with a manually adjustable hint popup ({{b|rank_explanation}} - defaults to <code>This ability has multiple versions.</code> in English unless specified otherwise): | |||
{{Color|yellow|Input:}} | |||
<pre><nowiki> | |||
{{UnitAbility/base | |||
| lang = en | |||
| type = active | |||
| icon = druid_ability_1 | |||
| title = Shroomsong | |||
| rank = Rank II | |||
| rank_explanation = This ability has multiple versions with different effect strength. | |||
| description = Once per battle, spends all Focus Charges to restore the hero’s mana: 6 for each Focus Charge spent. | |||
| category = Special | |||
| cooldown = 2 | |||
| focus = 2 | |||
| tier = 2 | |||
}} | |||
</nowiki></pre> | |||
{{Color|lime|Output:}} | |||
{{UnitAbility/base | |||
| lang = en | |||
| type = active | |||
| icon = druid_ability_1 | |||
| title = Shroomsong | |||
| rank = Rank II | |||
| rank_explanation = This ability has multiple versions with different effect strength. | |||
| description = Once per battle, spends all Focus Charges to restore the hero’s mana: 6 for each Focus Charge spent. | |||
| category = Special | |||
| cooldown = 2 | |||
| focus = 2 | |||
| tier = 2 | |||
}} | }} | ||
<br> | <br> | ||
Revision as of 13:17, 31 July 2026
Renders raw properties for a single ability.
1. The first ability always has type=creature_type:
Input:
{{UnitAbility/base
| lang = en
| type = creature_type
| icon = embodiment
| title = Embodiment
| description = A spirit, soul, or other intangible power that has coalesced into material form.<br><br>Morale range: –3 to 3.<br>Luck range: –3 to 3.<br><br>Fallen Embodiments cannot be raised as Undead after battle.
}}
Output:
Creature Type
Embodiment
Script error: No such module "UnitAbilities".
Script error: No such module "UnitAbilities".
2. The second ability always has type=attack_type:
Input:
{{UnitAbility/base
| lang = en
| type = attack_type
| icon = ranged_attack_no_close
| title = Ranged Attack
| description = Can attack enemies at any range.<br>Targets 3 or more hexes away take –10% Damage per hex (up to –50%).
}}
Output:
Attack Type
Ranged Attack
No melee penalty
Can attack enemies at any range.
Targets 3 or more hexes away take –10% Damage per hex (up to –50%).
Targets 3 or more hexes away take –10% Damage per hex (up to –50%).
3. The third ability always has type=move_type, but is not displayed for grounded creatures:
Input:
{{UnitAbility/base
| lang = en
| type = move_type
| icon = fly
| title = Flying
| description = Movement ignores obstacles and traps.
}}
Output:
Movement Type
Flying
Movement ignores obstacles and traps.
4. Passive ability:
Input:
{{UnitAbility/base
| lang = en
| type = passive
| icon = assassin_passive_1
| title = Weak Spot
| description = Lucky Strikes deal +100% Damage, and the maximum possible Luck is increased to 5.
}}
Output:
Passive Ability
Weak Spot
Lucky Strikes deal +100% Damage, and the maximum possible Luck is increased to 5.
5. Active ability as an alternative attack (invalid cooldown):
Input:
{{UnitAbility/base
| lang = en
| type = active
| icon = black_dragon_ability_1
| title = Fighting Style: Sulfurous Assault
| description = Performs a Cone Strike, dealing –50% Damage to each target.
| cooldown = -1
}}
Output:
Alternative Attack
Fighting Style: Sulfurous Assault
Performs a Cone Strike, dealing –50% Damage to each target.
6. Active ability, with category, cooldown, focus_cost and tier:
Input:
{{UnitAbility/base
| lang = en
| type = active
| icon = black_dragon_ability_2
| title = Inner Flame
| description = Until the end of the next round, deals [ 30 × amount of units ] Magic Damage when attacked in Melee.
| category = Positive effect
| cooldown = 3
| focus = 3
| tier = 3
}}
Output:
Active Ability
Inner Flame
Positive effect💬
Cost: 

3 Focus ChargesCooldown: 3 roundsTier III
Until the end of the next round, deals [ 30 × amount of units ] Magic Damage when attacked in Melee.
7. Extra message added after the description (info_description):
Input:
{{UnitAbility/base
| lang = en
| type = active
| icon = black_dragon_ability_2
| title = Inner Flame
| description = Until the end of the next round, deals [ 30 × amount of units ] Magic Damage when attacked in Melee.
| category = Positive effect
| cooldown = 3
| focus = 3
| tier = 3
| info_description = Does not end the turn.
}}
Output:
Active Ability
Inner Flame
Positive effect💬
Cost: 

3 Focus ChargesCooldown: 3 roundsTier III
Until the end of the next round, deals [ 30 × amount of units ] Magic Damage when attacked in Melee.Does not end the turn.💬
8. Manually added rank information after the ability title (rank) with a manually adjustable hint popup (rank_explanation - defaults to This ability has multiple versions. in English unless specified otherwise):
Input:
{{UnitAbility/base
| lang = en
| type = active
| icon = druid_ability_1
| title = Shroomsong
| rank = Rank II
| rank_explanation = This ability has multiple versions with different effect strength.
| description = Once per battle, spends all Focus Charges to restore the hero’s mana: 6 for each Focus Charge spent.
| category = Special
| cooldown = 2
| focus = 2
| tier = 2
}}
Output:
Active Ability
Shroomsong - Rank IIThis ability has multiple versions with different effect strength.
Special💬
Cost: 
2 Focus ChargesCooldown: 2 roundsTier II
Once per battle, spends all Focus Charges to restore the hero’s mana: 6 for each Focus Charge spent.


