Template:HeroSubClassDef: Difference between revisions
From Heroes of Might and Magic: Olden Era Official Wiki
obelisk-bot: uploading initial Cargo templates |
obelisk-bot: Pushing translation table rework |
||
| Line 4: | Line 4: | ||
The bot emits each sub-class at <code>Data:HeroSubClass/<id></code> carrying: | The bot emits each sub-class at <code>Data:HeroSubClass/<id></code> carrying: | ||
# <code><nowiki>{{HeroSubClassDef | id | # <code><nowiki>{{HeroSubClassDef | id=… | activation_skill_1_sid=… | …}}</nowiki></code> — main row with the 5 activation thresholds inline. | ||
# <code><nowiki>{{TranslationDef | type=hero_sub_class | target_id=<id> | …}}</nowiki></code> — name/description | # N × <code><nowiki>{{TranslationDef | type=hero_sub_class | target_id=<id> | language=… | …}}</nowiki></code> — name/description, one row per language. | ||
# N × <code><nowiki>{{HeroSubClassBonus | sub_class_id=<id> | ordinal=N | …}}</nowiki></code> — the unlocked passive bonuses (~2 per sub-class, 46 total). | # N × <code><nowiki>{{HeroSubClassBonus | sub_class_id=<id> | ordinal=N | …}}</nowiki></code> — the unlocked passive bonuses (~2 per sub-class, 46 total). | ||
| Line 11: | Line 11: | ||
{{#cargo_declare:_table=HeroSubClass | {{#cargo_declare:_table=HeroSubClass | ||
| id = String | | id = String | ||
| name_sid = String | | name_sid = String | ||
| desc_sid = String | | desc_sid = String | ||
| Line 34: | Line 32: | ||
{{HeroSubClassDef | {{HeroSubClassDef | ||
| id = String <!-- sub_class_<faction>_<might|magic>_<1|2> --> | | id = String <!-- sub_class_<faction>_<might|magic>_<1|2> --> | ||
<!-- Localization references — display text lives in the Translation table, type='hero_sub_class' --> | |||
| name_sid = String | | name_sid = String | ||
| desc_sid = String | | desc_sid = String | ||
| Line 46: | Line 44: | ||
in the 2026-05-03 corpus. Each pair references a future Skill SID | in the 2026-05-03 corpus. Each pair references a future Skill SID | ||
and the rank the hero must reach. subSkillSids (always empty in | and the rank the hero must reach. subSkillSids (always empty in | ||
2026-05-03) is dropped | 2026-05-03) is dropped. --> | ||
| activation_skill_1_sid = String | | activation_skill_1_sid = String | ||
| activation_skill_1_level = Integer | | activation_skill_1_level = Integer | ||
| Line 64: | Line 62: | ||
== Field notes == | == Field notes == | ||
* '''<code>id</code>''' matches the L10n SID prefix (e.g. <code>sub_class_human_might_1</code> → "Swashbuckler"). | * '''<code>id</code>''' matches the L10n SID prefix (e.g. <code>sub_class_human_might_1</code> → "Swashbuckler"). | ||
* '''<code>name_sid</code> / <code>desc_sid</code>''' point at <code><id>_name</code> / <code><id>_desc</code>. Full 16-language coverage. | * '''<code>name_sid</code> / <code>desc_sid</code>''' point at <code><id>_name</code> / <code><id>_desc</code>, surfaced for traceability. Full 16-language coverage. | ||
* ''' | * '''Display name / description''' for every language (English included) live in the [[Template:TranslationDef|Translation]] table, <code>type='hero_sub_class'</code>. | ||
* '''Activation conditions are joined by AND''' — the hero must hit all 5 skill thresholds to unlock the sub-class. | * '''Activation conditions are joined by AND''' — the hero must hit all 5 skill thresholds to unlock the sub-class. | ||
* '''Per-faction-class matchup:''' every (faction × class_type) cell has exactly 2 sub-classes. Looking up "what sub-classes are available to a magic Demon hero?" → <code>WHERE faction='demon' AND class_type='magic'</code> → 2 rows (Progenitor, Lord of Chaos). | * '''Per-faction-class matchup:''' every (faction × class_type) cell has exactly 2 sub-classes. Looking up "what sub-classes are available to a magic Demon hero?" → <code>WHERE faction='demon' AND class_type='magic'</code> → 2 rows (Progenitor, Lord of Chaos). | ||
| Line 73: | Line 71: | ||
* [[Template:HeroClassDef|HeroClass]] — same join; HeroSubClass is the prestige progression on top of the broader HeroClass. | * [[Template:HeroClassDef|HeroClass]] — same join; HeroSubClass is the prestige progression on top of the broader HeroClass. | ||
* [[HeroSubClassBonus]] — joined on <code>id = sub_class_id</code> (1:N). | * [[HeroSubClassBonus]] — joined on <code>id = sub_class_id</code> (1:N). | ||
* [[Template:SkillDef|Skill]] — joined on <code>activation_skill_<N>_sid = Skill.id</code>. | |||
* [[Template:TranslationDef| | * [[Template:TranslationDef|Translation]] — display text in every language (English included), joined on <code>id = Translation.target_id WHERE Translation.type='hero_sub_class' AND Translation.language='{{{lang|en}}}'</code> (1:N, one row per language). | ||
== Notes == | == Notes == | ||
| Line 81: | Line 79: | ||
</noinclude><includeonly>{{#cargo_store:_table=HeroSubClass | </noinclude><includeonly>{{#cargo_store:_table=HeroSubClass | ||
| id = {{{id|}}} | | id = {{{id|}}} | ||
| name_sid = {{{name_sid|}}} | | name_sid = {{{name_sid|}}} | ||
| desc_sid = {{{desc_sid|}}} | | desc_sid = {{{desc_sid|}}} | ||
Latest revision as of 20:48, 14 May 2026
A named prestige class — Swashbuckler, Paragon, Grand Inquisitor, Ascendant, etc. — that a hero unlocks by hitting **5 specific skill thresholds**. 24 rows total: 4 per faction × 6 factions, split 2 might + 2 magic per faction.
The bot emits each sub-class at Data:HeroSubClass/<id> carrying:
{{HeroSubClassDef | id=… | activation_skill_1_sid=… | …}}— main row with the 5 activation thresholds inline.- N ×
{{TranslationDef | type=hero_sub_class | target_id=<id> | language=… | …}}— name/description, one row per language. - N ×
{{HeroSubClassBonus | sub_class_id=<id> | ordinal=N | …}}— the unlocked passive bonuses (~2 per sub-class, 46 total).
Schema
This template defines the table "HeroSubClass". View table.
{{HeroSubClassDef
| id = String <!-- sub_class_<faction>_<might|magic>_<1|2> -->
<!-- Localization references — display text lives in the Translation table, type='hero_sub_class' -->
| name_sid = String
| desc_sid = String
| icon = String
| faction = String (allowed values=human,undead,dungeon,nature,demon,unfrozen)
| class_type = String (allowed values=might,magic)
<!-- 5 activation thresholds, flattened. Every sub-class has exactly 5
in the 2026-05-03 corpus. Each pair references a future Skill SID
and the rank the hero must reach. subSkillSids (always empty in
2026-05-03) is dropped. -->
| activation_skill_1_sid = String
| activation_skill_1_level = Integer
| activation_skill_2_sid = String
| activation_skill_2_level = Integer
| activation_skill_3_sid = String
| activation_skill_3_level = Integer
| activation_skill_4_sid = String
| activation_skill_4_level = Integer
| activation_skill_5_sid = String
| activation_skill_5_level = Integer
| source_path = String
}}
Field notes
idmatches the L10n SID prefix (e.g.sub_class_human_might_1→ "Swashbuckler").name_sid/desc_sidpoint at<id>_name/<id>_desc, surfaced for traceability. Full 16-language coverage.- Display name / description for every language (English included) live in the Translation table,
type='hero_sub_class'. - Activation conditions are joined by AND — the hero must hit all 5 skill thresholds to unlock the sub-class.
- Per-faction-class matchup: every (faction × class_type) cell has exactly 2 sub-classes. Looking up "what sub-classes are available to a magic Demon hero?" →
WHERE faction='demon' AND class_type='magic'→ 2 rows (Progenitor, Lord of Chaos).
Related tables
- Hero — joins via
Hero.faction = HeroSubClass.faction AND Hero.class_type = HeroSubClass.class_type. Each hero qualifies for the 2 sub-classes in their faction × class_type cell. - HeroClass — same join; HeroSubClass is the prestige progression on top of the broader HeroClass.
- HeroSubClassBonus — joined on
id = sub_class_id(1:N). - Skill — joined on
activation_skill_<N>_sid = Skill.id. - Translation — display text in every language (English included), joined on
id = Translation.target_id WHERE Translation.type='hero_sub_class' AND Translation.language='en'(1:N, one row per language).


