Template:BonusDef: 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 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
A unified Cargo table for bonus effects across multiple parent entity types. | A unified Cargo table for bonus effects across multiple parent entity types. Hero specializations, hero sub-classes, artifacts, item-set tiers, and faction laws all share one Bonus table with <code>parent_type</code> + <code>parent_id</code> discriminator columns. | ||
<code>parent_id</code> discriminator columns | |||
The bot emits each row inline on the parent entity's wiki page. There are no individual <code>Data:Bonus/…</code> pages. | The bot emits each row inline on the parent entity's wiki page. There are no individual <code>Data:Bonus/…</code> pages. | ||
| Line 25: | Line 21: | ||
| fraction = String | | fraction = String | ||
}} | }} | ||
== Field notes == | == Field notes == | ||
* | * Primary key is <code>(parent_type, parent_id, ordinal)</code>. | ||
* | * <code>parent_type</code> identifies the parent: <code>hero_specialization</code>, <code>hero_sub_class</code>, <code>artifact</code>, <code>item_set_tier</code>, <code>law_level</code>. | ||
* <code>type</code> is the effect category (~13 distinct values; <code>heroStat</code>, <code>unitStat</code>, <code>heroBattleAbility</code> most common). | |||
* <code>parameters</code> is comma-joined, type-dependent. | |||
* Sparse fields vary by parent type. | |||
* <code>action_area</code> (law-bonus only) qualifies which side an effect applies to. | |||
* <code>fraction</code> (law-bonus only) is a target-faction filter; column name preserves the source JSON's misspelling. | |||
* | |||
* | |||
* | |||
* | |||
* | |||
[[Category:Cargo Definitions]] | [[Category:Cargo Definitions]] | ||
| Line 81: | Line 47: | ||
| action_area = {{{action_area|}}} | | action_area = {{{action_area|}}} | ||
| fraction = {{{fraction|}}} | | fraction = {{{fraction|}}} | ||
}}</includeonly> | }} | ||
Created <code>Bonus</code> entry: <code>{{{parent_type|}}}/{{{parent_id|}}} #{{{ordinal|}}}</code></includeonly> | |||
Latest revision as of 20:47, 14 May 2026
A unified Cargo table for bonus effects across multiple parent entity types. Hero specializations, hero sub-classes, artifacts, item-set tiers, and faction laws all share one Bonus table with parent_type + parent_id discriminator columns.
The bot emits each row inline on the parent entity's wiki page. There are no individual Data:Bonus/… pages.
Schema
This template defines the table "Bonus". View table.
Field notes
- Primary key is
(parent_type, parent_id, ordinal). parent_typeidentifies the parent:hero_specialization,hero_sub_class,artifact,item_set_tier,law_level.typeis the effect category (~13 distinct values;heroStat,unitStat,heroBattleAbilitymost common).parametersis comma-joined, type-dependent.- Sparse fields vary by parent type.
action_area(law-bonus only) qualifies which side an effect applies to.fraction(law-bonus only) is a target-faction filter; column name preserves the source JSON's misspelling.


