Difference between revisions of "Template:InfoboxLevelColoriser"

From Istaria Lexica

(fixed tier limits)
imported>Elteria Shadowhand
(Revamp of templates, massive updates)
Line 1: Line 1:
<includeonly>{{#if: {{{1|}}} |
+
<includeonly>{{#if: {{{1|}}}|
{{#ifexpr: {{{1}}} > 0 | {{#ifexpr: {{{1}}} <= 19 | <span class="coloriser-color1" title="Equals to Tier I."><span style="font-size:0.5em">&plusmn;</span>{{{1}}}</span>}} }}{{#ifexpr: {{{1}}} >= 20 | {{#ifexpr: {{{1}}} <= 39 | <span class="coloriser-color2" title="Equals to Tier II."><span style="font-size:0.5em">&plusmn;</span>{{{1}}}</span>}} }}{{#ifexpr: {{{1}}} >= 40 | {{#ifexpr: {{{1}}} <= 59 | <span class="coloriser-color3" title="Equals to Tier III."><span style="font-size:0.5em">&plusmn;</span>{{{1}}}</span>}} }}{{#ifexpr: {{{1}}} >= 60 | {{#ifexpr: {{{1}}} <= 79 | <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 | <span class="coloriser-color5" title="Equals to Tier V."><span style="font-size:0.5em">&plusmn;</span>{{{1}}}</span>}} }}{{#ifexpr: {{{1}}} >= 100 | <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]][[Category:Non-standalone 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]]</noinclude>

Revision as of 04:39, 13 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)