Difference between revisions of "Template:InfoboxLevelColoriser"

From Istaria Lexica

m
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>{{#if: {{{1|}}} |
+
<includeonly>{{#if: {{{1|}}}|
{{#ifexpr: {{{1}}} > 0 | {{#ifexpr: {{{1}}} <= 20 | Tier <span class="coloriser-color1" title="Equals to Tier I."><span style="font-size:0.5em">&plusmn;</span>{{{1}}}</span>}} }}{{#ifexpr: {{{1}}} > 20 | {{#ifexpr: {{{1}}} <= 40 | Tier <span class="coloriser-color2" title="Equals to Tier II."><span style="font-size:0.5em">&plusmn;</span>{{{1}}}</span>}} }}{{#ifexpr: {{{1}}} > 40 | {{#ifexpr: {{{1}}} <= 60 | Tier <span class="coloriser-color3" title="Equals to Tier III."><span style="font-size:0.5em">&plusmn;</span>{{{1}}}</span>}} }}{{#ifexpr: {{{1}}} > 60 | {{#ifexpr: {{{1}}} <= 80 | Tier <span class="coloriser-color4" title="Equals to Tier IV."><span style="font-size:0.5em">&plusmn;</span>{{{1}}}</span>}} }}{{#ifexpr: {{{1}}} > 80 | {{#ifexpr: {{{1}}} <= 100 | Tier <span class="coloriser-color5" title="Equals to Tier V."><span style="font-size:0.5em">&plusmn;</span>{{{1}}}</span>}} }}{{#ifexpr: {{{1}}} > 100 | Tier <span class="coloriser-color6" title="Equals to Tier VI."><span style="font-size:0.5em">&plusmn;</span>{{{1}}}</span>}} }}</includeonly><noinclude>{{Clr}}{{documentation}}[[Category:Infobox Templates]]</noinclude>
+
  {{#iferror:{{#expr:{{{1}}}}}|
 +
  |[[:Category:Tier {{Dec2rom|{{TierByLevel|{{{1}}}}}}}|<span class="tier{{TierByLevel|{{{1}}}}}" title="Equals to Tier {{Dec2rom|{{TierByLevel|{{{1}}}}}}}."><span style="font-size:0.5em">&plusmn;</span>{{{1}}}</span>]]}}
 +
}}</includeonly><noinclude>{{Documentation}}[[Category:Infobox Templates]][[Category:Non-standalone Templates]][[Category:Add Data Templates]]</noinclude>

Latest revision as of 18:45, 21 October 2022

Template documentation (for the template shown above, sometimes hidden or invisible)

Description[edit]

Used in Infoboxes of NPCs, Creatures or Named Creatures to render a colorful version of their level. Also creates a 'tier hint' and a link to the Tier page for further details.


Syntax[edit]

{{InfoboxLevelColoriser|1}}

Parameters[edit]

1 = the level to be shown

Examples[edit]

{{InfoboxLevelColoriser|12}}
{{InfoboxLevelColoriser|74}}
{{InfoboxLevelColoriser|118}}
Visit Template:InfoboxLevelColoriser/doc to edit this text. (How to: document correctly)