Difference between revisions of "Skill info"

m
(Removed hero parameter by just checking masteries - less room for error that way)
Line 1: Line 1:
 
<includeonly>
 
<includeonly>
<div class="infobox-right">
+
<div class="infobox-right"><!--
 +
DEFINITIONS
 +
-->{{#vardefine:hero|{{#switch:{{lc:{{{mastery}}}}}
 +
|blast medic=Bomber|infiltrator=Bomber|grenadier=Bomber<!-- bomber masteries -->
 +
|defender=Champion|destroyer=Champion|ranger=Champion<!-- champion masteries -->
 +
|berserker=Mercenary|engineer=Mercenary|sniper=Mercenary<!-- mercenary masteries -->
 +
|pyromancer=Pain Reaper|soul eater=Pain Reaper|warlock=Pain Reaper<!-- pain reaper masteries -->
 +
|cleric=Paladin|crusader=Paladin|hand of the light=Paladin<!-- paladin masteries -->
 +
|commando=Warmonger|legionary=Warmonger|shaman=Warmonger<!-- warmonger masteries -->
 +
|#default={{error|Invalid mastery parameter.}}}}}}<!-- default -->
 
{| class="wikitable" style="width: 100%;"
 
{| class="wikitable" style="width: 100%;"
 
|-
 
|-
Line 6: Line 15:
 
{{#ifexist:{{#var:icon}}
 
{{#ifexist:{{#var:icon}}
 
|[[{{#var:icon}}|85px]]{{#set:Has icon={{#var:icon}}}}
 
|[[{{#var:icon}}|85px]]{{#set:Has icon={{#var:icon}}}}
|[[{{#var:icon}}|Upload a Skill icon]]}}
+
|[[{{#var:icon}}|Upload a skill icon.]]}}
 
</center>
 
</center>
 
|-
 
|-
! colspan="2" class="{{lc:{{{hero}}}}}" | <center>{{PAGENAME}}</center>
+
! colspan="2" class="{{lc:{{#var:hero}}}}" | <center>{{PAGENAME}}</center>
 
|-
 
|-
 
| class="skill-infobox-row-heading" | '''[[Hero]]'''
 
| class="skill-infobox-row-heading" | '''[[Hero]]'''
| class="skill-infobox-row-data" | [[{{ucfirst:{{{hero}}}}}]]
+
| class="skill-infobox-row-data" | [[{{#var:hero}}]]
 
|-
 
|-
 
| class="skill-infobox-row-heading" | '''[[Mastery]]'''
 
| class="skill-infobox-row-heading" | '''[[Mastery]]'''
| class="skill-infobox-row-data" | [[{{ucfirst:{{{hero}}}#{{ucfirst:{{{mastery}}}}}}}|{{ucfirst:{{{mastery}}}}}]]<!--
+
| class="skill-infobox-row-data" | [[{{#var:hero}}#{{ucfirst:{{{mastery}}}}}}}|{{ucfirst:{{{mastery}}}}}]]<!--
 
PRE-DEFINED SKILL ATTRIBUTES
 
PRE-DEFINED SKILL ATTRIBUTES
 
-->{{#if:{{{cast-time|}}}|{{skill info row|Cast Time|{{{cast-time}}}|seconds}}}}{{#if:{{{range|}}}|{{skill info row|Range|{{{range}}}|meters}}}}<!--
 
-->{{#if:{{{cast-time|}}}|{{skill info row|Cast Time|{{{cast-time}}}|seconds}}}}{{#if:{{{range|}}}|{{skill info row|Range|{{{range}}}|meters}}}}<!--
Line 25: Line 34:
 
</div><!--
 
</div><!--
 
SET PROPERTIES
 
SET PROPERTIES
-->{{{description}}}{{#set:Is skill=true}}{{#if:{{{order|}}}|{{#set:Has skill order={{{order}}}}}}}{{#set:Has skill name={{ucfirst:{{{name|{{PAGENAME}}}}}}}}}{{#if:{{{hero|}}}|{{#set:Is for hero={{ucfirst:{{{hero}}}}}}}[[Category:{{ucfirst:{{{hero}}}}} skills]]}}{{#if:{{{mastery|}}}|{{#set:Has mastery={{ucfirst:{{{mastery}}}}}}}[[Category:{{ucfirst:{{{mastery}}}}} skills]]}}{{#if:{{{description|}}}|{{#set:Has description={{ucfirst:{{{description}}}}}}}}}{{#if:{{{cast-time|}}}|{{#set:Has cast time={{ucfirst:{{{cast-time}}}}}}}}}{{#if:{{{range|}}}|{{#set:Has range={{ucfirst:{{{range}}}}}}}}}{{#if:{{{cost|}}}|{{#set:Has cost={{ucfirst:{{{cost}}}}}}}}}{{#if:{{{cost-type|}}}|{{#set:Has cost type={{ucfirst:{{{cost-type}}}}}}}}}{{#if:{{{cooldown|}}}|{{#set:Has cooldown={{ucfirst:{{{cooldown}}}}}}}}}{{#if:{{{special|}}}|{{#set:Is special skill={{ucfirst:{{{special}}}}}}}}}</includeonly><noinclude>{{Skill info/Documentation}}</noinclude>
+
-->{{{description}}}{{#set:Is skill=true}}{{#if:{{{order|}}}|{{#set:Has skill order={{{order}}}}}}}{{#set:Has skill name={{ucfirst:{{{name|{{PAGENAME}}}}}}}}}{{#if:{{#var:hero}}|{{#set:Is for hero={{#var:hero}}}}[[Category:{{#var:hero}} skills]]}}{{#if:{{{mastery|}}}|{{#set:Has mastery={{ucfirst:{{{mastery}}}}}}}[[Category:{{ucfirst:{{{mastery}}}}} skills]]}}{{#if:{{{description|}}}|{{#set:Has description={{ucfirst:{{{description}}}}}}}}}{{#if:{{{cast-time|}}}|{{#set:Has cast time={{ucfirst:{{{cast-time}}}}}}}}}{{#if:{{{range|}}}|{{#set:Has range={{ucfirst:{{{range}}}}}}}}}{{#if:{{{cost|}}}|{{#set:Has cost={{ucfirst:{{{cost}}}}}}}}}{{#if:{{{cost-type|}}}|{{#set:Has cost type={{ucfirst:{{{cost-type}}}}}}}}}{{#if:{{{cooldown|}}}|{{#set:Has cooldown={{ucfirst:{{{cooldown}}}}}}}}}{{#if:{{{special|}}}|{{#set:Is special skill={{ucfirst:{{{special}}}}}}}}}</includeonly><noinclude>{{Skill info/Documentation}}</noinclude>

Revision as of 18:41, 25 February 2023

Description

Displays an information page about a Skill.

Usage

{{skill info|<order=3>|<icon=Icon>|<mastery=Mastery>|<description=Description>|<name1=Damage>|<attributes=Damage: 1/2/3/4/5/6>|<cooldown=1>}}

Parameters

To denote changes to a value as the skill levels up, add a "/" between each levelled up stat.

Arrow.pngorder: Defines where the skill appears in a list.
Optional.
Arrow.pngmastery: The Weapon Mastery the skill is from.
Required.
Arrow.pngdescription: A description of what the skill does.
Optional.
Arrow.pngtooltip: The tooltip text that appears upon hovering over the skill.
Optional.
Notes: The tooltip will not show up in {{Skill row}}. Using the description parameter is recommended.
Arrow.pngcast time: The amount of time the skill takes to cast.
Optional.
Arrow.pngcost: How much the skill costs to cast.
Optional.
Arrow.pngcost type: What the skill costs.
Optional.
Arrow.pngcooldown: How long it takes for the skill to be recast again.
Optional.
Arrow.pngattributes: A comma-separated list of the skill's attributes.
Optional.
Notes: If the attribute changes depending on the skill's level, add forward-slashes between each value. e.g. '[attribute1]: [value1], [attribute2]: [value2], etc'

Errors

Invalid mastery.
No description was provided. Add a description parameter.