Template:StatBonusRollDef

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)

The endgame stat-bonus fallback pool — 12 rows, class- and faction-invariant. When the hero's main skill-roll pool can't supply 3 valid offerings on a level-up (because they have no learnable new skills available and fewer than 3 non-Expert skills they could rank up), the engine fills the empty offering slots from this table instead.

Each row is a "pseudo skill" granting a flat permanent bonus to one primary stat. There are 4 stats × 3 magnitude tiers = 12 entries. Empirically extracted from Core/DB/heroes_skills/skills/pseudo_skills.json and the [-2] band of any skills_by_level_tables file (the band content is byte-identical across all 24 standard + arena files, confirming the universal-pool reading).

Schema

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

{{StatBonusRollDef
| id = String                      <!-- skill_pseudo_1 through skill_pseudo_12 -->
| stat = String (allowed values=offence,defence,spellPower,intelligence)
| magnitude = Integer              <!-- the +N value added to the stat -->
| weight = Integer                 <!-- raw weight in the fallback urn -->
<!-- Localization references — display text lives in the Translation table, type='stat_bonus_roll' -->
| name_sid = String                <!-- always 'skill_pseudo_name' (shared across all 12) -->
| desc_sid = String                <!-- per-row, e.g. 'skill_pseudo_1_desc' -->
}}

Canonical row contents

id stat magnitude weight within-tier share (4-way uniform) tier share of all fallback rolls
skill_pseudo_1 offence 1 50000 25% Tier 1 (+1): 99.0%
skill_pseudo_2 defence 1 50000 25%
skill_pseudo_3 spellPower 1 50000 25%
skill_pseudo_4 intelligence 1 50000 25%
skill_pseudo_5 offence 2 500 25% Tier 2 (+2): 0.99%
skill_pseudo_6 defence 2 500 25%
skill_pseudo_7 spellPower 2 500 25%
skill_pseudo_8 intelligence 2 500 25%
skill_pseudo_9 offence 3 5 25% Tier 3 (+3): 0.0025% (≈1 in 40,000)
skill_pseudo_10 defence 3 5 25%
skill_pseudo_11 spellPower 3 5 25%
skill_pseudo_12 intelligence 3 5 25%

Total fallback-pool weight: 202,020 = 4×50,000 + 4×500 + 4×5.

When does this fire

Player-observed behavior: the fallback only appears in late-game runs. Specifically, an offering slot gets filled from this table when the engine's main roll cannot produce a valid offering — i.e. when every weighted draw from SkillRollWeight resolves to either "skill the hero doesn't have a slot for" (8 slots full and the rolled skill isn't already learned) or "skill the hero already has at Expert" (so it can't be ranked up further).

Concretely:

  • Early game (1-2 skills, plenty of empty slots): zero fallback rolls per level. All 3 offerings come from the main pool.
  • Mid game (slots full, some upgrade paths remaining): zero fallback rolls — the upgrade slot mechanic absorbs the "I already have this" rolls.
  • Endgame (most skills at Expert): increasing number of fallback rolls until eventually all 3 offering slots come from here.

The +3 bonus tier is statistically near-mythical under current mechanics. With a per-fallback-roll probability of 1 in ~40,000 and the fallback firing only in endgame, a typical player will never see a +3 stat option. Could be design-space padding for a future high-level mode, intentional easter-egg, or vestigial test scaffolding — JSON alone can't disambiguate.

Localization

The 12 rows share a single name_sid (skill_pseudo_name) — the player-facing name is the same generic label for all twelve. desc_sid differs per row (skill_pseudo_1_desc through skill_pseudo_12_desc), with each describing the specific stat and magnitude granted.

Translation rows live in the Translation table under type='stat_bonus_roll', one row per (language, target_id) for the desc; the shared name gets one Translation row keyed on skill_pseudo_name with a free-floating target.

Related tables

  • SkillRollWeight — the main pool; this table is the engine's fallback when the main pool runs out of valid offerings.
  • Translation — display text in every language, joined on id = Translation.target_id WHERE Translation.type='stat_bonus_roll'.