Module:Unit/doc: Difference between revisions
From Heroes of Might and Magic: Olden Era Official Wiki
No edit summary |
No edit summary |
||
| (17 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
Module for requesting characteristics of all existing units in Olden Era. Actual data is stored in [[Data:units.json]]. | Module for requesting characteristics of all existing units in Olden Era. Actual data is stored in [[Data:units.json]]. | ||
<includeonly> | |||
For documentation page, see [[Module:Unit/doc]]. | |||
</includeonly> | |||
== Supported Commands == | == Supported Commands == | ||
| Line 21: | Line 23: | ||
| <pre>{{#invoke:Unit|get|Angel|name}}</pre> | | <pre>{{#invoke:Unit|get|Angel|name}}</pre> | ||
| {{#invoke:Unit|get|Angel|name}} | | {{#invoke:Unit|get|Angel|name}} | ||
|- | |||
| Base name | |||
| Name of un-upgraded unit (localized) | |||
| <pre>{{#invoke:Unit|get|Apotheosis|baseName}}</pre> | |||
| {{#invoke:Unit|get|Apotheosis|baseName}} | |||
|- | |||
| First Upgrade | |||
| Name of upgraded unit (localized) | |||
| <pre>{{#invoke:Unit|get|Angel|upgradeName}}</pre> | |||
| {{#invoke:Unit|get|Angel|upgradeName}} | |||
|- | |||
| Second Upgrade | |||
| Name of alt. upgraded unit (localized) | |||
| <pre>{{#invoke:Unit|get|Angel|altUpgradeName}}</pre> | |||
| {{#invoke:Unit|get|Angel|altUpgradeName}} | |||
|- | |||
| Image name | |||
| Name without spaces and apostrophes, suitable for wiki file names | |||
| <pre>{{#invoke:Unit|get|Sun's Aegis|imageName}}</pre> | |||
| {{#invoke:Unit|get|Sun's Aegis|imageName}} | |||
|- | |- | ||
| description | | description | ||
| Line 36: | Line 58: | ||
| <pre>{{#invoke:Unit|get|Angel|tier}}</pre> | | <pre>{{#invoke:Unit|get|Angel|tier}}</pre> | ||
| {{#invoke:Unit|get|Angel|tier}} | | {{#invoke:Unit|get|Angel|tier}} | ||
|- | |||
| id | |||
| Unit ID | |||
| <pre>{{#invoke:Unit|get|Angel|id}}</pre> | |||
| {{#invoke:Unit|get|Angel|id}} | |||
|- | |- | ||
| nativeBiome | | nativeBiome | ||
| Line 51: | Line 78: | ||
| <pre>{{#invoke:Unit|get|Angel|cost.gold}}</pre><pre>{{#invoke:Unit|get|Angel|cost.gemstones}}</pre> | | <pre>{{#invoke:Unit|get|Angel|cost.gold}}</pre><pre>{{#invoke:Unit|get|Angel|cost.gemstones}}</pre> | ||
| {{#invoke:Unit|get|Angel|cost.gold}} <br> {{#invoke:Unit|get|Angel|cost.gemstones}} | | {{#invoke:Unit|get|Angel|cost.gold}} <br> {{#invoke:Unit|get|Angel|cost.gemstones}} | ||
|- | |||
| upgradeCost | |||
| Upgrade cost | |||
| <pre>{{#invoke:Unit|get|Archangel|upgradeCost}}</pre> | |||
| {{#invoke:Unit|get|Archangel|upgradeCost}} | |||
|- | |- | ||
| weeklyIncrement | | weeklyIncrement | ||
| Line 92: | Line 124: | ||
| {{#invoke:Unit|get|Angel|damageMax}} | | {{#invoke:Unit|get|Angel|damageMax}} | ||
|- | |- | ||
| | | moral | ||
| Default morale | | Default morale | ||
| <pre>{{#invoke:Unit|get|Angel| | | <pre>{{#invoke:Unit|get|Angel|moral}}</pre> | ||
| {{#invoke:Unit|get|Angel| | | {{#invoke:Unit|get|Angel|moral}} | ||
|- | |- | ||
| moralMin | | moralMin | ||
| Line 128: | Line 160: | ||
|- | |- | ||
| speed | | speed | ||
| Speed | | Speed | ||
| <pre>{{#invoke:Unit|get|Angel|speed}}</pre> | | <pre>{{#invoke:Unit|get|Angel|speed}}</pre> | ||
| {{#invoke:Unit|get|Angel|speed}} | | {{#invoke:Unit|get|Angel|speed}} | ||
|- | |- | ||
| | | moveType | ||
| | | Movement type (fly or teleport) | ||
| <pre>{{#invoke:Unit|get|Angel| | | <pre>{{#invoke:Unit|get|Angel|moveType}}</pre> | ||
| {{#invoke:Unit|get|Angel| | | {{#invoke:Unit|get|Angel|moveType}} | ||
|- | |- | ||
| | | baseClass.name | ||
| | | Base class name (localized) | ||
| <pre>{{#invoke:Unit|get|Angel| | | <pre>{{#invoke:Unit|get|Angel|baseClass.name|ru}}</pre> | ||
| {{#invoke:Unit|get|Angel| | | {{#invoke:Unit|get|Angel|baseClass.name}} | ||
|- | |- | ||
| | | baseClass.description | ||
| | | Base class description (localized) | ||
| <pre>{{#invoke:Unit|get|Angel| | | <pre>{{#invoke:Unit|get|Angel|baseClass.description}}</pre> | ||
| {{#invoke:Unit|get|Angel| | | {{#invoke:Unit|get|Angel|baseClass.description}} | ||
|- | |- | ||
| | | baseClass.icon | ||
| | | Base class icon filename | ||
| <pre>{{#invoke:Unit|get| | | <pre>{{#invoke:Unit|get|Angel|baseClass.icon}} or [[File:{{#invoke:Unit|get|Angel|baseClass.icon}}|50px]]</pre> | ||
| {{#invoke:Unit|get| | | {{#invoke:Unit|get|Angel|baseClass.icon}} - [[File:{{#invoke:Unit|get|Angel|baseClass.icon}}|50px]] | ||
|} | |||
=== Active Abilities === | |||
To access specific active ability properties, use the format: <code>abilities.index.property</code> | |||
{|class="wikitable" | |||
! Name | |||
! Description | |||
! Example | |||
! Result | |||
|- | |||
| abilities.1.name | |||
| Ability name (localized) | |||
| <pre>{{#invoke:Unit|get|Flaming Phoenix|abilities.1.name|ru}}</pre> | |||
| {{#invoke:Unit|get|Flaming Phoenix|abilities.1.name|ru}} | |||
|- | |||
| abilities.1.description | |||
| Ability main description (localized with data substitutions) | |||
| <pre>{{#invoke:Unit|get|Flaming Phoenix|abilities.1.description|ru}}</pre> | |||
| {{#invoke:Unit|get|Flaming Phoenix|abilities.1.description|ru}} | |||
|- | |||
| abilities.1.infoDescription | |||
| Additional ability information (localized) | |||
| <pre>{{#invoke:Unit|get|Flaming Phoenix|abilities.1.infoDescription|ru}}</pre> | |||
| {{#invoke:Unit|get|Flaming Phoenix|abilities.1.infoDescription|ru}} | |||
|- | |- | ||
| | | abilities.1.excaptionInTooltip | ||
| | | Ability restrictions or exceptions (localized) | ||
| <pre>{{#invoke:Unit|get| | | <pre>{{#invoke:Unit|get|Cultist|abilities.1.excaptionInTooltip|ru}}</pre> | ||
| {{#invoke:Unit|get| | | {{#invoke:Unit|get|Cultist|abilities.1.excaptionInTooltip|ru}} | ||
|- | |- | ||
| | | abilities.1.abilityType | ||
| | | Type of ability (localized) | ||
| <pre>{{#invoke:Unit|get| | | <pre>{{#invoke:Unit|get|Flaming Phoenix|abilities.1.abilityType|ru}}</pre> | ||
| {{#invoke:Unit|get| | | {{#invoke:Unit|get|Flaming Phoenix|abilities.1.abilityType|ru}} | ||
|- | |- | ||
| | | abilities.1.ability_tier | ||
| | | Ability rank or tier | ||
| <pre>{{#invoke:Unit|get| | | <pre>{{#invoke:Unit|get|Flaming Phoenix|abilities.1.ability_tier|ru}}</pre> | ||
| {{#invoke:Unit|get| | | {{#invoke:Unit|get|Flaming Phoenix|abilities.1.ability_tier|ru}} | ||
|- | |- | ||
| | | abilities.1.energyLevel | ||
| | | Energy required for ability activation | ||
| <pre>{{#invoke:Unit|get| | | <pre>{{#invoke:Unit|get|Flaming Phoenix|abilities.1.energyLevel|ru}}</pre> | ||
| {{#invoke:Unit|get| | | {{#invoke:Unit|get|Flaming Phoenix|abilities.1.energyLevel|ru}} | ||
|- | |||
| abilities.1.icon | |||
| Ability icon filename | |||
| <pre>{{#invoke:Unit|get|Flaming Phoenix|abilities.1.icon|ru}}</pre> | |||
| {{#invoke:Unit|get|Flaming Phoenix|abilities.1.icon|ru}} | |||
|} | |||
=== Passive Abilities === | |||
To access specific passive ability properties, use the format: <code>passives.index.property</code> | |||
{|class="wikitable" | |||
! Name | |||
! Description | |||
! Example | |||
! Result | |||
|- | |||
| passives.1.name | |||
| Passive ability name (localized) | |||
| <pre>{{#invoke:Unit|get|Giant Toad|passives.1.name}}</pre> | |||
| {{#invoke:Unit|get|Giant Toad|passives.1.name}} | |||
|- | |||
| passives.1.description | |||
| Passive ability description (localized with data substitutions) | |||
| <pre>{{#invoke:Unit|get|Giant Toad|passives.1.description}}</pre> | |||
| {{#invoke:Unit|get|Giant Toad|passives.1.description}} | |||
|- | |||
| passives.1.excaptionInTooltip | |||
| Passive ability restrictions or exceptions (localized) | |||
| <pre>{{#invoke:Unit|get|Giant Toad|passives.1.excaptionInTooltip}}</pre> | |||
| {{#invoke:Unit|get|Giant Toad|passives.1.excaptionInTooltip}} | |||
|- | |||
| passives.1.icon | |||
| Passive ability icon filename | |||
| <pre>{{#invoke:Unit|get|Giant Toad|passives.1.icon}}</pre> | |||
| {{#invoke:Unit|get|Giant Toad|passives.1.icon}} | |||
|} | |||
=== Alternative Attacks === | |||
To access specific alternative attack properties, use the format: <code>alternativeAttacks.index.property</code> | |||
{|class="wikitable" | |||
! Name | |||
! Description | |||
! Example | |||
! Result | |||
|- | |||
| alternativeAttacks.1.name | |||
| Alternative attack name (localized) | |||
| <pre>{{#invoke:Unit|get|Infiltrator|alternativeAttacks.1.name}}</pre> | |||
| {{#invoke:Unit|get|Infiltrator|alternativeAttacks.1.name}} | |||
|- | |||
| alternativeAttacks.1.description | |||
| Alternative attack description (localized with data substitutions) | |||
| <pre>{{#invoke:Unit|get|Infiltrator|alternativeAttacks.1.description}}</pre> | |||
| {{#invoke:Unit|get|Infiltrator|alternativeAttacks.1.description}} | |||
|- | |||
| alternativeAttacks.1.abilityType | |||
| Type of alternative attack (localized) | |||
| <pre>{{#invoke:Unit|get|Infiltrator|alternativeAttacks.1.abilityType}}</pre> | |||
| {{#invoke:Unit|get|Infiltrator|alternativeAttacks.1.abilityType}} | |||
|- | |||
| alternativeAttacks.1.infoDescription | |||
| Additional alternative attack information (localized) | |||
| <pre>{{#invoke:Unit|get|Infiltrator|alternativeAttacks.1.infoDescription}}</pre> | |||
| {{#invoke:Unit|get|Infiltrator|alternativeAttacks.1.infoDescription}} | |||
|- | |- | ||
| | | alternativeAttacks.1.icon | ||
| | | Alternative attack icon filename | ||
| <pre>{{#invoke:Unit|get| | | <pre>{{#invoke:Unit|get|Infiltrator|alternativeAttacks.1.icon}}</pre> | ||
| {{#invoke:Unit|get| | | {{#invoke:Unit|get|Infiltrator|alternativeAttacks.1.icon}} | ||
|- | |- | ||
| | | alternativeAttacks.1.ability_tier | ||
| | | Alternative attack rank or tier | ||
| <pre>{{#invoke:Unit|get| | | <pre>{{#invoke:Unit|get|Infiltrator|alternativeAttacks.1.ability_tier}}</pre> | ||
| {{#invoke:Unit|get| | | {{#invoke:Unit|get|Infiltrator|alternativeAttacks.1.ability_tier}} | ||
|} | |} | ||
| Line 194: | Line 319: | ||
* <pre>{{#invoke:Unit|get|Angel|name|pl}}</pre> {{#invoke:Unit|get|Angel|name|pl}} - Polish | * <pre>{{#invoke:Unit|get|Angel|name|pl}}</pre> {{#invoke:Unit|get|Angel|name|pl}} - Polish | ||
* <pre>{{#invoke:Unit|get|Angel|name|ru}}</pre> {{#invoke:Unit|get|Angel|name|ru}} - Russian | * <pre>{{#invoke:Unit|get|Angel|name|ru}}</pre> {{#invoke:Unit|get|Angel|name|ru}} - Russian | ||
<includeonly>[[Category:Modules]]</includeonly><noinclude>[[Category:Module Documentation]]</noinclude> | |||
Latest revision as of 08:48, 6 May 2026
Module for requesting characteristics of all existing units in Olden Era. Actual data is stored in Data:units.json.
Supported Commands
get
The module supports the main get command, through which you can retrieve individual unit attributes (listed below). The basic syntax of the command is:
{{#invoke:Unit|get|Unit Name|Property Name}}
Active Abilities
To access specific active ability properties, use the format: abilities.index.property
| Name | Description | Example | Result |
|---|---|---|---|
| abilities.1.name | Ability name (localized) | {{#invoke:Unit|get|Flaming Phoenix|abilities.1.name|ru}}
|
Пробуждение. Огонь II |
| abilities.1.description | Ability main description (localized with data substitutions) | {{#invoke:Unit|get|Flaming Phoenix|abilities.1.description|ru}}
|
Получает +1 к скорости и инициативе, +25 к здоровью и всегда наносит максимальный урон. Позволяет использовать остальные способности. Применяется один раз за бой и действует до конца боя. |
| abilities.1.infoDescription | Additional ability information (localized) | {{#invoke:Unit|get|Flaming Phoenix|abilities.1.infoDescription|ru}}
|
Не завершает ход. |
| abilities.1.excaptionInTooltip | Ability restrictions or exceptions (localized) | {{#invoke:Unit|get|Cultist|abilities.1.excaptionInTooltip|ru}}
|
Не действует на магических существ, нежить и конструкты |
| abilities.1.abilityType | Type of ability (localized) | {{#invoke:Unit|get|Flaming Phoenix|abilities.1.abilityType|ru}}
|
Особая способность |
| abilities.1.ability_tier | Ability rank or tier | {{#invoke:Unit|get|Flaming Phoenix|abilities.1.ability_tier|ru}}
|
6 |
| abilities.1.energyLevel | Energy required for ability activation | {{#invoke:Unit|get|Flaming Phoenix|abilities.1.energyLevel|ru}}
|
3 |
| abilities.1.icon | Ability icon filename | {{#invoke:Unit|get|Flaming Phoenix|abilities.1.icon|ru}}
|
Phoenix_ability_2.png |
Passive Abilities
To access specific passive ability properties, use the format: passives.index.property
| Name | Description | Example | Result |
|---|---|---|---|
| passives.1.name | Passive ability name (localized) | {{#invoke:Unit|get|Giant Toad|passives.1.name}}
|
Melee Attack |
| passives.1.description | Passive ability description (localized with data substitutions) | {{#invoke:Unit|get|Giant Toad|passives.1.description}}
|
Can only attack adjacent enemies. Provokes counterattacks. |
| passives.1.excaptionInTooltip | Passive ability restrictions or exceptions (localized) | {{#invoke:Unit|get|Giant Toad|passives.1.excaptionInTooltip}}
|
|
| passives.1.icon | Passive ability icon filename | {{#invoke:Unit|get|Giant Toad|passives.1.icon}}
|
Base passive melee attack.png |
Alternative Attacks
To access specific alternative attack properties, use the format: alternativeAttacks.index.property
| Name | Description | Example | Result |
|---|---|---|---|
| alternativeAttacks.1.name | Alternative attack name (localized) | {{#invoke:Unit|get|Infiltrator|alternativeAttacks.1.name}}
|
Fighting Style: Hit and Run |
| alternativeAttacks.1.description | Alternative attack description (localized with data substitutions) | {{#invoke:Unit|get|Infiltrator|alternativeAttacks.1.description}}
|
This creature will return to its original position after attacking, but deal –50% Damage. |
| alternativeAttacks.1.abilityType | Type of alternative attack (localized) | {{#invoke:Unit|get|Infiltrator|alternativeAttacks.1.abilityType}}
|
Alternative Attack |
| alternativeAttacks.1.infoDescription | Additional alternative attack information (localized) | {{#invoke:Unit|get|Infiltrator|alternativeAttacks.1.infoDescription}}
|
Does not spend Focus Charges. |
| alternativeAttacks.1.icon | Alternative attack icon filename | {{#invoke:Unit|get|Infiltrator|alternativeAttacks.1.icon}}
|
Assassin_ability_1.png |
| alternativeAttacks.1.ability_tier | Alternative attack rank or tier | {{#invoke:Unit|get|Infiltrator|alternativeAttacks.1.ability_tier}}
|
1 |
Localization Support
The module supports localization in multiple languages. You can specify the language as an optional third parameter:
{{#invoke:Unit|get|Unit Name|Property Name|Language Code}}
For example:
{{#invoke:Unit|get|Angel|name|pl}}Anioł - Polish{{#invoke:Unit|get|Angel|name|ru}}Ангел - Russian


