Difference between revisions of "Stat"
Stratonian (talk | contribs) (better handling of non-existent icons) |
Stratonian (talk | contribs) m |
||
(22 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
-->|[[File:{{{1}}}_Icon.png|?]]<!-- handle non-existent icon | -->|[[File:{{{1}}}_Icon.png|?]]<!-- handle non-existent icon | ||
-->|{{icon|{{{icon|{{{1}}}_Icon.png}}}|{{{link|{{{1}}}}}}}}}}<!-- add icon with link | -->|{{icon|{{{icon|{{{1}}}_Icon.png}}}|{{{link|{{{1}}}}}}}}}}<!-- add icon with link | ||
− | -->{{#if:{{{ | + | -->{{#if:{{{nolabel|}}}||<!-- if no label is specified |
+ | --> {{#ifeq:{{lc:{{{link}}}}}|no<!-- if no link is specified | ||
+ | -->|{{{1}}}<!-- use plaintext | ||
+ | -->|[[{{{link|{{{1}}}}}}|{{{1}}}]]}}}}<!-- else add link | ||
− | + | SET PROPERTIES | |
− | -->{{#ifeq:[[:{{PAGENAME}}|{{PAGENAME}}]]<!-- | + | -->{{#ifeq:[[:{{PAGENAME}}|{{PAGENAME}}]]<!-- if the page |
− | -->|{{#ask: [[Category:Skills]] [[{{PAGENAME}}]]}}<!-- | + | -->|{{#ask: [[Category:Skills]] [[{{PAGENAME}}]]}}<!-- is in Category:Skills |
− | -->|{{#set:Has stat={{{1}}}}}}}</includeonly><noinclude>{{ | + | -->|{{#set:Has stat={{#vardefineecho:index|{{#expr:{{#var:index|0}}+1}}}}<!-- recursively define stat index |
+ | -->;{{{2|0}}}<!-- define stat value | ||
+ | -->;{{#replace:{{sc|{{{link|{{{1}}}}}}}}| |_}}}}<!-- define stat name and bypass semicolon in ' ' | ||
+ | -->}}</includeonly><noinclude>{{{{PAGENAME}}/Documentation}}</noinclude> |
Latest revision as of 16:04, 28 August 2023
Description[edit]
Displays a stat's icon and name, with a link to the page of the stat.
Usage[edit]
{{stat|<Attack Power>|<+123>|<icon=Attack Power.png>|<link=Attack Power>|<nolabel=yes>}}