Template:SkillRollTableDef

From Heroes of Might and Magic: Olden Era Official Wiki
Revision as of 01:14, 19 May 2026 by Ketura (talk | contribs) (obelisk-bot: Adding new tables for hero skill rolls)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

One row per skill-roll table — 24 rows total: the 12 standard (one per (faction, class_type)) plus 12 arena counterparts.

This is the header row for a roll table. The actual weights live in SkillRollWeightDef rows on the same page, joined via table_id.

Heroes point at a row here via the existing HeroClassDef.skills_roll_variant column (matches SkillRollTable.id). The redundant class_id column lets display templates also join in the other direction (HeroClass.id = SkillRollTable.class_id) without going through the variant name.

A roll table is "the weighted urn." The engine's slot-assignment logic (slot 1 = guaranteed upgrade of an existing non-Expert skill if any; slots 2-3 = weighted picks from this urn; pseudo-skill fallback when the urn can't supply 3 valid offerings) is not encoded in this data — it lives in game code we don't see. See SkillRollWeightDef for the per-skill weights and SkillRollBandDef for the level-grid metadata.

Schema

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

{{SkillRollTableDef
| id = String                  <!-- e.g. humans_might_skills_table -->
| class_id = String            <!-- e.g. might_human, matches HeroClass.id -->
| faction = String (allowed values=human,undead,dungeon,nature,demon,unfrozen)
| class_type = String (allowed values=might,magic)
| mode = String (allowed values=standard,arena)
| source_path = String         <!-- e.g. Core/DB/heroes_skills/skills_by_level_tables/humans_might_skills_table.json -->
}}

Field notes

  • id is the source-JSON's id field, matching the file basename. Standard tables: <faction_folder>_<class_type>_skills_table (e.g. humans_might_skills_table, necros_magic_skills_table). Arena tables: arenaGame_<faction_folder>_<class_type>_skills_table.
  • class_id is the canonical HeroClass id (<class_type>_<faction>, e.g. might_human), not the source folder spelling. Note the faction normalization: source folders use humans/demons/necros (plural / archaic), but the fraction field — and therefore class_id — uses the singular human/demon/undead form. Both standard and arena tables for the same class share the same class_id; query by mode to disambiguate.
  • mode separates the 12 standard tables (used in main-game level-ups) from the 12 arena tables (used in arena game modes; reference different SIDs under the arena_skill_* namespace). The arena table content is a deliberate transform of the standard — combat and magic-mastery skills get ~1.5× weight, adventure-map skills (logistics, scouting, economy, diplomacy, enlightenment, trainer, siege) are dropped entirely.
  • source_path is the relative path of the source JSON under the patch root, kept for traceability and to make the audit's "this table changed" report easy to follow.

Universal pool composition

Every standard table holds exactly 24 skills:

  • 22 universal non-faction skills (every class can roll these — including all four magic-element schools day/night/space/primal and all four magic-mastery skills sorcery/mastery/summoner/battlemage)
  • 1 class-signature skill: skill_battle_artistry in might tables, skill_wisdom in magic tables. Mutually exclusive at the data level — no engine-side filtering needed.
  • 1 own-faction skill (e.g. skill_faction_humans in humans tables).

Class identity is encoded entirely in the weight differences plus the signature swap. The magic-element block (day=80, night=20, space=60, primal=40) is class-invariant — a might hero has the same per-school magic-roll weights as a magic hero. Faction-thematic magic preference (if any) lives in specializations / faction laws / hero start kits, not here.

Related tables

  • SkillRollWeight — the per-skill weight rows (1:N, ~36 per table for standard).
  • SkillRollBand — small shared reference table listing the levels each band covers.
  • HeroClass — joined on HeroClass.id = SkillRollTable.class_id (1:N — each class has both a standard and an arena roll table). Also reachable via HeroClass.skills_roll_variant = SkillRollTable.id (1:1, picks one mode).
  • SkillRollReplacement — per-hero arena overrides; applies on top of an arena table's weights, not over a standard table.

Notes

  • The 50-level grid embedded in source skills_by_level_tables is design-space padding. The current shipping mechanics cap effective skill progression at ~24 level-ups (8 skill slots × 3 ranks); every band entry above that level is unreachable under current rules.
  • Campaign / custom-map / tutorial roll-table variants under skills_by_level_tables/campaign/ and .../custom_maps/ are not currently extracted — see deferral note in decisions.md.