Module:Unit/doc: Difference between revisions
From Heroes of Might and Magic: Olden Era Official Wiki
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
Module for requesting characteristics of all existing units in | Module for requesting characteristics of all existing units in Olden Era. Actual data is stored in [[Data:units.json]]. | ||
== Supported Commands == | == Supported Commands == | ||
| Line 92: | Line 92: | ||
| {{#invoke:Unit|get|Angel|damageMax}} | | {{#invoke:Unit|get|Angel|damageMax}} | ||
|- | |- | ||
| | | morale | ||
| Default morale | | Default morale | ||
| <pre>{{#invoke:Unit|get|Angel| | | <pre>{{#invoke:Unit|get|Angel|morale}}</pre> | ||
| {{#invoke:Unit|get|Angel| | | {{#invoke:Unit|get|Angel|morale}} | ||
|- | |- | ||
| | | moralMin | ||
| Minimum morale value | | Minimum morale value | ||
| <pre>{{#invoke:Unit|get|Angel| | | <pre>{{#invoke:Unit|get|Angel|moralMin}}</pre> | ||
| {{#invoke:Unit|get|Angel| | | {{#invoke:Unit|get|Angel|moralMin}} | ||
|- | |- | ||
| | | moralMax | ||
| Maximum morale value | | Maximum morale value | ||
| <pre>{{#invoke:Unit|get|Angel| | | <pre>{{#invoke:Unit|get|Angel|moralMax}}</pre> | ||
| {{#invoke:Unit|get|Angel| | | {{#invoke:Unit|get|Angel|moralMax}} | ||
|- | |- | ||
| | | luck | ||
| Default luck | | Default luck | ||
| <pre>{{#invoke:Unit|get|Angel| | | <pre>{{#invoke:Unit|get|Angel|luck}}</pre> | ||
| {{#invoke:Unit|get|Angel| | | {{#invoke:Unit|get|Angel|luck}} | ||
|- | |- | ||
| | | luckMin | ||
| Minimum luck value | | Minimum luck value | ||
| <pre>{{#invoke:Unit|get|Angel| | | <pre>{{#invoke:Unit|get|Angel|luckMin}}</pre> | ||
| {{#invoke:Unit|get|Angel| | | {{#invoke:Unit|get|Angel|luckMin}} | ||
|- | |- | ||
| | | luckMax | ||
| Maximum luck value | | Maximum luck value | ||
| <pre>{{#invoke:Unit|get|Angel| | | <pre>{{#invoke:Unit|get|Angel|luckMax}}</pre> | ||
| {{#invoke:Unit|get|Angel| | | {{#invoke:Unit|get|Angel|luckMax}} | ||
|- | |- | ||
| initiative | | initiative | ||
Revision as of 12:42, 7 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


