Difference between revisions of "Template:Cs"
(Note on percentage sign) |
(Copy edit) |
||
Line 25: | Line 25: | ||
{{CS|(0.07 * Str * Talent Level)|5|0|40|35}} | {{CS|(0.07 * Str * Talent Level)|5|0|40|35}} | ||
− | + | Note that the percentage signs must be manually inserted. | |
Be aware that since this template produces a rather long string of text, you may have to rewrite other parts of a talent's description in order to make the whole thing legible. | Be aware that since this template produces a rather long string of text, you may have to rewrite other parts of a talent's description in order to make the whole thing legible. |
Revision as of 23:22, 5 August 2014
Introduction
This template is used to denote talent parameters that scale by the combatScale function.
The template accepts up to eight parameters, corresponding to those in the LUA code: x, y_low, x_low, y_high, x_high, power, add, shift. It is assumed that the first 6 parameters will be fed to the template in the order specified above.
The first 5 parameters are required, power must go into parameter 6 if it exists, while parameter 7 and 8 are open for add and shift to use.
Basic Example
The LUA code for the damage bonus of Berserker calls for
self:combatScale(self:getStr(7, true) * self:getTalentLevel(t), 5, 0, 40, 35)
which requires some interpretation of the first parameter to produce the following wiki markup
{{CS|(0.07 * Str * Talent Level)|5|0|40|35}}
and will in turn produce the following text
5–40cS as (0.07 * Str * Talent Level) varies from 0–35
Note that the percentage signs must be manually inserted.
Be aware that since this template produces a rather long string of text, you may have to rewrite other parts of a talent's description in order to make the whole thing legible.