Editing Item info

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
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:type text|{{#switch:{{lc:{{{category|}}}}}
+
-->{{#vardefine:typeText|{{#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:type text}}<!-- if the type is correct (i.e. type text exists)
+
-->||{{#if:{{#var:typeText}}<!-- if the type is correct (i.e. typeText exists)
-->|{{#ifeq:{{#var:type text}}|[[Raw Material]]<!-- if item is a raw material
+
-->|{{#ifeq:{{#var:typeText}}|[[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 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|Items}}}}}]]}}}}}}<!-- else add to category
+
-->|[[Category:{{sc|{{{category}}}}}]]}}}}}}<!-- else add to category
 
 
-->{{#vardefine:quality class|{{#switch:<!--
 
-->{{#explode:{{lc:{{{quality|{{{category}}}}}}}}|-|0}}<!-- qualities may be defined using a range [quality1]-[quality2] so take the lower bound (quality1) -->
 
|common=quality-common
 
|uncommon=quality-uncommon
 
|rare=quality-rare
 
|epic=quality-epic
 
|legendary=quality-legendary
 
|quest items=quality-quest-item
 
|#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
-->{{#arraydefine:quest text|{{{quests}}}|;}}<!--
+
-->{{#arraydefine:questText|{{{quests}}}|;}}<!--
  
 
TABLE -->
 
TABLE -->
Line 53: Line 34:
 
item icon
 
item icon
 
-->{{#if:{{{icon|}}}<!-- if icon exists
 
-->{{#if:{{{icon|}}}<!-- if icon exists
-->|<span class="{{#var:quality class}}">[[File:{{{icon}}}|85px]]</span><!-- use provided icon
+
-->|[[{{{icon}}}|85px]]<!-- 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
+
-->|[[{{#var:defaultIcon}}|85px]]<!-- use default icon
-->|[[{{#var:defaultIcon}}|Upload item icon.]]}}}}}}<!-- else prompt for icon upload
+
-->|[[{{#var:defaultIcon}}|Upload item icon.]]}}}}<!-- else prompt for icon upload
-->{{#if:{{{change|}}}|<br><small>(This Item's appearance may change.)</small>}}</center>
+
--></center>
 
|-
 
|-
! colspan="2" class="{{#var:quality class}}"<!--
+
! colspan="2" class="<!-- set backgrond color
--> | <center>{{{name|{{PAGENAME}}}}}</center><!-- name -->
+
-->{{#ifeq:{{#var:typeText}}|[[Quest Item]]<!-- if item is a quest item
|-
+
-->|quest-item<!-- use quest item color
{{#if:{{#var:type text}}|{{!}}class="skill-infobox-row-heading"{{!}}'''Type'''{{!}}{{!}}class="skill-infobox-row-data"{{!}}{{#var:type text}}}}
+
-->|{{#switch:{{lc:{{{quality|}}}}}<!-- else use item quality color
 +
-->|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 -->
 +
}}}}" | <center>{{{name|{{PAGENAME}}}}}</center><!-- name -->
 
|-
 
|-
{{#if:{{{quality|}}}|{{InfoboxRow|'''[[Quality]]'''|<!--
+
{{#if:{{#var:typeText}}|{{!}}class="skill-infobox-row-heading"{{!}}'''Type'''{{!}}{{!}}class="skill-infobox-row-data"{{!}}{{#var:typeText}}}}
-->{{#arraydefine:qualities|{{lc:{{{quality}}}}}|-}}<!-- split range of qualities by '-'
 
-->{{#arrayprint:qualities|-|@|{{ucfirst:@}}}}}}<!-- ensure each quality starts with an uppercase letter -->}}
 
 
|-
 
|-
{{#if:{{{tier|}}}|{{InfoboxRow|'''[[Tier]]'''|{{{tier}}}}}}}
+
{{#if:{{{quality|}}}|{{!}}class="skill-infobox-row-heading"{{!}}'''[[Quality]]'''{{!}}{{!}}class="skill-infobox-row-data"{{!}}{{ucfirst:{{lc:{{{quality}}}}}}}}}
 
|-
 
|-
{{#if:{{{level|}}}|{{InfoboxRow|'''Req. [[Level]]'''|{{{level}}}}}}}
+
{{#if:{{{tier|}}}|{{!}}class="skill-infobox-row-heading"{{!}}'''[[Tier]]'''{{!}}{{!}}class="skill-infobox-row-data"{{!}}{{{tier}}}}}
 
|-
 
|-
{{#if:{{{binding|}}}|{{InfoboxRow|'''[[Binding]]'''|{{#switch:{{lc:{{{binding}}}}}|pickup=[[Binding#On Pickup|On Pickup]]|equip=[[Binding#On Equip|On Equip]]|#default={{{binding}}}}}}}}}
+
{{#if:{{{level|}}}|{{!}}class="skill-infobox-row-heading"{{!}}'''Req. [[Level]]'''{{!}}{{!}}class="skill-infobox-row-data"{{!}}{{{level}}}}}
 
|-
 
|-
{{#if:{{{hero|}}}|{{InfoboxRow|'''Req. [[Hero]]'''|[[{{{hero}}}]]}}}}
+
{{#if:{{{quests|}}}|{{!}}class="skill-infobox-row-heading"{{!}}'''Involved In'''{{!}}{{!}}class="skill-infobox-row-data"{{!}}{{#arrayprint:questText|<br>|@|[[@]]}}}}<!-- formats the quests array -->
 
|-
 
|-
{{#if:{{{mastery|}}}|{{InfoboxRow|'''Req. [[Mastery]]'''|[[{{{mastery}}}]]}}}}<!--
+
{{#if:{{{value|}}}|{{!}}class="skill-infobox-row-heading"{{!}}'''Value'''{{!}}{{!}}class="skill-infobox-row-data"{{!}}{{stat|Gold|{{{value}}}|nolabel=yes}}}}
 
+
|}</div><!--
-->{{#arrayprint:stats||@|{{InfoboxRow|'''{{#explode:@|:|0}}'''|{{#sub:@|{{#expr:{{#pos:@|:}}+1}}}}}}}}
 
|-
 
{{#if:{{{duration|}}}|{{InfoboxRow|'''Duration'''|{{{duration}}}}}}}
 
|-
 
{{#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:{{{satiety duration|}}}|{{InfoboxRow|'''Satiety Duration'''|{{{satiety duration}}}}}}}
 
|-
 
{{#if:{{{quests|}}}|{{InfoboxRow|'''Involved in'''|{{#arrayprint:quest text|<br>|@|[[@]]}}}}}}
 
|-
 
{{#if:{{{value|}}}|{{InfoboxRow|'''Value'''|{{stat|Gold|{{{value}}}|nolabel=yes}}}}}}
 
|}
 
</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.}}}}}</includeonly><noinclude>{{Item info/Documentation}}</noinclude>
 
 
PROPERTIES
 
-->{{#if:{{{name|}}}{{NAMESPACE}}|<!-- if there is a name parameter or namespace 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>
 

Please note that all contributions to Corepunk Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)

Templates used on this page: