Difference between revisions of "Item info"
Stratonian (talk | contribs) m (raw material categorization) |
Stratonian (talk | contribs) m (item quality outline) |
||
Line 4: | Line 4: | ||
category | category | ||
if a name parameter is given, it is assumed that the template isn't on the item's main article, therefore it isn't categorized | if a name parameter is given, it is assumed that the template isn't on the item's main article, therefore it isn't categorized | ||
− | -->{{#vardefine: | + | -->{{#vardefine:type text|{{#switch:{{lc:{{{category|}}}}} |
|armor=[[Armor]] | |armor=[[Armor]] | ||
|artifacts=[[Artifact]] | |artifacts=[[Artifact]] | ||
Line 16: | Line 16: | ||
}}}}<!-- | }}}}<!-- | ||
-->{{#if:{{{name|}}}<!-- if a name parameter is not given | -->{{#if:{{{name|}}}<!-- if a name parameter is not given | ||
− | -->||{{#if:{{#var: | + | -->||{{#if:{{#var:type text}}<!-- if the type is correct (i.e. type text exists) |
− | -->|{{#ifeq:{{#var: | + | -->|{{#ifeq:{{#var:type text}}|[[Raw Material]]<!-- if item is a raw material |
-->|{{#arraydefine:professions|{{#ask:[[Has ingredient::?;{{PAGENAME}}]]<!-- get recipes with item as ingredient | -->|{{#arraydefine:professions|{{#ask:[[Has ingredient::?;{{PAGENAME}}]]<!-- get recipes with item as ingredient | ||
-->|?Has profession=|mainlabel=-|link=none}}}}<!-- get professions used in recipe | -->|?Has profession=|mainlabel=-|link=none}}}}<!-- get professions used in recipe | ||
Line 24: | Line 24: | ||
-->|[[Category:@ Raw Materials]]}}}}<!-- categorize | -->|[[Category:@ Raw Materials]]}}}}<!-- categorize | ||
-->|[[Category:{{sc|{{{category}}}}}]]}}}}}}<!-- else add to category | -->|[[Category:{{sc|{{{category}}}}}]]}}}}}}<!-- else add to category | ||
+ | |||
+ | -->{{#vardefine:quality class|{{#switch:{{lc:{{{quality|}}}}} | ||
+ | |common=quality-common | ||
+ | |uncommon=quality-uncommon | ||
+ | |rare=quality-rare | ||
+ | |epic=quality-epic | ||
+ | |legendary=quality-legendary | ||
+ | |#default=quality-common<!-- items with no quality are assumed to be common --> | ||
+ | }}}}<!-- | ||
quests | quests | ||
− | -->{{#arraydefine: | + | -->{{#arraydefine:quest text|{{{quests}}}|;}}<!-- |
TABLE --> | TABLE --> | ||
Line 34: | Line 43: | ||
item icon | item icon | ||
-->{{#if:{{{icon|}}}<!-- if icon exists | -->{{#if:{{{icon|}}}<!-- if icon exists | ||
− | -->|[[{{{icon}}}|85px]]<!-- use provided icon | + | -->|<span class="{{#var:quality class}}">[[{{{icon}}}|85px]]</span><!-- use provided icon |
-->|{{#vardefine:defaultIcon|File:{{#replace:{{#titleparts:{{PAGENAME}}}}|:|-}}.png}}<!-- else use default icon | -->|{{#vardefine:defaultIcon|File:{{#replace:{{#titleparts:{{PAGENAME}}}}|:|-}}.png}}<!-- else use default icon | ||
-->{{#ifexist:{{#var:defaultIcon}}<!-- if default icon exists | -->{{#ifexist:{{#var:defaultIcon}}<!-- if default icon exists | ||
− | -->|[[{{#var:defaultIcon}}|85px]]<!-- use default icon | + | -->|<span class="{{#var:quality class}}">[[{{#var:defaultIcon}}|85px]]</span><!-- use default icon |
-->|[[{{#var:defaultIcon}}|Upload item icon.]]}}}}<!-- else prompt for icon upload | -->|[[{{#var:defaultIcon}}|Upload item icon.]]}}}}<!-- else prompt for icon upload | ||
--></center> | --></center> | ||
|- | |- | ||
! colspan="2" class="<!-- set backgrond color | ! colspan="2" class="<!-- set backgrond color | ||
− | -->{{#ifeq:{{#var: | + | -->{{#ifeq:{{#var:type text}}|[[Quest Item]]<!-- if item is a quest item |
-->|quest-item<!-- use quest item color | -->|quest-item<!-- use quest item color | ||
− | -->|{{# | + | -->|{{#var:quality class}}<!-- else use item quality color |
− | --> | + | -->" | <center>{{{name|{{PAGENAME}}}}}</center><!-- name --> |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
− | {{#if:{{#var: | + | {{#if:{{#var:type text}}|{{!}}class="skill-infobox-row-heading"{{!}}'''Type'''{{!}}{{!}}class="skill-infobox-row-data"{{!}}{{#var:type text}}}} |
|- | |- | ||
{{#if:{{{quality|}}}|{{!}}class="skill-infobox-row-heading"{{!}}'''[[Quality]]'''{{!}}{{!}}class="skill-infobox-row-data"{{!}}{{ucfirst:{{lc:{{{quality}}}}}}}}} | {{#if:{{{quality|}}}|{{!}}class="skill-infobox-row-heading"{{!}}'''[[Quality]]'''{{!}}{{!}}class="skill-infobox-row-data"{{!}}{{ucfirst:{{lc:{{{quality}}}}}}}}} | ||
Line 61: | Line 64: | ||
{{#if:{{{level|}}}|{{!}}class="skill-infobox-row-heading"{{!}}'''Req. [[Level]]'''{{!}}{{!}}class="skill-infobox-row-data"{{!}}{{{level}}}}} | {{#if:{{{level|}}}|{{!}}class="skill-infobox-row-heading"{{!}}'''Req. [[Level]]'''{{!}}{{!}}class="skill-infobox-row-data"{{!}}{{{level}}}}} | ||
|- | |- | ||
− | {{#if:{{{quests|}}}|{{!}}class="skill-infobox-row-heading"{{!}}'''Involved In'''{{!}}{{!}}class="skill-infobox-row-data"{{!}}{{#arrayprint: | + | {{#if:{{{quests|}}}|{{!}}class="skill-infobox-row-heading"{{!}}'''Involved In'''{{!}}{{!}}class="skill-infobox-row-data"{{!}}{{#arrayprint:quest text|<br>|@|[[@]]}}}}<!-- formats the quests array --> |
|- | |- | ||
{{#if:{{{value|}}}|{{!}}class="skill-infobox-row-heading"{{!}}'''Value'''{{!}}{{!}}class="skill-infobox-row-data"{{!}}{{stat|Gold|{{{value}}}|nolabel=yes}}}} | {{#if:{{{value|}}}|{{!}}class="skill-infobox-row-heading"{{!}}'''Value'''{{!}}{{!}}class="skill-infobox-row-data"{{!}}{{stat|Gold|{{{value}}}|nolabel=yes}}}} |
Revision as of 21:47, 2 September 2023
Description
Displays an information page about an item.
Usage
{{Item info|<icon=icon>|<name=name>|<tooltip=tooltip>|<description=description>|<tier=I>|<stats=28 Weapon Damage>|<duration=120>|<level=1>|<mastery=Destroyer>|<value=1>|<category=category>|<quests=Quest 1; Quest 2>}}
Parameters
- icon: An image of the item.
- Optional. Defaults to '
{{PAGENAME}}.png
'. - Notes: Only use if the icon name differs from the name of the page.
- change: Displays a note stating that the Item's appearance may change.
- Optional.
- Notes: Set to any value to enable.
- name: The name of the item.
- Optional. Defaults to '
{{PAGENAME}}
'. - Notes: Only use if the template is on a different page to the item's main article.
- binding: The binding of the item.
- Optional.
- Notes: Only use if the item is bound. Choose between '
equip
', 'pickup
', or a custom binding.
- quality: The item's quality.
- Optional.
- Notes: Input ranges of qualities with '
[quality1]-[quality2]
'.
- tier: The item's tier.
- Optional.
- Notes: In roman numerals.
- stats: A comma-separated list of the item's stat values and names.
- Optional.
- Notes: e.g. '
[stat1]: [value1], [stat2]: [value2], etc.
'
- satiety effect: A comma-separated list of the item's satiety effect stat values and names.
- Optional.
- Notes: e.g. '
[value1] [stat1], [value2] [stat2], etc.
'
- hero: The hero required for item use.
- Optional.
- Notes: If the '
mastery
' parameter is specified, do not use this parameter.
Possible categories:
- •Armor
- •Artifacts
- •Chips
- •Consumables
- •Crafting Materials
- •Items
- •Quest Items
- •Raw Materials
- •Runes
- •Weapons
Errors
No description was provided. Add a description parameter.