Template:ItemSetTierDef: 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
 
(One intermediate revision by the same user not shown)
Line 11: Line 11:
| required_amount = Integer
| required_amount = Integer
| description_sid = String
| description_sid = String
| description = Wikitext
}}
}}


Line 21: Line 20:
| required_amount = Integer          <!-- pieces equipped to unlock -->
| required_amount = Integer          <!-- pieces equipped to unlock -->


| description_sid = String
| description_sid = String           <!-- display text lives in the Translation table, type='item_set_tier' -->
| description = Wikitext            <!-- resolved English -->
}}
}}
</nowiki></pre>
</nowiki></pre>
Line 30: Line 28:
* '''<code>set_id</code>''' is the parent — duplicated here as a column so filtering by set doesn't require parsing the composite id.
* '''<code>set_id</code>''' is the parent — duplicated here as a column so filtering by set doesn't require parsing the composite id.
* '''<code>required_amount</code>''' values seen in the 2026-05-03 corpus: 2 (×17 tiers), 3 (×11), 4 (×7), 5 (×2), 6 (×2), 8 (×1).
* '''<code>required_amount</code>''' values seen in the 2026-05-03 corpus: 2 (×17 tiers), 3 (×11), 4 (×7), 5 (×2), 6 (×2), 8 (×1).
* '''<code>description</code>''' carries the resolved English text inline. Translations live on a <code><nowiki>{{TranslationDef | type=item_set_tier | target_id=<id>}}</nowiki></code> row (desc-only — tiers have no name).
* '''Description''' for every language (English included) lives in the [[Template:TranslationDef|Translation]] table, <code>type='item_set_tier'</code> (description only — tiers have no name).


== Related tables ==
== Related tables ==
* [[Template:ItemSetDef|ItemSet]] — joined on <code>set_id = id</code> (N:1).
* [[Template:ItemSetDef|ItemSet]] — joined on <code>set_id = id</code> (N:1).
* [[Template:BonusDef|<code>BonusDef</code>]] — joined on <code>id = parent_id</code> (1:N) where <code>Bonus.parent_type = 'item_set_tier'</code>. Each tier has 1-6 bonus effects.
* [[Template:BonusDef|<code>BonusDef</code>]] — joined on <code>id = parent_id</code> (1:N) where <code>Bonus.parent_type = 'item_set_tier'</code>. Each tier has 1-6 bonus effects.
* [[Template:TranslationDef|<code>TranslationDef</code>]] — one row per tier with <code>type=item_set_tier</code> and the description SIDs for the 15 non-English locales.
* [[Template:TranslationDef|Translation]] — the tier's description in every language (English included), joined on <code>id = Translation.target_id WHERE Translation.type='item_set_tier' AND Translation.language='{{{lang|en}}}'</code> (1:N, one row per language).


== Notes ==
== Notes ==
Line 47: Line 45:
| description_sid = {{{description_sid|}}}
| description_sid = {{{description_sid|}}}
| description = {{{description|}}}
| description = {{{description|}}}
}}</includeonly>
}}
Created <code>ItemSetTier</code> entry: <code>{{{id|}}}</code></includeonly>

Latest revision as of 20:48, 14 May 2026

One unlock tier of an ItemSetDef. The hero unlocks the tier's bonuses when they have `required_amount` artifacts from the parent set equipped. Sets have 1-3 tiers each (~37 tiers across the 24 sets in the 2026-05-03 corpus).

The bot emits these inline on the parent Data:ItemSet/<id> page. There are no individual Data:ItemSetTier/… pages.

Schema

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

{{ItemSetTierDef
| id = String                        <!-- synthesized: <set_id>_tier_<ordinal> -->
| set_id = String                    <!-- joins ItemSet.id -->
| ordinal = Integer                  <!-- 0-based position in source bonuses[] -->
| required_amount = Integer          <!-- pieces equipped to unlock -->

| description_sid = String           <!-- display text lives in the Translation table, type='item_set_tier' -->
}}

Field notes

  • Primary key is id. The synthesized form <set_id>tier<ordinal> lets Bonus.parent_id join cleanly via parent_type='item_set_tier'.
  • set_id is the parent — duplicated here as a column so filtering by set doesn't require parsing the composite id.
  • required_amount values seen in the 2026-05-03 corpus: 2 (×17 tiers), 3 (×11), 4 (×7), 5 (×2), 6 (×2), 8 (×1).
  • Description for every language (English included) lives in the Translation table, type='item_set_tier' (description only — tiers have no name).

Related tables

  • ItemSet — joined on set_id = id (N:1).
  • BonusDef — joined on id = parent_id (1:N) where Bonus.parent_type = 'item_set_tier'. Each tier has 1-6 bonus effects.
  • Translation — the tier's description in every language (English included), joined on id = Translation.target_id WHERE Translation.type='item_set_tier' AND Translation.language='en' (1:N, one row per language).

Notes