Template:LawLevelDef

From Heroes of Might and Magic: Olden Era Official Wiki
Revision as of 20:48, 14 May 2026 by Ketura (talk | contribs) (obelisk-bot: Pushing translation table rework)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

One row per (law, level) pair. The 198 production laws contribute roughly 415 LawLevel rows (most laws have 2 levels; some have 1 or 3). Test laws add another ~80 rows.

Each level carries the law-points cost to enact (separate from the tier-unlock threshold). The resolved description for that level's parameter substitutions lives in the Translation table. Bonuses awarded at this level are emitted as {{BonusDef | parent_type=law_level | parent_id=<law_id>_L<level> | …}} rows.

Schema

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

{{LawLevelDef
| law_id = String
| level = Integer            <!-- 1-based; 1..max_level -->
| cost = Integer             <!-- law points to enact this level -->
}}

Field notes

  • Primary key is (law_id, level).
  • cost is the per-level law-points spend, drawn from parametersPerLevel[level-1].cost. Each level's cost stands alone — leveling a law from L1 → L2 spends both costs in sequence.
  • Per-level description for every language (English included) lives in the Translation table as type='law_level' rows keyed by target_id=<law_id> + variant=<level>. The text is the parent law's desc_sid resolved with this level's bonus parameters (via the CurrentFractionLawConfig interpreter op, mirroring CurrentMagicBattle / CurrentItem).
  • No name — the law's name is shared across all levels and lives in Translation as type='law'.

Related tables

  • Law — joined on law_id = Law.id (N:1).
  • BonusDef — joined on parent_type='law_level' AND parent_id = law_id || '_L' || level.
  • Translation — per-level descriptions in every language (English included), joined on law_id = Translation.target_id AND level = Translation.variant WHERE Translation.type='law_level' (1:N, one row per language).