Difference between revisions of "Template:Ctl"

From Tales of Maj'Eyal
Jump to: navigation, search
(Note on percentage sign)
(Copy edit)
Line 15: Line 15:
 
If the LUA code calls for
 
If the LUA code calls for
  
  self:combatTalentLimit(t, 0, 24, 20)
+
  self:combatTalentLimit(t, 10, 2, 5)
  
 
then one should invoke the template in wiki markup with
 
then one should invoke the template in wiki markup with
  
<pre>{{CTL|0|24|20}}</pre>
+
<pre>{{CTL|10|2|5}}</pre>
  
 
which will produce the following text
 
which will produce the following text
  
  {{CTL|0|24|20}}
+
  {{CTL|10|2|5}}
  
Note that the percentage signs must be manually inserted.  
+
Note that any percentage signs must be inserted manually.  
  
 
===Using Raw Talent Level===
 
===Using Raw Talent Level===
Line 31: Line 31:
 
If the LUA code calls for using raw talent levels as  
 
If the LUA code calls for using raw talent levels as  
  
<pre>self:combatTalentLimit(t, 100, 27, 55, true)</pre>
+
<pre>self:combatTalentLimit(t, 10, 2, 5, true)</pre>
  
then simply insert the text ''raw'' as the fourth parameter like so
+
then simply insert the text ''raw'' as the fourth parameter as follows
  
<pre>{{CTL|100%|27|55%|raw}}</pre>
+
<pre>{{CTL|10|2|5|raw}}</pre>
  
which will turn into
+
which will produce
  
  {{CTL|100%|27|55%|raw}}
+
  {{CTL|10|2|5|raw}}

Revision as of 23:28, 5 August 2014


Introduction

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

The template accepts up to four parameters, corresponding to those in the LUA code: limit, low, high, raw. It is assumed that these parameters will be fed to the template in the order specified above.

The first three parameters are required, but the last one is optional.

Basic Example

If the LUA code calls for

self:combatTalentLimit(t, 10, 2, 5)

then one should invoke the template in wiki markup with

{{CTL|10|2|5}}

which will produce the following text

2–5cTL:10

Note that any percentage signs must be inserted manually.

Using Raw Talent Level

If the LUA code calls for using raw talent levels as

self:combatTalentLimit(t, 10, 2, 5, true)

then simply insert the text raw as the fourth parameter as follows

{{CTL|10|2|5|raw}}

which will produce

2–5cTL:10,raw