Difference between revisions of "Template:Cts"

From Tales of Maj'Eyal
Jump to: navigation, search
(Never mind, got fooled by server cache. Nesting more conditionals now.)
(Forgot one branch of the if-else chain. That's a lot of curly brackets.)
Line 1: Line 1:
<includeonly><onlyinclude>{{{1}}}–{{{2}}}<sup>[[Scaling#cTS|cTS{{#if:{{{3|}}}|&#58;{{{3}}}P{{#if:{{{4|}}}|,{{{4}}}|}}|{{#if:{{{4|}}}|&#58;{{{4}}}{{#if:{{{5|}}}|,{{{5}}}{{#if:{{{6|}}}|,{{{6}}}|}}|}}|}}}}]]</sup></onlyinclude></includeonly>
+
<includeonly><onlyinclude>{{{1}}}–{{{2}}}<sup>[[Scaling#cTS|cTS{{#if:{{{3|}}}|&#58;{{{3}}}P{{#if:{{{4|}}}|,{{{4}}}{{#if:{{{5|}}}|,{{{5}}}{{#if:{{{6|}}}|,{{{6}}}|}}|}}|}}|{{#if:{{{4|}}}|&#58;{{{4}}}{{#if:{{{5|}}}|,{{{5}}}{{#if:{{{6|}}}|,{{{6}}}|}}|}}|}}}}]]</sup></onlyinclude></includeonly>
  
 
[[Category:Templates]]
 
[[Category:Templates]]

Revision as of 22:10, 5 August 2014


Introduction

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

The template accepts up to six parameters, corresponding to those in the LUA code: low, high, power, add, shift, raw. It is assumed that the first three parameters will be fed to the template in the order specified above.

The first two parameters are required, and the rest are optional.

Basic Example

If the LUA code calls for

self:combatTalentScale(t, 4, 15)

then one should invoke the template in wiki markup with

{{CTS|4|15}}

which will produce the following text

4–15cTS

Adjusting the Scaling Power

If the LUA code calls for a different scaling power as follows

combatTalentScale(t, 4, 15, 0.75)

then enter the wiki markup

{{CTS|4|15|0.75}}

which will turn into

4–15cTS:0.75P

Additional Parameters

Since add, shift and raw are not frequently used, the parameters 4, 5 and 6 are left open so you can enter whatever is necessary. Here is an example where all parameters have some value

combatTalentScale(t, 4, 15, 0.75, 1, 2, true)

so we can use the wiki markup

{{CTS|4|15|0.75|1A|2S|raw}}

to produce

4–15cTS:0.75P,1A,2S,raw

If we only have some of the optional parameters such as

combatTalentScale(t, 4, 15, 0.5, 0, 0, true)

then we can use the wiki markup

{{CTS|4|15||raw}}

where parameter 3 is left bank since power defaults to 0.5 anyway, and the raw text has moved up to slot 4 since that is the first free open parameter. This will produce

4–15cTS