Difference between revisions of "Template:Cts"
(Added conditionals to allow for power=log) |
(Just going to take out the P for power to simplify things) |
||
| Line 1: | Line 1: | ||
| − | <includeonly><onlyinclude>{{{1}}}–{{{2}}}<sup>[[Scaling#cTS|cTS{{#if:{{{3|}}}|:{{{3} | + | <includeonly><onlyinclude>{{{1}}}–{{{2}}}<sup>[[Scaling#cTS|cTS{{#if:{{{3|}}}|:{{{3}}}{{#if:{{{4|}}}|,{{{4}}}{{#if:{{{5|}}}|,{{{5}}}{{#if:{{{6|}}}|,{{{6}}}|}}|}}|}}|}}]]</sup></onlyinclude></includeonly> |
[[Category:Templates]] | [[Category:Templates]] | ||
| Line 7: | Line 7: | ||
This template is used to denote talent parameters that scale by the [[Scaling#cTS|combatTalentScale]] function. | This template is used to denote talent parameters that scale by the [[Scaling#cTS|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 | + | 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 two parameters will be fed to the template in the order specified above. |
The first two parameters are required, and the rest are optional. | The first two parameters are required, and the rest are optional. | ||
| Line 51: | Line 51: | ||
===Additional Parameters=== | ===Additional Parameters=== | ||
| − | + | Parameters 3, 4, 5, 6 are all left open, so you can use them to enter anything you can for ''add'', ''shift'' and ''raw''. Here is an example where all parameters have some value | |
combatTalentScale(t, 4, 15, 0.75, 1, 2, true) | combatTalentScale(t, 4, 15, 0.75, 1, 2, true) | ||
| Line 67: | Line 67: | ||
combatTalentScale(t, 4, 15, 0.5, 0, 0, true) | combatTalentScale(t, 4, 15, 0.5, 0, 0, true) | ||
| − | then we can | + | then we can should the wiki markup |
| − | <pre>{{CTS|4|15 | + | <pre>{{CTS|4|15|raw}}</pre> |
| − | where | + | where we have ignored the ''power=0.5'' since that is the default value anyway. |
| − | + | ||
| − | + | ||
Many chronomancer talents also apply a Paradox modifier, which you can indicate with ''PM'' in any of the free parameters. | Many chronomancer talents also apply a Paradox modifier, which you can indicate with ''PM'' in any of the free parameters. | ||
Revision as of 17:16, 6 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 two 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
Note that any percentage signs must be inserted manually with the parameters.
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
If logarithmic scaling is to be used instead, then simply enter
{{CTS|4|15|log}}
to obtain
4–15cTS:log
Additional Parameters
Parameters 3, 4, 5, 6 are all left open, so you can use them to enter anything you can for add, shift and raw. 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 should the wiki markup
{{CTS|4|15|raw}}
where we have ignored the power=0.5 since that is the default value anyway.
Many chronomancer talents also apply a Paradox modifier, which you can indicate with PM in any of the free parameters.