Difference between revisions of "Template:Gtl"

From Tales of Maj'Eyal
Jump to: navigation, search
m (Ibanix moved page Template:Tl to Template:Gtl without leaving a redirect: better name)
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><onlyinclude>{{#if:{{{1|}}}|{{1}}|1}}–{{#if:{{{2|}}}|{{2}}|5}}<sup>[[Scaling#gtl|gtl:{{#if:{{{3|}}}|{{{3}}}|}}]]</sup></onlyinclude></includeonly>
+
<includeonly><onlyinclude>{{{1}}}–{{{2}}}<sup>[[Scaling#gtl|gtl{{#if:{{{3|}}}|:{{{3}}}|}}]]</sup></onlyinclude></includeonly>
  
 
[[Category:Templates]]
 
[[Category:Templates]]
Line 5: Line 5:
 
===Introduction===
 
===Introduction===
  
This template is used to denote talent parameters that scale by the [[Scaling#gtl|getTalentLevel]] or [[Scaling#gtl|getTalentLevelRaw]].
+
This template is used to denote talent parameters that scale by the [[Scaling#gtl|getTalentLevel]] or [[Scaling#gtl|getTalentLevelRaw]]. These are for talents scaled by talent level without other special scaling functions defined on the [[Scaling]] page.
  
The template accepts up to three parameters: min, max, raw
+
The template accepts up to three parameters: min, max, raw. The first two options are required, the third is optional.  
 
+
The all parameters are optional. If min and max are not specified, they default to '1' and '5'.
+
  
 
===Basic Example===
 
===Basic Example===
Line 19: Line 17:
 
then one should invoke the template in wiki markup with
 
then one should invoke the template in wiki markup with
  
<pre>{{gtl}}</pre>
+
<pre>{{gtl|1|5}}</pre>
  
 
which will produce the following text
 
which will produce the following text
  
  {{gtl}}
+
  {{gtl|1|5}}
 
+
If you need to override the minimum or maximum talent levels, use the form:
+
  
<pre>{{gtl|1|4}}</pre>
+
For cases in which the variable is scaled, for example, by 2:
 +
<pre>{{gtl|2|10}}</pre>
  
 
which will produce the text
 
which will produce the text
  
{{gtl|1|4}}
+
{{gtl|2|10}}
  
 
Note that any percentage signs must be inserted manually with the parameters.
 
Note that any percentage signs must be inserted manually with the parameters.
Line 43: Line 40:
 
then simply insert the text ''raw'' as the third parameter as follows
 
then simply insert the text ''raw'' as the third parameter as follows
  
<pre>{{gTL|||raw}}</pre>
+
<pre>{{gtl|2|10|raw}}</pre>
  
 
which will produce
 
which will produce
  
{{gTL|||raw}}
+
{{gtl|2|10|raw}}

Latest revision as of 17:52, 5 March 2016


Introduction

This template is used to denote talent parameters that scale by the getTalentLevel or getTalentLevelRaw. These are for talents scaled by talent level without other special scaling functions defined on the Scaling page.

The template accepts up to three parameters: min, max, raw. The first two options are required, the third is optional.

Basic Example

If the LUA code calls for

self:getTalentLevel(t). 

then one should invoke the template in wiki markup with

{{gtl|1|5}}

which will produce the following text

1–5gtl

For cases in which the variable is scaled, for example, by 2:

{{gtl|2|10}}

which will produce the text

2–10gtl

Note that any percentage signs must be inserted manually with the parameters.

Using Raw Talent Level

If the LUA code calls for using raw talent levels as

self:getTalentLevelRaw(t)

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

{{gtl|2|10|raw}}

which will produce

2–10gtl :raw