Template:UnitAbilityDef: Difference between revisions
From Heroes of Might and Magic: Olden Era Official Wiki
obelisk-bot: uploading initial Cargo templates |
obelisk-bot: uploading initial Cargo templates |
||
| Line 2: | Line 2: | ||
Parent table. One row per ability slot on every unit, regardless of type. Identity + L10n keys only — type-specific scalars live in splinter tables joined on <code>ability_id</code>. | Parent table. One row per ability slot on every unit, regardless of type. Identity + L10n keys only — type-specific scalars live in splinter tables joined on <code>ability_id</code>. | ||
The wiki-side templates (<code>{{ActiveAbility}}</code>, <code>{{PassiveAbility}}</code>, …) each call <code>#cargo_store</code> against this table AND against their respective splinter table in a single template invocation. The bot picks the right template name per row based on <code>ability_type</code>. | The wiki-side templates (<code><nowiki>{{ActiveAbility}}</nowiki></code>, <code><nowiki>{{PassiveAbility}}</nowiki></code>, …) each call <code>#cargo_store</code> against this table AND against their respective splinter table in a single template invocation. The bot picks the right template name per row based on <code>ability_type</code>. | ||
== Schema == | == Schema == | ||
| Line 12: | Line 12: | ||
| variant = String (allowed values=base,advanced,upg,upg_alt) | | variant = String (allowed values=base,advanced,upg,upg_alt) | ||
| name = String | | name = String | ||
| | | description = Wikitext | ||
| name_sid = String | | name_sid = String | ||
| desc_sid = String | | desc_sid = String | ||
| Line 25: | Line 25: | ||
| variant = String (allowed values=base,advanced,upg,upg_alt) | | variant = String (allowed values=base,advanced,upg,upg_alt) | ||
| name = String | | name = String | ||
| | | description = Wikitext | ||
| name_sid = String | | name_sid = String | ||
| desc_sid = String | | desc_sid = String | ||
| Line 60: | Line 60: | ||
| variant = {{{variant|}}} | | variant = {{{variant|}}} | ||
| name = {{{name|}}} | | name = {{{name|}}} | ||
| | | description = {{{description|}}} | ||
| name_sid = {{{name_sid|}}} | | name_sid = {{{name_sid|}}} | ||
| desc_sid = {{{desc_sid|}}} | | desc_sid = {{{desc_sid|}}} | ||
}}</includeonly> | }}</includeonly> | ||
Revision as of 00:02, 13 May 2026
Parent table. One row per ability slot on every unit, regardless of type. Identity + L10n keys only — type-specific scalars live in splinter tables joined on ability_id.
The wiki-side templates ({{ActiveAbility}}, {{PassiveAbility}}, …) each call #cargo_store against this table AND against their respective splinter table in a single template invocation. The bot picks the right template name per row based on ability_type.
Schema
This template defines the table "UnitAbility". View table.
{{UnitAbilityDef
| ability_id = String <!-- synthetic; primary join key -->
| unit_id = String
| ability_type = String (allowed values=active,passive,conditional_passive,global_passive,aura,stat_passive,buff,debuff,selfbuff,additionbuff,copy_buff,curse,blood,other)
| ordinal = Integer
| variant = String (allowed values=base,advanced,upg,upg_alt)
| name = String
| description = Wikitext
| name_sid = String
| desc_sid = String
}}
Field notes
ability_idis the universal join key. Format:<unit_id>[_<ability_type>]<ordinal>[<variant>], whereactiveis omitted from the type slot andbaseis omitted from the variant slot. Seedocs/cargo/README.mdfor the full convention.ability_typeis the discriminator. The wiki layer uses it to decide which splinter to join against.active— formerly namedabilityin older patches. Joined toUnitAbilityActiveDef.passive/conditional_passive/global_passive/aura/stat_passive— each joined to its like-named splinter.buff/debuff/selfbuff/additionbuff/copy_buff/curse/blood/other— discovered via SID family but have no unit-side splinter. Their payload lives in a futureBufftable keyed onname_sid.
variantisnullfor the base/default form,"advanced"/"upg"/"upg_alt"for the appropriate variant SID family. Two rows with the same(unit_id, ability_type, ordinal)but differentvariantrepresent the same ability slot in different unit tiers.name/descare the English defaults. Translations are inUnitAbilityTranslation, joined onability_id.
Related tables
- UnitAbilityActive — splinter for
active. - UnitAbilityPassive — splinter for
passive. - UnitAbilityConditional — splinter for
conditional_passive. - UnitAbilityGlobal — splinter for
global_passive. - UnitAbilityAura — splinter for
aura. - UnitAbilityStatPassive — splinter for
stat_passive. - UnitAbilityTranslation — i18n companion (1:1).
- Unit — parent on
unit_id = id(N:1).


