<?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=Module%3AHeroClassData%2Fdoc</id>
	<title>Module:HeroClassData/doc - 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=Module%3AHeroClassData%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://wiki.hoodedhorse.com/Heroes_of_Might_and_Magic_Olden_Era/index.php?title=Module:HeroClassData/doc&amp;action=history"/>
	<updated>2026-09-19T09:28:44Z</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=Module:HeroClassData/doc&amp;diff=20420&amp;oldid=prev</id>
		<title>76561198256426587: Created page with &quot;This module allows for the dynamic extraction of all variables, combat growth coefficients, and translations for hero classes stored within the wiki&#039;s Cargo database (specifically from the &lt;code&gt;HeroClass&lt;/code&gt; and &lt;code&gt;Translation&lt;/code&gt; tables). It automatically handles localized fallback to English if a translation in the requested language is missing.  == Basic Syntax == To fetch a data field, use the following syntax: &lt;pre&gt;{{#invoke:HeroClassData|get|CLASS_ID|VARI...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.hoodedhorse.com/Heroes_of_Might_and_Magic_Olden_Era/index.php?title=Module:HeroClassData/doc&amp;diff=20420&amp;oldid=prev"/>
		<updated>2026-05-25T19:06:37Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;This module allows for the dynamic extraction of all variables, combat growth coefficients, and translations for hero classes stored within the wiki&amp;#039;s Cargo database (specifically from the &amp;lt;code&amp;gt;HeroClass&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Translation&amp;lt;/code&amp;gt; tables). It automatically handles localized fallback to English if a translation in the requested language is missing.  == Basic Syntax == To fetch a data field, use the following syntax: &amp;lt;pre&amp;gt;{{#invoke:HeroClassData|get|CLASS_ID|VARI...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This module allows for the dynamic extraction of all variables, combat growth coefficients, and translations for hero classes stored within the wiki&amp;#039;s Cargo database (specifically from the &amp;lt;code&amp;gt;HeroClass&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Translation&amp;lt;/code&amp;gt; tables). It automatically handles localized fallback to English if a translation in the requested language is missing.&lt;br /&gt;
&lt;br /&gt;
== Basic Syntax ==&lt;br /&gt;
To fetch a data field, use the following syntax:&lt;br /&gt;
&amp;lt;pre&amp;gt;{{#invoke:HeroClassData|get|CLASS_ID|VARIABLE|LANGUAGE_CODE}}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;&amp;lt;code&amp;gt;CLASS_ID&amp;lt;/code&amp;gt;&amp;#039;&amp;#039;&amp;#039; : The technical identifier of the hero class (e.g., &amp;lt;code&amp;gt;might_dungeon&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;magic_undead&amp;lt;/code&amp;gt;).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;&amp;lt;code&amp;gt;VARIABLE&amp;lt;/code&amp;gt;&amp;#039;&amp;#039;&amp;#039; : The keyword for the specific data field you want to display (see the list below).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;&amp;lt;code&amp;gt;LANGUAGE_CODE&amp;lt;/code&amp;gt;&amp;#039;&amp;#039;&amp;#039; : &amp;#039;&amp;#039;(Optional)&amp;#039;&amp;#039; The localization code (e.g., &amp;lt;code&amp;gt;en&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;fr&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;pl&amp;lt;/code&amp;gt;). Defaults to English (&amp;lt;code&amp;gt;en&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
== Available Variables ==&lt;br /&gt;
&lt;br /&gt;
=== 📝 Text &amp;amp; Translations (Language-Dependent) ===&lt;br /&gt;
These variables query the &amp;lt;code&amp;gt;Translation&amp;lt;/code&amp;gt; table using the &amp;lt;code&amp;gt;type=&amp;quot;hero_class&amp;quot;&amp;lt;/code&amp;gt; filter and dynamically adapt to the requested language code.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%;&amp;quot;&lt;br /&gt;
! Variable !! Description !! Example Output (en)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; || The localized name of the hero class. || Overlord&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;description&amp;lt;/code&amp;gt; || The localized official description, detailing mechanical behavior and class identity. || Might Hero. Upon leveling up, most of the time gains Attack...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ⚔️ Initial Attributes ===&lt;br /&gt;
The starting statistics given to any hero belonging to this class (queried from the &amp;lt;code&amp;gt;HeroClass&amp;lt;/code&amp;gt; table).&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%;&amp;quot;&lt;br /&gt;
! Variable !! Description !! Value&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;offence&amp;lt;/code&amp;gt; || Base Attack attribute. || 2&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;defence&amp;lt;/code&amp;gt; || Base Defense attribute. || 2&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;spell_power&amp;lt;/code&amp;gt; || Base Spell Power attribute. || 2&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;intelligence&amp;lt;/code&amp;gt; || Base Knowledge / Intelligence attribute. || 1&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;luck&amp;lt;/code&amp;gt; || Base Luck value. || 0&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;morale&amp;lt;/code&amp;gt; || Base Morale value. || 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== 📈 Stat Probability Growth (Leveling up) ===&lt;br /&gt;
Weights determining the percentage chance of a specific stat increasing upon reaching a new level.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%;&amp;quot;&lt;br /&gt;
! Variable !! Description !! Example (might_dungeon)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;roll_lvl1_attack&amp;lt;/code&amp;gt; || % chance to gain Attack between levels 1 and 23. || 30&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;roll_lvl1_defense&amp;lt;/code&amp;gt; || % chance to gain Defense between levels 1 and 23. || 35&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;roll_lvl1_power&amp;lt;/code&amp;gt; || % chance to gain Spell Power between levels 1 and 23. || 20&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;roll_lvl1_knowledge&amp;lt;/code&amp;gt; || % chance to gain Knowledge between levels 1 and 23. || 15&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;roll_lvl24_attack&amp;lt;/code&amp;gt; || % chance to gain Attack at level 24 and above. || 25&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;roll_lvl24_defense&amp;lt;/code&amp;gt; || % chance to gain Defense at level 24 and above. || 25&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;roll_lvl24_power&amp;lt;/code&amp;gt; || % chance to gain Spell Power at level 24 and above. || 25&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;roll_lvl24_knowledge&amp;lt;/code&amp;gt; || % chance to gain Knowledge at level 24 and above. || 25&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ⚙️ Technical Properties ===&lt;br /&gt;
Miscellaneous configuration variables mapped out in the class template definition.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%;&amp;quot;&lt;br /&gt;
! Variable !! Description !! Example&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;faction&amp;lt;/code&amp;gt; || The structural faction this class belongs to. || &amp;lt;code&amp;gt;dungeon&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;class_type&amp;lt;/code&amp;gt; || The primary archetype profile. || &amp;lt;code&amp;gt;might&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;magic&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;native_biome&amp;lt;/code&amp;gt; || The preferred battlefield and movement environment. || &amp;lt;code&amp;gt;Dirt&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;skills_roll_variant&amp;lt;/code&amp;gt; || The table pointer determining skill weight probabilities. || &amp;lt;code&amp;gt;dungeon_might_skills_table&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;cost_gold&amp;lt;/code&amp;gt; || Hiring fee required to purchase a hero of this class. || 2500&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;enable_tactics&amp;lt;/code&amp;gt; || Boolean indicating if the Tactics phase is enabled. || &amp;lt;code&amp;gt;yes&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;no&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
== Practical Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Example 1: Fetching Localized Class Names ===&lt;br /&gt;
To display the French name of the Overlord class:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{#invoke:HeroClassData|get|might_dungeon|name|fr}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Output:&amp;#039;&amp;#039;&amp;#039; Suzerain&lt;br /&gt;
&lt;br /&gt;
=== Example 2: Building Template Integration ===&lt;br /&gt;
When listing a hero inside a dynamically generated row, use their underlying &amp;lt;code&amp;gt;class_id&amp;lt;/code&amp;gt; to output their localized class text natively:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
The hero belongs to the {{#invoke:HeroClassData|get|{{{class_id}}}|name|{{{lang|en}}}}} archetype.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Module Documentation]]&lt;/div&gt;</summary>
		<author><name>76561198256426587</name></author>
	</entry>
</feed>