Template:SkillRollWeightDef

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 (table, band_kind, skill). The substance of the skill-roll system — every individual weight a hero might encounter when their class's roll table fires.

Per-table row counts are uniform across the 12 standard tables (the level-grid structure is class-invariant; only the weights and the signature-skill SID swap):

  • 24 rows in the default band (the full skill pool).
  • 4 rows in the magic_levels band (the four magic-element schools).
  • 6 rows in the level_20_mega band (those four schools plus faction + class-signature).
  • 2 rows in the signature_levels band (faction + class-signature).

Total: 36 rows per standard table × 12 = ~432 rows for standard. Arena tables share the same shape with slightly smaller pools.

Bands are additive. The effective weight for skill S at level L is the SUM of weights across every band whose SkillRollBand.levels list contains L. The query pattern is documented under "Display-layer query patterns" below.

Schema

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

{{SkillRollWeightDef
| table_id = String           <!-- matches SkillRollTable.id -->
| band_kind = String (allowed values=default,magic_levels,signature_levels,level_20_mega)
| skill_id = String           <!-- matches Skill.id, or a pseudo / faction skill SID -->
| weight = Integer            <!-- raw weight (not a percentage). Lower bound 1 (omitted = not in this band). -->
}}

Field notes

  • weight is the raw chance integer from source JSON. It is not a percentage — to get a per-roll probability, divide by the sum of all active weights at the queried level. Empirical range: 20 (magic_night, weakest) to 200 (own faction skill, strongest) in standard tables; up to 1000 in arena per-hero overrides.
  • band_kind enumerates the four roll bands. All four exist in every standard table; arena tables share the same band kinds. The grid of which levels each band covers is class-invariant and lives in SkillRollBandDef.
  • skill_id is the skill SID (joins to SkillDef.id). The default band always includes the table's own-faction skill (e.g. skill_faction_humans in humans tables) and its class-signature skill (skill_battle_artistry for might, skill_wisdom for magic). The other three bands hold only the magic-element / faction / signature subset relevant to the milestone.

Class-signature exclusivity

skill_battle_artistry appears in only the 6 might tables; skill_wisdom appears in only the 6 magic tables. This exclusivity is encoded in the data — there is no engine-side filter to enforce it. A magic class cannot roll battle_artistry; a might class cannot roll wisdom.

The same skills also appear in the per-table level_20_mega and signature_levels overlays (with overlay weights, additive on top of the default).

Display-layer query patterns

Base weights for a class (no level filter):

{{#cargo_query:
  tables=SkillRollWeight
  | fields=skill_id, weight
  | where=table_id="humans_might_skills_table" AND band_kind="default"
  | order by=weight DESC, skill_id
  | format=table
}}

Effective weights at a specific level (sums all bands containing that level):

{{#cargo_query:
  tables=SkillRollWeight=W, SkillRollBand=B
  | join on=W.band_kind=B.id
  | fields=W.skill_id=Skill, SUM(W.weight)=EffectiveWeight
  | where=W.table_id="humans_might_skills_table"
          AND B.levels HOLDS "20"
  | group by=W.skill_id
  | order by=EffectiveWeight DESC
  | format=table
}}

For non-milestone levels (1, 2, 3, 6, 7, 9, …), only the default band matches, so this query returns the same result as the base-weights query. For levels matching one or more overlay bands (4, 5, 8, 10, 20, …), the overlay weights add to the default.

To get a true per-roll probability: divide EffectiveWeight by the SUM of EffectiveWeight across all skills returned by the same query.

Caveats for player-facing presentation

The raw weight does not translate to "% chance to see this skill on level-up" without several caveats:

  • The game presents 3 offerings per level. Slot 1 is reserved as a guaranteed upgrade of an existing non-Expert skill (if any exist); only slots 2-3 are drawn from this weighted urn. Per-skill "chance to appear in slots 2-3" is approximately 1 − (1 − p)² where p is the single-roll probability.
  • The engine does not appear to filter the urn by hero state before drawing — if the roll lands on a skill the hero already has at Basic, the game displays it as the Advanced upgrade option. So the same data row can manifest as a Basic offering for one hero and an Advanced offering for another.
  • When the hero has fewer than 3 valid "unexpert and learnable" slots available, leftover offering slots are filled from the StatBonusRoll table instead — these are not drawn from SkillRollWeight.

Related tables

  • SkillRollTable — the header row (1:N).
  • SkillRollBand — the levels each band_kind covers (1:N from band side).
  • Skill — joined on skill_id = Skill.id for full skill metadata (name, description, mastery levels).
  • StatBonusRoll — the fallback pool when the main pool can't fill all 3 offering slots.