Wynncraft Wiki
(added usage note)
Pcjbot (talk | contribs)
m
 
(3 intermediate revisions by 2 users not shown)
Line 4: Line 4:
 
It's job is to simply convert the 'name' of an item into a valid position number on the Sprite Grid PNG.
 
It's job is to simply convert the 'name' of an item into a valid position number on the Sprite Grid PNG.
   
By default, this template will return 256 (the last icon on the grid).
+
By default, this template will return 196 (the last icon on the grid).
   
 
The parameter should be spelled naturally, i.e. with spaces between words. Capitalization does not matter.
 
The parameter should be spelled naturally, i.e. with spaces between words. Capitalization does not matter.
   
 
==Usage==
 
==Usage==
<tt><nowiki>{{</nowiki>WynnIcon/pos|''itemname''<nowiki>}}</nowiki></tt>
+
<code><nowiki>{{</nowiki>WynnIcon/pos|''itemname''<nowiki>}}</nowiki></code>
   
 
==Examples==
 
==Examples==
Line 16: Line 16:
 
! Returns
 
! Returns
 
|-
 
|-
| <tt><nowiki>{{</nowiki>WynnIcon/pos&#124;bow<nowiki>}}</nowiki></tt>
+
| <code><nowiki>{{</nowiki>WynnIcon/pos&#124;Earth Powder IV<nowiki>}}</nowiki></code>
| {{WynnIcon/pos|bow}}
+
| {{WynnIcon/pos|Earth Powder IV}}
 
|-
 
|-
| <tt><nowiki>{{</nowiki>WynnIcon/pos&#124;Diamond Chestplate<nowiki>}}</nowiki></tt>
+
| <code><nowiki>{{</nowiki>WynnIcon/pos&#124;Yahya's Stained Bowl<nowiki>}}</nowiki></code>
| {{WynnIcon/pos|Diamond Chestplate}}
+
| {{WynnIcon/pos|Yahya's Stained Bowl}}
 
|-
 
|-
| <tt><nowiki>{{</nowiki>WynnIcon/pos&#124;diamondchestplate<nowiki>}}</nowiki></tt>
+
| <code><nowiki>{{</nowiki>WynnIcon/pos&#124;Quest Book<nowiki>}}</nowiki></code>
| {{WynnIcon/pos|diamondchestplate}}
+
| {{WynnIcon/pos|Quest Book}}
 
|-
 
|-
| <tt><nowiki>{{</nowiki>WynnIcon/pos&#124;diamond_chestplate<nowiki>}}</nowiki></tt>
+
| <code><nowiki>{{</nowiki>WynnIcon/pos&#124;spawn chicken<nowiki>}}</nowiki></code>
| {{WynnIcon/pos|diamond_chestplate}}
+
| {{WynnIcon/pos|spawn chicken}}
 
|-
 
|-
| <tt><nowiki>{{</nowiki>WynnIcon/pos&#124;unrecognised_text_here<nowiki>}}</nowiki></tt>
+
| <code><nowiki>{{</nowiki>WynnIcon/pos&#124;unrecognised_text_here<nowiki>}}</nowiki></code>
 
| {{WynnIcon/pos|unrecognised_text_here}}
 
| {{WynnIcon/pos|unrecognised_text_here}}
 
|}
 
|}
  +
<noinclude>[[category:Documentation_templates]][[category:Icon_templates]]</noinclude>

Latest revision as of 17:18, 26 November 2018

Description

WynnIcon/pos is a support template for the WynnIcon template.

It's job is to simply convert the 'name' of an item into a valid position number on the Sprite Grid PNG.

By default, this template will return 196 (the last icon on the grid).

The parameter should be spelled naturally, i.e. with spaces between words. Capitalization does not matter.

Usage

{{WynnIcon/pos|itemname}}

Examples

Usage Returns
{{WynnIcon/pos|Earth Powder IV}} 2
{{WynnIcon/pos|Yahya's Stained Bowl}} 400
{{WynnIcon/pos|Quest Book}} 15
{{WynnIcon/pos|spawn chicken}} 400
{{WynnIcon/pos|unrecognised_text_here}} 400