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>{{ArtifactDef | id=… | name=… | description=… | slot=… | rarity=… | …}}</code> — main row with English defaults inline plus the SIDs for all four localizable fields (name, description, upgrade_description, narrative_description). | # <code><nowiki>{{ArtifactDef | id=… | name=… | description=… | slot=… | rarity=… | …}}</nowiki></code> — main row with English defaults inline plus the SIDs for all four localizable fields (name, description, upgrade_description, narrative_description). | ||
# <code>{{TranslationDef | type=artifact | target_id=<id> | …}}</code> — name + description i18n (per D-026). | # <code><nowiki>{{TranslationDef | type=artifact | target_id=<id> | …}}</nowiki></code> — name + description i18n (per D-026). | ||
# N × <code>{{BonusDef | parent_type=artifact | parent_id=<id> | …}}</code> — the artifact's bonuses, in the unified Bonus table (per D-031). | # N × <code><nowiki>{{BonusDef | parent_type=artifact | parent_id=<id> | …}}</nowiki></code> — the artifact's bonuses, in the unified Bonus table (per D-031). | ||
== Schema == | == Schema == | ||
| Line 82: | Line 82: | ||
== Related tables == | == Related tables == | ||
* [[Template:ItemSetDef|ItemSet]] — joined on | * [[Template:ItemSetDef|ItemSet]] — joined on | ||
Revision as of 00:02, 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 with English defaults inline plus the SIDs for all four localizable fields (name, description, upgrade_description, narrative_description).{{TranslationDef | type=artifact | target_id=<id> | …}}— name + description i18n (per D-026).- N ×
{{BonusDef | parent_type=artifact | parent_id=<id> | …}}— the artifact's bonuses, in the unified Bonus table (per D-031).
Schema
This template defines the table "Artifact". View table.
{{ArtifactDef
| id = String
| name = String
| description = Wikitext
| name_sid = String
| description_sid = String
| upgrade_description_sid = String <!-- shown when the artifact levels up -->
| upgrade_description = Wikitext
| narrative_description_sid = String <!-- flavor text -->
| narrative_description = Wikitext
| icon = String
| slot = String <!-- armor, head, ring, item_slot, ... -->
| rarity = String (allowed values=common,rare,epic,legendary)
| artifact_set_id = String <!-- joins ItemSet.id -->
| goods_value = Integer <!-- gold value when sold -->
| max_level = Integer <!-- 1 = non-upgradable; higher = upgradable -->
<!-- Sparse: only present on artifacts that can level up -->
| cost_base = Integer <!-- cost to upgrade from level 1 to 2 -->
| cost_per_level = Integer <!-- additional cost per subsequent level -->
| reward_for_destroy = Integer <!-- crystal/etc. reward when destroyed -->
| is_special_item = Boolean <!-- magic scrolls and a few specials -->
| use_expand_tooltip = Boolean
| can_destroy = Boolean
| can_apply_bonus_always = Boolean
| source_path = String
}}
Field notes
slotis one of 10 distinct values.item_slotis the catch-all for non-equipment items (magic scrolls live here).unic_slotis for one-of-a-kind unique items. The values preserve the source's lowercase-snake spelling.raritycounts in the 2026-05-03 corpus: rare (114), common (101), epic (50), legendary (39).artifact_set_idis sparse — 83 of 304 artifacts belong to a set. Joins to a futureArtifactSettable (deferred per D-031). Renamed from source'sitemSetfor terminology consistency.max_level= 1 means the artifact doesn't upgrade. Artifacts withmax_level > 1carrycost_base+cost_per_levelpopulated.is_special_itemis true for magic scrolls and a few special items — they typically usebonuses[].type=heroMagicAdditionto add a spell to the hero's spellbook. The field name preserves the source's spelling rather than renaming tois_special_artifact(the source field isisSpecialItem).use_expand_tooltipin source ships as both bool and the string"false"on different artifacts; the bot normalizes to a proper bool.- No sub-fields for the
bonuses[]here — they emit as separateBonusrows. Query artifacts with their bonuses viatables=Artifact, Bonus | join on=Artifact.id=Bonus.parent_id | where=Bonus.parent_type='artifact'.
Related tables
- ItemSet — joined on


