Difference between revisions of "Item info"

m (Undo revision 6417 by Stratonian (talk))
Tag: Undo
m (required hero)
 
(47 intermediate revisions by the same user not shown)
Line 23: Line 23:
 
     -->|{{#if:{{#ask:[[Category:Gathering Professions]][[@]]}}<!-- if profession is a gathering profession
 
     -->|{{#if:{{#ask:[[Category:Gathering Professions]][[@]]}}<!-- if profession is a gathering profession
 
     -->|[[Category:@ Raw Materials]]}}}}<!-- categorize
 
     -->|[[Category:@ Raw Materials]]}}}}<!-- categorize
-->|[[Category:{{sc|{{{category}}}}}]]}}}}}}<!-- else add to category
+
-->|[[Category:{{sc|{{{category|Items}}}}}]]}}}}}}<!-- else add to category
  
 
-->{{#vardefine:quality class|{{#switch:<!--
 
-->{{#vardefine:quality class|{{#switch:<!--
Line 32: Line 32:
 
|epic=quality-epic
 
|epic=quality-epic
 
|legendary=quality-legendary
 
|legendary=quality-legendary
|quest items=quest-item
+
|quest items=quality-quest-item
 
|#default=quality-common<!-- items with no quality are assumed to be common -->
 
|#default=quality-common<!-- items with no quality are assumed to be common -->
 
}}}}<!--
 
}}}}<!--
 +
 +
stats are comma-separated and in the format:
 +
[stat name]: [stat value]
 +
-->{{#arraydefine:stats|{{{stats|}}}}}<!--
 +
 +
satiety effects are comma-separated and in the format:
 +
[effect name] [effect value]
 +
-->{{#arraydefine:satiety effect|{{{satiety effect}}}}}<!--
  
 
quests
 
quests
Line 45: Line 53:
 
item icon
 
item icon
 
-->{{#if:{{{icon|}}}<!-- if icon exists
 
-->{{#if:{{{icon|}}}<!-- if icon exists
-->|<span class="{{#var:quality class}}">[[{{{icon}}}|85px]]</span><!-- use provided icon
+
-->|<span class="{{#var:quality class}}">[[File:{{{icon}}}|85px]]</span><!-- use provided icon
 +
-->|{{#ifeq:{{#explode:{{PAGENAME}}|:|0}}|Recipe<!-- if the item is a recipe
 +
-->|{{Recipe icon|quality={{#var:quality class}}}}<!-- use the recipe icon template
 
-->|{{#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
 
-->|<span class="{{#var:quality class}}">[[{{#var:defaultIcon}}|85px]]</span><!-- 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>
+
-->{{#if:{{{change|}}}|<br><small>(This Item's appearance may change.)</small>}}</center>
 
|-
 
|-
! colspan="2" class="{{#var:quality class}}<!--
+
! colspan="2" class="{{#var:quality class}}"<!--
-->" | <center>{{{name|{{PAGENAME}}}}}</center><!-- name -->
+
--> | <center>{{{name|{{PAGENAME}}}}}</center><!-- name -->
 
|-
 
|-
 
{{#if:{{#var:type text}}|{{!}}class="skill-infobox-row-heading"{{!}}'''Type'''{{!}}{{!}}class="skill-infobox-row-data"{{!}}{{#var:type text}}}}
 
{{#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"{{!}}<!--
+
{{#if:{{{quality|}}}|{{InfoboxRow|'''[[Quality]]'''|<!--
 
-->{{#arraydefine:qualities|{{lc:{{{quality}}}}}|-}}<!-- split range of qualities by '-'
 
-->{{#arraydefine:qualities|{{lc:{{{quality}}}}}|-}}<!-- split range of qualities by '-'
-->{{#arrayprint:qualities|-|@|{{ucfirst:@}}}}}}<!-- ensure each quality starts with an uppercase letter -->
+
-->{{#arrayprint:qualities|-|@|{{ucfirst:@}}}}}}<!-- ensure each quality starts with an uppercase letter -->}}
 +
|-
 +
{{#if:{{{tier|}}}|{{InfoboxRow|'''[[Tier]]'''|{{{tier}}}}}}}
 +
|-
 +
{{#if:{{{level|}}}|{{InfoboxRow|'''Req. [[Level]]'''|{{{level}}}}}}}
 +
|-
 +
{{#if:{{{binding|}}}|{{InfoboxRow|'''[[Binding]]'''|{{#switch:{{lc:{{{binding}}}}}|pickup=[[Binding#On Pickup|On Pickup]]|equip=[[Binding#On Equip|On Equip]]|#default={{{binding}}}}}}}}}
 +
|-
 +
{{#if:{{{hero|}}}|{{InfoboxRow|'''Req. [[Hero]]'''|[[{{{hero}}}]]}}}}
 +
|-
 +
{{#if:{{{mastery|}}}|{{InfoboxRow|'''Req. [[Mastery]]'''|[[{{{mastery}}}]]}}}}<!--
 +
 
 +
-->{{#arrayprint:stats||@|{{InfoboxRow|'''{{#explode:@|:|0}}'''|{{#sub:@|{{#expr:{{#pos:@|:}}+1}}}}}}}}
 +
|-
 +
{{#if:{{{duration|}}}|{{InfoboxRow|'''Duration'''|{{{duration}}}}}}}
 
|-
 
|-
{{#if:{{{tier|}}}|{{!}}class="skill-infobox-row-heading"{{!}}'''[[Tier]]'''{{!}}{{!}}class="skill-infobox-row-data"{{!}}{{{tier}}}}}
+
{{#if:{{{satiety effect|}}}|{{InfoboxRow|'''[[Satiety Effect]]'''|<!-- satiety effect row
 +
-->{{#arrayprint:satiety effect|<br><!-- print stats array, separated by line breaks
 +
-->|@|{{#vardefine:name|{{#sub:@|{{#pos:@| }}}}}}<!-- stat name
 +
-->{{stat|{{sc|{{#var:name}}}}|{{#explode:@| |0}}|nolabel=yes}}}}}}<!-- stat template -->}}
 
|-
 
|-
{{#if:{{{level|}}}|{{!}}class="skill-infobox-row-heading"{{!}}'''Req. [[Level]]'''{{!}}{{!}}class="skill-infobox-row-data"{{!}}{{{level}}}}}
+
{{#if:{{{satiety duration|}}}|{{InfoboxRow|'''Satiety Duration'''|{{{satiety duration}}}}}}}
 
|-
 
|-
{{#if:{{{quests|}}}|{{!}}class="skill-infobox-row-heading"{{!}}'''Involved In'''{{!}}{{!}}class="skill-infobox-row-data"{{!}}{{#arrayprint:quest text|<br>|@|[[@]]}}}}<!-- formats the quests array -->
+
{{#if:{{{quests|}}}|{{InfoboxRow|'''Involved in'''|{{#arrayprint:quest text|<br>|@|[[@]]}}}}}}
 
|-
 
|-
{{#if:{{{value|}}}|{{!}}class="skill-infobox-row-heading"{{!}}'''Value'''{{!}}{{!}}class="skill-infobox-row-data"{{!}}{{stat|Gold|{{{value}}}|nolabel=yes}}}}
+
{{#if:{{{value|}}}|{{InfoboxRow|'''Value'''|{{stat|Gold|{{{value}}}|nolabel=yes}}}}}}
|}</div><!--
+
|}
 +
</div><!--
 
DESCRIPTION
 
DESCRIPTION
 
-->{{#if:{{{tooltip|}}}|{{quotation|{{{tooltip}}}|game}}}}{{{description|{{error|No description was provided. Add a description parameter.}}}}}<!--
 
-->{{#if:{{{tooltip|}}}|{{quotation|{{{tooltip}}}|game}}}}{{{description|{{error|No description was provided. Add a description parameter.}}}}}<!--
  
 
PROPERTIES
 
PROPERTIES
-->{{#if:{{{quality|}}}|{{#set:Has quality={{ucfirst:{{lc:{{#explode:{{{quality}}}|-|0}}}}}}}}}}</includeonly><noinclude>{{Item info/Documentation}}</noinclude>
+
-->{{#if:{{{name|}}}|<!-- if there is a name parameter don't set any properties
 +
-->|{{#if:{{#var:quality class}}|{{#set:Has quality=<!-- set 'Has quality' property
 +
-->{{sc|<!--
 +
-->{{#replace:<!--
 +
-->{{#sub:{{#var:quality class}}|{{#expr:{{#pos:{{#var:quality class}}|-}}+1}}}}<!-- remove 'quality-' from the string
 +
-->|-|&nbsp;}}<!-- replace '-' with ' '
 +
-->|&nbsp;}}<!-- put string into start case
 +
-->}}}}<!--
 +
-->{{#if:{{{icon|{{#var:defaultIcon}}}}}|{{#set:Has icon={{{icon|{{#explode:{{#var:defaultIcon}}|:|1}}}}}}}<!-- set 'Has icon' property
 +
-->}}}}</includeonly><noinclude>{{Item info/Documentation}}</noinclude>

Latest revision as of 14:17, 15 February 2024

Description[edit]

Displays an information page about an item.

Usage[edit]

{{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[edit]

Arrow.pngicon: An image of the item.
Optional. Defaults to '{{PAGENAME}}.png'.
Notes: Only use if the icon name differs from the name of the page.
Arrow.pngchange: Displays a note stating that the Item's appearance may change.
Optional.
Notes: Set to any value to enable.
Arrow.pngname: 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.
Arrow.pngbinding: The binding of the item.
Optional.
Notes: Only use if the item is bound. Choose between 'equip', 'pickup', or a custom binding.
Arrow.pngtooltip: The tooltip text that appears upon hovering over the item.
Optional.
Arrow.pngdescription: A description of the item.
Optional.
Arrow.pngquality: The item's quality.
Optional.
Notes: Input ranges of qualities with '[quality1]-[quality2]'.
Arrow.pngtier: The item's tier.
Optional.
Notes: In roman numerals.
Arrow.pngstats: A comma-separated list of the item's stat values and names.
Optional.
Notes: e.g. '[stat1]: [value1], [stat2]: [value2], etc.'
Arrow.pngduration: The duration, in seconds, of the item's effect.
Required.
Arrow.pngsatiety effect: A comma-separated list of the item's satiety effect stat values and names.
Optional.
Notes: e.g. '[value1] [stat1], [value2] [stat2], etc.'
Arrow.pngsatiety duration: The duration, in seconds, of the item's satiety effect.
Required.
Arrow.pnglevel: The player level required for item use.
Optional.
Arrow.pnghero: The hero required for item use.
Optional.
Notes: If the 'mastery' parameter is specified, do not use this parameter.
Arrow.pngmastery: The mastery required for item use.
Optional.
Arrow.pngvalue: The item's selling price when sold to a vendor.
Optional.
Arrow.pngcategory: The item's category.
Optional.

Possible categories:

Armor.
Artifacts.
Chips.
Consumables.
Crafting Materials.
Quest Items.
Raw Materials.
Runes.
Weapons.
Arrow.pngquests: The semicolon-separated names of quests the item is a part of.
Optional.

Errors[edit]

No description was provided. Add a description parameter.