Template:LawTreePositionDef
One row per law placement in a faction's law screen. Production laws (~198) each get exactly one row; test laws get none (they don't appear in any faction's fractionLawsLines).
Captures the display layout of the law tree as shown in-game: which side (Faction column / Army column), which slot within that side, and which tier row. The balance-relevant tier is duplicated here from Law.tier for convenience — LawTreePositionDef is the table to query when reconstructing the screen layout, while Law.tier is the table to query when asking "where in the balance-tree does this law live."
Page layout
LawTreePositionDef rows are emitted inline on the parent FactionDef page (no separate Data:LawTreePosition/… pages):
{{LawTreePositionDef | faction=human | tier=1 | side=faction | slot=0 | law_id=fraction_law_human_3}}
{{LawTreePositionDef | faction=human | tier=1 | side=faction | slot=1 | law_id=fraction_law_human_2}}
…
Schema
This template defines the table "LawTreePosition". View table.
{{LawTreePositionDef
| faction = String <!-- human, demon, dungeon, nature, undead, unfrozen -->
| tier = Integer <!-- 1-5 -->
| side = String <!-- faction | army -->
| slot = Integer <!-- 0-based position within (faction, tier, side) -->
| law_id = String
}}
Field notes
- Primary key is
(faction, tier, side, slot), which is also unique onlaw_id(each law occupies exactly one tree position). sideis derived from the sourcegroups[]index:groups[0]→"faction",groups[1]→"army". Mirrors the in-game screen labels (left = "Faction", right = "Army").slotis the law's index within itsgroups[k].laws[]array (0-based). Laws per side range from 2 to 4.tieris the row index offractionLawsLines[](1-based on emit, 0-based in source).
Related tables
- Law — joined on
law_id = Law.id(1:1 for placed laws). - FactionLawTier — joined on
(faction, tier)for the unlock threshold at this row. - Faction — joined on
faction = Faction.id.


