Module:Unit/doc

From Heroes of Might and Magic: Olden Era Official Wiki
Revision as of 12:43, 5 January 2026 by Krom (talk | contribs) (Created page with "Module for requesting characteristics of all existing units in Olden Era. Actual data is stored in Module: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: <pre> {{#invoke:Unit|get|Unit Name|Property Name}} </pre> {|class="wikitable" ! Name ! Description ! Example ! Result |- | name | Unit name (localized) | <...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This is the documentation page for Module:Unit

Module for requesting characteristics of all existing units in Olden Era. Actual data is stored in Module: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}}
Name Description Example Result
name Unit name (localized)
{{#invoke:Unit|get|Ash Dragon|name}}
Unit 'Ash Dragon' not found
description Narrative description (localized with data substitutions)
{{#invoke:Unit|get|Ash Dragon|description}}
Unit 'Ash Dragon' not found
faction Unit faction
{{#invoke:Unit|get|Ash Dragon|faction}}
Unit 'Ash Dragon' not found
tier Unit tier
{{#invoke:Unit|get|Ash Dragon|tier}}
Unit 'Ash Dragon' not found
nativeBiome Native biome
{{#invoke:Unit|get|Ash Dragon|nativeBiome}}
Unit 'Ash Dragon' not found
cost Hiring cost
{{#invoke:Unit|get|Ash Dragon|cost}}
Unit 'Ash Dragon' not found
increment Base weekly increment from main building
{{#invoke:Unit|get|Ash Dragon|increment}}
Unit 'Ash Dragon' not found
experience Experience gained when defeating the unit
{{#invoke:Unit|get|Ash Dragon|experience}}
Unit 'Ash Dragon' not found
hp Maximum health
{{#invoke:Unit|get|Ash Dragon|hp}}
Unit 'Ash Dragon' not found
offence Offence parameter
{{#invoke:Unit|get|Ash Dragon|offence}}
Unit 'Ash Dragon' not found
defence Defence parameter
{{#invoke:Unit|get|Ash Dragon|defence}}
Unit 'Ash Dragon' not found
damageMin Minimum damage dealt
{{#invoke:Unit|get|Ash Dragon|damageMin}}
Unit 'Ash Dragon' not found
damageMax Maximum damage dealt
{{#invoke:Unit|get|Ash Dragon|damageMax}}
Unit 'Ash Dragon' not found
morale Default morale
{{#invoke:Unit|get|Ash Dragon|morale}}
Unit 'Ash Dragon' not found
luck Default luck
{{#invoke:Unit|get|Ash Dragon|luck}}
Unit 'Ash Dragon' not found
initiative Initiative
{{#invoke:Unit|get|Ash Dragon|initiative}}
Unit 'Ash Dragon' not found
speed Speed (movement per turn in hexes during combat)
{{#invoke:Unit|get|Ash Dragon|speed}}
Unit 'Ash Dragon' not found
baseClass Base class (describes basic passive abilities of the creature)
{{#invoke:Unit|get|Ash Dragon|baseClass}}
Unit 'Ash Dragon' not found
activeAbilities List of active abilities (activated manually during the unit's turn)
{{#invoke:Unit|get|Ash Dragon|activeAbilities}}
Unit 'Ash Dragon' not found
passiveAbilities List of passive abilities (act continuously)
{{#invoke:Unit|get|Ash Dragon|passiveAbilities}}
Unit 'Ash Dragon' not found
alternativeAttacks List of alternative attacks (selected manually during the unit's turn)
{{#invoke:Unit|get|Ash Dragon|alternativeAttacks}}
Unit 'Ash Dragon' not found
hireBuildingsInCity Buildings where the unit can be hired in the city
{{#invoke:Unit|get|Ash Dragon|hireBuildingsInCity}}
Unit 'Ash Dragon' not found
hireBuildingsOnMap Buildings where the unit can be hired on the map
{{#invoke:Unit|get|Ash Dragon|hireBuildingsOnMap}}
Unit 'Ash Dragon' not found
stats.property Access to specific property in stats object
{{#invoke:Unit|get|Ash Dragon|stats.hp}}
Unit 'Ash Dragon' not found
baseClass.property Access to specific property in baseClass object
{{#invoke:Unit|get|Ash Dragon|baseClass.name}}
Unit 'Ash Dragon' not found
cost.property Access to specific property in unitCost object
{{#invoke:Unit|get|Ash Dragon|cost.gold}}
Unit 'Ash Dragon' not found
arrayName.index.property Access to specific property in array elements (e.g., activeAbilities.1.name)
{{#invoke:Unit|get|Ash Dragon|activeAbilities.1.name}}
Unit 'Ash Dragon' not found

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|Ash Dragon|name|en}}
    - English
  • {{#invoke:Unit|get|Ash Dragon|name|ru}}
    - Russian