Difference between revisions of "Template:Ctspd"

From Tales of Maj'Eyal
Jump to: navigation, search
(Created template for combatTalentSpellDamage)
 
(Added documenation)
Line 1: Line 1:
{{{1}}}–{{{2}}}<sup>[[Scaling#cTSpD|cTSpD]]</sup>
+
<includeonly><onlyinclude>{{{1}}}–{{{2}}}<sup>[[Scaling#cTSpD|cTSpD]]</sup></onlyinclude></includeonly>
 +
 
 +
[[Category:Templates]]
 +
 
 +
===Introduction===
 +
 
 +
This template is used to denote talent parameters that scale by the [[Scaling#cTSpD|combatTalentSpellDamage]] function.
 +
 
 +
The template accepts up to two parameters, corresponding to those in the LUA code: ''base'' and ''max''. It is assumed that these parameters will be fed to the template in the order specified above. The presence of ''spellpower_override'' is a special case that will not be handled by this template, and should be indicated in the talent's description instead.
 +
 
 +
Both parameters to this template are required.
 +
 
 +
===Basic Example===
 +
 
 +
If the LUA code calls for
 +
 
 +
self:combatTalentSpellDamage(t, 25, 290)
 +
 
 +
then one should invoke the template in wiki markup with
 +
 
 +
<pre>{{CTSPD|25|290}}</pre>
 +
 
 +
which will produce the following text
 +
 
 +
{{CTSPD|25|290}}
 +
 
 +
===Remember Percentage Signs===
 +
 
 +
Take care to insert percentage signs where appropriate, as the LUA code frequently adjusts the numbers only for the talent description. A typical talent parameter that should actually be shown as a percentage may, for example, be coded as
 +
 
 +
<pre>self:combatTalentSpellDamage(t, 10, 50)</pre>
 +
 
 +
with the percentage sign only added later, so you should enter the percentage signs into the template manually as
 +
 
 +
<pre>{{CTSPD|10|50%}}</pre>
 +
 
 +
to produce
 +
 
 +
{{CTSPD|10|50%}}

Revision as of 20:03, 5 August 2014


Introduction

This template is used to denote talent parameters that scale by the combatTalentSpellDamage function.

The template accepts up to two parameters, corresponding to those in the LUA code: base and max. It is assumed that these parameters will be fed to the template in the order specified above. The presence of spellpower_override is a special case that will not be handled by this template, and should be indicated in the talent's description instead.

Both parameters to this template are required.

Basic Example

If the LUA code calls for

self:combatTalentSpellDamage(t, 25, 290)

then one should invoke the template in wiki markup with

{{CTSPD|25|290}}

which will produce the following text

[25]290cTSpD

Remember Percentage Signs

Take care to insert percentage signs where appropriate, as the LUA code frequently adjusts the numbers only for the talent description. A typical talent parameter that should actually be shown as a percentage may, for example, be coded as

self:combatTalentSpellDamage(t, 10, 50)

with the percentage sign only added later, so you should enter the percentage signs into the template manually as

{{CTSPD|10|50%}}

to produce

[10]50%cTSpD