Template:ItemBox/doc: Difference between revisions

Jump to navigation Jump to search
Jannepg (talk | contribs)
mNo edit summary
Jannepg (talk | contribs)
Updated documentation for the new ItemBox
Line 1: Line 1:
{{TS}}
{{TS}}
A port of the initial box in [[Template:Infobox item]] with links, for use on pages that could use it without the whole infobox.
The data for each item is populated from [[Data:ItemData.json]] and retrieved by [[Module:ItemData]].
All data for each item is populated using data from [[Data:ItemData.json]], retrieved by [[Module:ItemData]].
===Examples===
===Examples===
<pre>
<pre>
{{ItemBox|itemName = Spirit Shredder Bullets|link=Basic Magazine}}  
{{ItemBox|Close Quarters}}
{{ItemBox|itemName = High-Velocity Rounds}}
{{ItemBox|Spirit Shredder Bullets}}
{{ItemBox|itemName = Titanic Magazine}}  
{{ItemBox|Shadow Weave}}
{{ItemBox|itemName = Shadow Weave}}
{{ItemBox|Silencer}}
{{ItemBox|itemName = Dispel Magic}}
{{ItemBox|Haunting Shot}}
{{ItemBox|itemName = Duration Extender}}
{{ItemBox|Extra Health}}
{{ItemBox|itemName = Improved Spirit}}
{{ItemBox|Bullet Lifesteal|overrideLinkClick = Bullet_Lifesteal_(item)}}
{{ItemBox|itemName = Bullet Lifesteal|link=Bullet Lifesteal (item)}}
{{ItemBox|Dispel Magic}}
{{ItemBox|itemName = Custom Item|item_price=800|item_type=Weapon|ignore=1}}
{{ItemBox|Unstoppable}}
{{ItemBox|Celestial Blessing}}
{{ItemBox|Golden Goose Egg}}
{{ItemBox|Duration Extender|overrideIsImbue = true}}
{{ItemBox|Surge of Power|overrideIsImbue = true}}
{{ItemBox|Echo Shard|overrideIsImbue = true}}
{{ItemBox|Frostbite Charm}}
</pre>
</pre>
{{ItemBox|itemName = Spirit Shredder Bullets|overrideLinkClick=Basic Magazine}}  
 
{{ItemBox|itemName = High-Velocity Rounds}}
{{ItemBox|Close Quarters}}
{{ItemBox|itemName = Titanic Magazine}}  
{{ItemBox|Spirit Shredder Bullets}}
{{ItemBox|itemName = Shadow Weave}}
{{ItemBox|Shadow Weave}}
{{ItemBox|itemName = Dispel Magic}}
{{ItemBox|Silencer}}
{{ItemBox|itemName = Duration Extender}}
{{ItemBox|Haunting Shot}}
{{ItemBox|itemName = Improved Spirit}}
{{ItemBox|Extra Health}}
{{ItemBox|itemName = Bullet Lifesteal|overrideLinkClick=Bullet Lifesteal (item)}}
{{ItemBox|Bullet Lifesteal|overrideLinkClick = Bullet_Lifesteal_(item)}}
<!--{{ItemBox|itemName = Custom Item|item_price=800|item_type=Weapon|ignore=1}}-->
{{ItemBox|Dispel Magic}}
{{ItemBox|Unstoppable}}
{{ItemBox|Celestial Blessing}}
{{ItemBox|Golden Goose Egg}}
{{ItemBox|Duration Extender|overrideIsImbue = true}}
{{ItemBox|Surge of Power|overrideIsImbue = true}}
{{ItemBox|Echo Shard|overrideIsImbue = true}}
{{ItemBox|Frostbite Charm}}
 
<pre>
{{ItemBox|Restorative Shot|showTierTag = true}}
{{ItemBox|High-Velocity Rounds|overrideDisplayName = Test Name}}
{{ItemBox|Intensifying Magazine|overrideTier = 4}}
{{ItemBox|Weakening Headshot|overrideSlot = Tech}}
{{ItemBox|Recharging Rush|overrideIsActive = true}}
{{ItemBox|Alchemical Fire|overrideIsImbue = true}}
{{ItemBox|Ballistic Enchantment|overrideLinkTooltip = Extended Magazine}}
{{ItemBox|Escalating Resilience|overrideLinkImage = Extended Magazine}}
{{ItemBox|Headhunter|overrideLinkClick = Extended Magazine}}
</pre>
 
{{ItemBox|Restorative Shot|showTierTag = true}}
{{ItemBox|High-Velocity Rounds|overrideDisplayName = Test Name}}
{{ItemBox|Intensifying Magazine|overrideTier = 4}}
{{ItemBox|Weakening Headshot|overrideSlot = Tech}}
{{ItemBox|Recharging Rush|overrideIsActive = true}}
{{ItemBox|Alchemical Fire|overrideIsImbue = true}}
{{ItemBox|Ballistic Enchantment|overrideLinkTooltip = Extended Magazine}}
{{ItemBox|Escalating Resilience|overrideLinkImage = Extended Magazine}}
{{ItemBox|Headhunter|overrideLinkClick = Extended Magazine}}
<templatedata>
<templatedata>
{
{
"params": {
"params": {
"item_name": {
"itemName": {
"description": "Name of the item",
"description": "Name of the item. Will be used to get the item data from [[Module:ItemData]]",
"example": "Basic Magazine",
"example": "Extended Magazine",
"type": "string",
"type": "string",
"required": true,
"required": true,
"aliases": [
"aliases": ["1"]
"1"
]
},
},
"link": {
"showTierTag": {
"description": "The name of the item's link in cases where item_name is incorrect",
"description": "Enable a tag top right on the card to show its tier.",
"example": "Bullet Lifesteal (item)",
"example": "true",
"type": "string"
},
"overrideDisplayName": {
"description": "Overrides the name that is displayed on the card.",
"example": "Test",
"type": "string"
},
"overrideTier": {
"description": "Overrides the cards tier.",
"example": "1, 2, 3, 4 or 5",
"type": "string"
},
"overrideSlot": {
"description": "Overrides the cards slot type.",
"example": "Weapon, Armor or Tech",
"type": "string"
},
"overrideIsActive": {
"description": "Overrides the ACTIVE tag.",
"example": "true or false",
"type": "string"
"type": "string"
},
},
        "item_loc": {
"overrideIsImbue": {
"description": "The name of the item, when is needed get data from a item, but print other item's name.",
"description": "Overrides the IMBUE tag.",
"example": "Bullet Lifesteal (item)",
"example": "true or false",
"type": "string"
"type": "string"
},
},
"item_type": {
"overrideLinkTooltip": {
"description": "Overrides default item type. See Module:ItemData",
"description": "Overrides the link from where the tooltip gets its info.",
"example": "Spirit",
"example": "Extended Magazine",
"type": "string",
"type": "string"
"suggestedvalues": [
"Weapon",
"Vitality",
"Spirit"
]
},
},
"item_price": {
"overrideLinkImage": {
"description": "Overrides default item price. See Module:ItemData",
"description": "Overrides the link from where ItemBox gets the image.",
"example": "500",
"example": "Extended Magazine",
"type": "number"
"type": "string"
},
},
"ignore": {
"overrideLinkClick": {
"description": "Skip database lookups for items not in ItemData.json. When set to 1, the template will not attempt to retrieve data from Module:ItemData and will use default or override values only. Useful for custom items, test items, or items not yet in the database.",
"description": "The name of the item's link in cases where itemName is incorrect",
"example": "1",
"example": "Bullet Lifesteal (item)",
"type": "boolean",
"type": "string"
"suggestedvalues": [
"1 or 0"
]
}
}
},
},
"paramOrder": [
"paramOrder": [
"item_name",
"itemName",
"link",
"showTierTag",
         "item_loc",
         "overrideDisplayName",
"item_type",
"overrideTier",
"item_price",
"overrideSlot",
"ignore"
"overrideIsActive",
"overrideIsImbue",
"overrideLinkTooltip",
"overrideLinkImage",
"overrideLinkClick"
],
],
"format": "inline"
"format": "inline"
}
}
</templatedata><noinclude>[[Category:Template documentation]]</noinclude>
</templatedata><noinclude>[[Category:Template documentation]]</noinclude>