Difference between revisions of "Template:MasteryReq"

From Melvor Idle
(Add optional type parameter for non-item masteries)
(Now directly uses the Icon template to pull images and links)
Line 7: Line 7:
 
The showtext argument shows the name of the item as well. For example, {{T|MasteryReq|Rune Essence|50|showtext=true}} becomes {{MasteryReq|Rune Essence|50|showtext=true}}
 
The showtext argument shows the name of the item as well. For example, {{T|MasteryReq|Rune Essence|50|showtext=true}} becomes {{MasteryReq|Rune Essence|50|showtext=true}}
  
<includeonly><onlyinclude><span style="display:inline-block;">Level {{{2}}} [[File:{{{1}}}_({{{type|item}}}).svg|20px|{{{1}}}]] [[File:Mastery.svg|20px|Mastery]]{{#if:{{{showtext|}}}|&nbsp;[[{{{1}}}]] [[Mastery]]}}</span></onlyinclude></includeonly>
+
<includeonly><onlyinclude><span style="display:inline-block;">Level {{{2}}} {{Icon|{{{1|}}}|type={{{type|item}}}|ext={{{ext|}}}|size={{{size|}}}|notext=true}} {{Icon|Mastery|size={{{size|}}}|notext=true}}{{#if:{{{showtext|}}}|&nbsp;{{Icon|{{{1|}}}|type={{{type|item}}}|noicon=true}} [[Mastery]]}}</span></onlyinclude></includeonly>

Revision as of 01:30, 9 February 2022

Template for quickly including in-line Mastery requirements (similar to Template:SkillReq).

Example: {{MasteryReq|Dragon Javelin|90}} produces Level 90 Dragon Javelin (item).svg Mastery.svg.

The optional type argument can be used for things that aren't items. For example, {{MasteryReq|Qimican|type=constellation|90}} becomes Level 90 Qimican (constellation).svg Mastery.svg

The showtext argument shows the name of the item as well. For example, {{MasteryReq|Rune Essence|showtext=true|50}} becomes Level 50 Rune Essence (item).svg Mastery.svg Rune Essence Mastery