<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.hoodedhorse.com/Heroes_of_Might_and_Magic_Olden_Era/index.php?action=history&amp;feed=atom&amp;title=Template%3ASkillRollReplacementDef</id>
	<title>Template:SkillRollReplacementDef - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.hoodedhorse.com/Heroes_of_Might_and_Magic_Olden_Era/index.php?action=history&amp;feed=atom&amp;title=Template%3ASkillRollReplacementDef"/>
	<link rel="alternate" type="text/html" href="https://wiki.hoodedhorse.com/Heroes_of_Might_and_Magic_Olden_Era/index.php?title=Template:SkillRollReplacementDef&amp;action=history"/>
	<updated>2026-10-10T10:22:28Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.5</generator>
	<entry>
		<id>https://wiki.hoodedhorse.com/Heroes_of_Might_and_Magic_Olden_Era/index.php?title=Template:SkillRollReplacementDef&amp;diff=18179&amp;oldid=prev</id>
		<title>76561198026315966: obelisk-bot: Adding new tables for hero skill rolls</title>
		<link rel="alternate" type="text/html" href="https://wiki.hoodedhorse.com/Heroes_of_Might_and_Magic_Olden_Era/index.php?title=Template:SkillRollReplacementDef&amp;diff=18179&amp;oldid=prev"/>
		<updated>2026-05-19T01:14:10Z</updated>

		<summary type="html">&lt;p&gt;obelisk-bot: Adding new tables for hero skill rolls&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
Per-hero overlay rows that bias certain heroes&amp;#039; skill rolls in arena game mode — &amp;#039;&amp;#039;&amp;#039;28 heroes&amp;#039;&amp;#039;&amp;#039; total, &amp;#039;&amp;#039;&amp;#039;~84 rows&amp;#039;&amp;#039;&amp;#039; (each hero typically has one skill at levels 2, 4, and 6). Extracted from a single source file: &amp;lt;code&amp;gt;Core/DB/heroes_skills/skills_by_level_replace_tables/skills_by_level_replace_table.json&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Each hero gets its own data page (&amp;lt;code&amp;gt;Data:SkillRollReplacement/&amp;lt;hero_id&amp;gt;&amp;lt;/code&amp;gt;); the hero&amp;#039;s 3-or-so level-keyed rows are inlined on that page. This matches the per-row-as-page convention used by &amp;lt;code&amp;gt;AttackPassive&amp;lt;/code&amp;gt; and the other small reference tables — one wiki page per &amp;quot;thing the player would search for.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Despite the source filename (&amp;quot;replace&amp;quot;), the data is best read as an &amp;#039;&amp;#039;&amp;#039;additive overlay&amp;#039;&amp;#039;&amp;#039; on top of the hero&amp;#039;s arena &amp;lt;code&amp;gt;SkillRollTable&amp;lt;/code&amp;gt; (not a wholesale replacement of the main pool for those levels). The structural argument: each entry typically lists one skill at very high weight (500 or 1000). If &amp;quot;replace&amp;quot; meant the entire roll table was swapped for these few entries, levels 2/4/6 would offer only that single skill — a deeply rigid pattern at odds with HoMM design conventions. The additive reading produces a strong-but-not-deterministic bias, which matches how flavor &amp;quot;signature skill nudges&amp;quot; work in other HoMM games. &amp;#039;&amp;#039;&amp;#039;Additive vs. replacement cannot be 100% verified without engine code&amp;#039;&amp;#039;&amp;#039; — wiki copy should hedge the wording.&lt;br /&gt;
&lt;br /&gt;
Faction distribution across the 28 heroes: &amp;#039;&amp;#039;&amp;#039;6 demon, 5 dungeon, 3 human, 5 nature, 3 necro, 6 unfrozen&amp;#039;&amp;#039;&amp;#039;. All overlays use the &amp;lt;code&amp;gt;arena_skill_*&amp;lt;/code&amp;gt; SID namespace; this table never applies in standard (non-arena) play.&lt;br /&gt;
&lt;br /&gt;
== Schema ==&lt;br /&gt;
{{#cargo_declare:_table=SkillRollReplacement&lt;br /&gt;
| hero_id = String&lt;br /&gt;
| arena_table_id = String&lt;br /&gt;
| level = Integer&lt;br /&gt;
| skill_id = String&lt;br /&gt;
| weight = Integer&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
{{SkillRollReplacementDef&lt;br /&gt;
| hero_id = String            &amp;lt;!-- matches HeroDef.id --&amp;gt;&lt;br /&gt;
| arena_table_id = String     &amp;lt;!-- matches SkillRollTable.id where mode=&amp;#039;arena&amp;#039; --&amp;gt;&lt;br /&gt;
| level = Integer             &amp;lt;!-- the level this overlay fires on --&amp;gt;&lt;br /&gt;
| skill_id = String           &amp;lt;!-- the skill SID (arena_skill_*) being biased --&amp;gt;&lt;br /&gt;
| weight = Integer            &amp;lt;!-- weight added on top of the arena table&amp;#039;s base weights --&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Field notes ==&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;&amp;lt;code&amp;gt;hero_id&amp;lt;/code&amp;gt;&amp;#039;&amp;#039;&amp;#039; joins to &amp;lt;code&amp;gt;HeroDef.id&amp;lt;/code&amp;gt;. Not all heroes have replacement rows — only the 28 listed here.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;&amp;lt;code&amp;gt;arena_table_id&amp;lt;/code&amp;gt;&amp;#039;&amp;#039;&amp;#039; is the arena &amp;lt;code&amp;gt;SkillRollTable&amp;lt;/code&amp;gt; the hero&amp;#039;s overlay applies on top of. Derivable from the hero&amp;#039;s faction and class_type (e.g. &amp;lt;code&amp;gt;human_hero_5&amp;lt;/code&amp;gt; is faction=human / class_type=might, so the parent arena table is &amp;lt;code&amp;gt;arenaGame_humans_might_skills_table&amp;lt;/code&amp;gt;). Materialized as a column for join convenience.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;&amp;lt;code&amp;gt;level&amp;lt;/code&amp;gt;&amp;#039;&amp;#039;&amp;#039; is one of &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;4&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;6&amp;lt;/code&amp;gt; in every observed row — corresponding to the three level-up events of an arena game (which caps at level 6). The source structure stores levels as a list within one entry; the bot expands that to one row per (hero, level) so per-level queries are uniform.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;&amp;lt;code&amp;gt;skill_id&amp;lt;/code&amp;gt;&amp;#039;&amp;#039;&amp;#039; uses the &amp;lt;code&amp;gt;arena_skill_*&amp;lt;/code&amp;gt; namespace, since this only fires in arena mode.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;&amp;lt;code&amp;gt;weight&amp;lt;/code&amp;gt;&amp;#039;&amp;#039;&amp;#039; is the raw bias weight (500 or 1000 in every observed row). For comparison, arena base weights top out at 225 for the heaviest combat skills, so a 1000-weight overlay decisively biases the offerings toward the named skill at those levels.&lt;br /&gt;
&lt;br /&gt;
== Example: &amp;lt;code&amp;gt;human_hero_5&amp;lt;/code&amp;gt; ==&lt;br /&gt;
The Knight hero &amp;lt;code&amp;gt;human_hero_5&amp;lt;/code&amp;gt; uses the standard &amp;lt;code&amp;gt;humans_might_skills_table&amp;lt;/code&amp;gt; in normal play (no overlay applies). In arena mode, they use &amp;lt;code&amp;gt;arenaGame_humans_might_skills_table&amp;lt;/code&amp;gt; as the base, plus the following overlay rows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! &amp;lt;code&amp;gt;hero_id&amp;lt;/code&amp;gt; !! &amp;lt;code&amp;gt;level&amp;lt;/code&amp;gt; !! &amp;lt;code&amp;gt;skill_id&amp;lt;/code&amp;gt; !! &amp;lt;code&amp;gt;weight&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;human_hero_5&amp;lt;/code&amp;gt; || 2 || &amp;lt;code&amp;gt;arena_skill_leadership&amp;lt;/code&amp;gt; || 1000&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;human_hero_5&amp;lt;/code&amp;gt; || 4 || &amp;lt;code&amp;gt;arena_skill_leadership&amp;lt;/code&amp;gt; || 1000&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;human_hero_5&amp;lt;/code&amp;gt; || 6 || &amp;lt;code&amp;gt;arena_skill_leadership&amp;lt;/code&amp;gt; || 1000&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
At those levels, the effective &amp;lt;code&amp;gt;arena_skill_leadership&amp;lt;/code&amp;gt; weight becomes &amp;lt;code&amp;gt;150 (arena base) + 1000 (overlay) = 1150&amp;lt;/code&amp;gt;, vs. a total pool weight of roughly &amp;lt;code&amp;gt;1500–1700&amp;lt;/code&amp;gt;. The hero is very likely (but not guaranteed) to be offered Leadership on each of these levels.&lt;br /&gt;
&lt;br /&gt;
== Display-layer query ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;All overlays for a specific hero:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{#cargo_query:&lt;br /&gt;
  tables=SkillRollReplacement&lt;br /&gt;
  | fields=level, skill_id, weight&lt;br /&gt;
  | where=hero_id=&amp;quot;human_hero_5&amp;quot;&lt;br /&gt;
  | order by=level, skill_id&lt;br /&gt;
  | format=table&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Effective arena weights at a specific hero/level&amp;#039;&amp;#039;&amp;#039; (combines the hero&amp;#039;s overlay with the arena table&amp;#039;s base weights and the special bands). Cargo joins are left joins, so a hero+level pair with no overlay row falls through with NULL — wrap with &amp;lt;code&amp;gt;COALESCE&amp;lt;/code&amp;gt; to keep the base weight intact:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{#cargo_query:&lt;br /&gt;
  tables=SkillRollWeight=W, SkillRollBand=B, SkillRollReplacement=R&lt;br /&gt;
  | join on=W.band_kind=B.id&lt;br /&gt;
  | join on=W.table_id=R.arena_table_id AND W.skill_id=R.skill_id AND R.level=20&lt;br /&gt;
  | fields=W.skill_id=Skill, SUM(W.weight + COALESCE(R.weight,0))=EffectiveWeight&lt;br /&gt;
  | where=W.table_id=&amp;quot;arenaGame_humans_might_skills_table&amp;quot;&lt;br /&gt;
          AND B.levels HOLDS &amp;quot;20&amp;quot;&lt;br /&gt;
  | group by=W.skill_id&lt;br /&gt;
  | order by=EffectiveWeight DESC&lt;br /&gt;
  | format=table&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related tables ==&lt;br /&gt;
* [[Template:HeroDef|Hero]] — joined on &amp;lt;code&amp;gt;hero_id = Hero.id&amp;lt;/code&amp;gt; (1:N).&lt;br /&gt;
* [[Template:SkillRollTableDef|SkillRollTable]] — joined on &amp;lt;code&amp;gt;arena_table_id = SkillRollTable.id&amp;lt;/code&amp;gt; (N:1).&lt;br /&gt;
* [[Template:SkillRollWeightDef|SkillRollWeight]] — the arena table&amp;#039;s base weights this overlay adds to.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* This data only fires in arena mode. Standard-mode heroes use only the &amp;lt;code&amp;gt;SkillRollWeight&amp;lt;/code&amp;gt; rows for their &amp;lt;code&amp;gt;SkillRollTable&amp;lt;/code&amp;gt;; no overlays apply.&lt;br /&gt;
* The arena game progression caps at 6 levels, which matches the maximum observed &amp;lt;code&amp;gt;level&amp;lt;/code&amp;gt; value in this table.&lt;br /&gt;
&lt;br /&gt;
[[Category:Cargo Definitions]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&amp;lt;includeonly&amp;gt;{{#cargo_store:_table=SkillRollReplacement&lt;br /&gt;
| hero_id = {{{hero_id|}}}&lt;br /&gt;
| arena_table_id = {{{arena_table_id|}}}&lt;br /&gt;
| level = {{{level|}}}&lt;br /&gt;
| skill_id = {{{skill_id|}}}&lt;br /&gt;
| weight = {{{weight|}}}&lt;br /&gt;
}}&lt;br /&gt;
Created &amp;lt;code&amp;gt;SkillRollReplacement&amp;lt;/code&amp;gt; entry: &amp;lt;code&amp;gt;{{{hero_id|}}}/{{{level|}}}/{{{skill_id|}}}&amp;lt;/code&amp;gt;&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>76561198026315966</name></author>
	</entry>
</feed>