Template:LawLevelDef: Difference between revisions
From Heroes of Might and Magic: Olden Era Official Wiki
obelisk-bot: uploading initial Cargo templates |
obelisk-bot: uploading initial Cargo templates |
||
| Line 38: | Line 38: | ||
| cost = {{{cost|}}} | | cost = {{{cost|}}} | ||
| description = {{{description|}}} | | description = {{{description|}}} | ||
}}</includeonly> | }} | ||
Created <code>LawLevel</code> entry: <code>{{{law_id|}}} (level {{{level|}}})</code></includeonly> | |||
Revision as of 01:12, 13 May 2026
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), and the resolved description for that level's parameter substitutions. 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 -->
| description = Wikitext <!-- resolved English with this level's params -->
}}
Field notes
- Primary key is
(law_id, level). costis the per-level law-points spend, drawn fromparametersPerLevel[level-1].cost. Each level's cost stands alone — leveling a law from L1 → L2 spends both costs in sequence.descriptionis the parent law'sdesc_sidtext resolved with this level's bonus parameters (via the newCurrentFractionLawConfiginterpreter op, mirroringCurrentMagicBattle/CurrentItem).- No
namecolumn — the law's name is shared across all levels and lives onLaw.name/TranslationDef.
Related tables
- Law — joined on
law_id = Law.id(N:1). BonusDef— joined onparent_type='law_level' AND parent_id = law_id || '_L' || level.- LawLevelTranslationDef — joined on
(law_id, level). Carries per-level descriptions in 15 non-English languages.


