Template:ArtifactDef: Difference between revisions
From Heroes of Might and Magic: Olden Era Official Wiki
obelisk-bot: uploading initial Cargo templates Tag: Manual revert |
obelisk-bot: uploading initial Cargo templates |
||
| Line 6: | Line 6: | ||
The bot emits each artifact at <code>Data:Artifact/<id></code> carrying: | The bot emits each artifact at <code>Data:Artifact/<id></code> carrying: | ||
# <code><nowiki>{{ArtifactDef | id=… | name=… | description=… | slot=… | rarity=… | …}}</nowiki></code> — main row | # <code><nowiki>{{ArtifactDef | id=… | name=… | description=… | slot=… | rarity=… | …}}</nowiki></code> — main row. | ||
# <code><nowiki>{{TranslationDef | type=artifact | target_id=<id> | …}}</nowiki></code> — name + description i18n | # <code><nowiki>{{TranslationDef | type=artifact | target_id=<id> | …}}</nowiki></code> — name + description i18n. | ||
# N × <code><nowiki>{{BonusDef | parent_type=artifact | parent_id=<id> | …}}</nowiki></code> — | # N × <code><nowiki>{{BonusDef | parent_type=artifact | parent_id=<id> | …}}</nowiki></code> — bonuses, in the unified Bonus table. | ||
== Schema == | == Schema == | ||
| Line 36: | Line 36: | ||
| source_path = String | | source_path = String | ||
}} | }} | ||
== Related tables == | == Related tables == | ||
* [[Template:ItemSetDef|ItemSet]] — joined on <code>Artifact.artifact_set_id = ItemSet.id</code> | * [[Template:ItemSetDef|ItemSet]] — joined on <code>Artifact.artifact_set_id = ItemSet.id</code>. | ||
* [[Template:BonusDef|Bonus]] — joined on <code>Artifact.id = Bonus.parent_id</code> | * [[Template:BonusDef|Bonus]] — joined on <code>Artifact.id = Bonus.parent_id</code>, filtered by <code>Bonus.parent_type='artifact'</code>. | ||
* [[Template:TranslationDef|Translation]] — one row per artifact with <code>type=artifact</code>, joined on <code>Artifact.id = Translation.target_id</code>. | * [[Template:TranslationDef|Translation]] — one row per artifact with <code>type=artifact</code>, joined on <code>Artifact.id = Translation.target_id</code>. | ||
| Line 111: | Line 67: | ||
| can_apply_bonus_always = {{{can_apply_bonus_always|}}} | | can_apply_bonus_always = {{{can_apply_bonus_always|}}} | ||
| source_path = {{{source_path|}}} | | source_path = {{{source_path|}}} | ||
}}</includeonly> | }} | ||
Created <code>Artifact</code> entry: <code>{{{id|}}}</code></includeonly> | |||
Revision as of 01:12, 13 May 2026
This template defines and stores rows for the Artifact Cargo table. One row per artifact / equipment item. 304 rows in the 2026-05-03 corpus, across 13 source slot files (armor, head, ring, boots, back, belt, right_hand, left_hand, item_slot, unic_slot, magic_scroll, enchante_magic_scroll, mythic_scroll_box).
The source folder is DB/items/items/ — using the JSON's "item" spelling. The wiki side uses artifact per the in-game player-facing label.
The bot emits each artifact at Data:Artifact/<id> carrying:
{{ArtifactDef | id=… | name=… | description=… | slot=… | rarity=… | …}}— main row.{{TranslationDef | type=artifact | target_id=<id> | …}}— name + description i18n.- N ×
{{BonusDef | parent_type=artifact | parent_id=<id> | …}}— bonuses, in the unified Bonus table.
Schema
This template defines the table "Artifact". View table.
Related tables
- ItemSet — joined on
Artifact.artifact_set_id = ItemSet.id. - Bonus — joined on
Artifact.id = Bonus.parent_id, filtered byBonus.parent_type='artifact'. - Translation — one row per artifact with
type=artifact, joined onArtifact.id = Translation.target_id.


