Module:Unit/doc: Difference between revisions
From Heroes of Might and Magic: Olden Era Official Wiki
No edit summary |
No edit summary |
||
| Line 192: | Line 192: | ||
| {{#invoke:Unit|get|Flaming Phoenix|abilities.1.icon|ru}} | | {{#invoke:Unit|get|Flaming Phoenix|abilities.1.icon|ru}} | ||
|- | |- | ||
| passives. | | passives.3.name | ||
| Passive ability name (localized) | | Passive ability name (localized) | ||
| <pre>{{#invoke:Unit|get|Giant Toad|passives. | | <pre>{{#invoke:Unit|get|Giant Toad|passives.3.name}}</pre> | ||
| {{#invoke:Unit|get|Giant Toad|passives. | | {{#invoke:Unit|get|Giant Toad|passives.3.name}} | ||
|- | |- | ||
| passives. | | passives.3.description | ||
| Passive ability description (localized with data substitutions) | | Passive ability description (localized with data substitutions) | ||
| <pre>{{#invoke:Unit|get|Giant Toad|passives. | | <pre>{{#invoke:Unit|get|Giant Toad|passives.3.description}}</pre> | ||
| {{#invoke:Unit|get|Giant Toad|passives. | | {{#invoke:Unit|get|Giant Toad|passives.3.description}} | ||
|- | |- | ||
| passives. | | passives.3.excaptionInTooltip | ||
| Passive ability restrictions or exceptions (localized) | | Passive ability restrictions or exceptions (localized) | ||
| <pre>{{#invoke:Unit|get|Giant Toad|passives. | | <pre>{{#invoke:Unit|get|Giant Toad|passives.3.excaptionInTooltip|ru}}</pre> | ||
| {{#invoke:Unit|get|Giant Toad|passives. | | {{#invoke:Unit|get|Giant Toad|passives.3.excaptionInTooltip|ru}} | ||
|- | |- | ||
| passives. | | passives.3.icon | ||
| Passive ability icon filename | | Passive ability icon filename | ||
| <pre>{{#invoke:Unit|get|Giant Toad|passives. | | <pre>{{#invoke:Unit|get|Giant Toad|passives.3.icon}}</pre> | ||
| {{#invoke:Unit|get|Giant Toad|passives. | | {{#invoke:Unit|get|Giant Toad|passives.3.icon}} | ||
|- | |- | ||
| alternativeAttacks | | alternativeAttacks | ||
Revision as of 12:58, 8 January 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}}
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


