Template:FactionDef: Difference between revisions
obelisk-bot: uploading initial Cargo templates |
obelisk-bot: uploading initial Cargo templates |
||
| Line 77: | Line 77: | ||
| desc_sid = {{{desc_sid|}}} | | desc_sid = {{{desc_sid|}}} | ||
| source_path = {{{source_path|}}} | | source_path = {{{source_path|}}} | ||
}}</includeonly> | }} | ||
Created <code>Faction</code> entry: <code>{{{id|}}}</code></includeonly> | |||
Revision as of 01:12, 13 May 2026
One row per faction (6 rows total: human, undead, dungeon,
nature, demon, unfrozen). Carries the structural data the
in-game faction record holds — display name, description, biome, signature resource, asset references — plus the SIDs the
FactionTranslation sibling joins on.
The bot emits one {{FactionDef | …}} template invocation at the top of each Data:Faction/<id> page, immediately followed by the
{{FactionTranslation | …}} row for the 15 non-English locales.
City-name pool entries are not on this page — they emit separately as EntryDef rows of type=FactionCityName (one row per city, see shared/Entry.md and D-025).
Faction laws (the fractionLawsLines skill-tree structure in source JSON) are deferred — that ships when the dedicated FactionLaw work lands. Until then the law tree shape is not surfaced on the wiki.
Schema
This template defines the table "Faction". View table.
{{FactionDef
| id = String (allowed values=human,undead,dungeon,nature,demon,unfrozen)
| name = String
| description = Wikitext
| icon = String
| icon_faction_laws = String
| biome = String
| resource = String
| name_sid = String
| desc_sid = String
| source_path = String
}}
Field notes
idis the primary key. Six fixed values;neutralis not a faction here even thoughFactionDefenum includes it for unit classification — there's no7_neutral.jsonsource file.name/desccarry the resolved English defaults inline. Translations live onFactionTranslationkeyed byname_sid/desc_sid. Per HoMM tradition the faction's display name is the town-style name: "Temple", "Necropolis", "Dungeon", "Grove", "Hive", "Schism".iconis the asset filename for the standard faction crest (e.g.fraction_human); the source JSON's misspelling is preserved here since it's an asset path, not a normalized concept.icon_faction_lawsis a separate icon used on the faction-laws panel (e.g.Scroll_Faction_Human). Renamed from JSON'siconFractionLaws.biomeis the faction's signature terrain (Grass,Deathland,Dirt,Autumn,Lava,Snow). One per faction, all distinct in the 2026-05-03 corpus.resourceis the faction's signature resource (gemstones,mercury,crystals). Renamed from JSON'sresourceName. Distribution: gemstones (human, dungeon), mercury (undead, unfrozen), crystals (nature, demon).source_pathis the JSON path relative toCore/, useful for audit / diff traceability.
Dropped from source
The source JSON's narrativeDesc field references SIDs of the form
<id>_narrative_desc that exist in no language file in the
2026-05-03 corpus. Dead pointer; we drop the field entirely. If a future patch populates the SIDs, we'll add the column back.
Related tables
- FactionTranslation — joined on
id = faction_id(1:1) for the 15 non-English locales. EntryDefwheretype='FactionCityName'— joined viasubtype LIKE '<faction>_%'to surface this faction's randomization-pool city names.- Unit — joined via
Unit.faction = Faction.id(1:N).


