Template:HeroStartSquadDef

From Heroes of Might and Magic: Olden Era Official Wiki

One row per slot in a hero's starting army. Each hero has 1-3 primary slots (variant=primary) and 1 alt slot (variant=alt). Across the 108 faction heroes in the 2026-05-03 corpus: 100 have 3 primary slots, 5 have 2, 3 have 1; all 108 have exactly 1 alt slot.

The bot emits these rows on the parent Data:Hero/<id> page, after the {{HeroDef}} and {{TranslationDef}} blocks.

Schema

This template defines the table "HeroStartSquad". View table.

{{HeroStartSquadDef
| hero_id = String                <!-- joins Hero.id -->
| variant = String (allowed values=primary,alt)
| slot = Integer                  <!-- 1-based position within the variant -->
| unit_id = String                <!-- joins Unit.id -->
| min = Integer
| max = Integer
}}

Field notes

  • Primary key is (hero_id, variant, slot).
  • variant distinguishes the source's parallel arrays startSquad (primary) and startSquadAlt (alt). Source data has alt as always exactly 1 slot of the form (unit_id, min=1, max=1) in the 2026-05-03 corpus, but the schema preserves min/max in case future patches diverge.
  • unit_id references a Unit.id (e.g. esquire, crossbowman, griffin). The source JSON's key is sid but the column name uses _id to match the foreign-key convention used elsewhere — the _sid suffix is reserved for L10n token references.
  • min/max define the random count range for that slot at battle start. Primary slots have meaningful ranges (e.g. 14-20 esquires); alt slots are typically 1-1.

Related tables

  • Hero — joined on hero_id = id (N:1).
  • Unit — joined on unit_id = id (N:1).

Notes