Difference between revisions of "Template:Cl"
(Fixing mixup with combatScale.) |
(Note on percentage sign) |
||
Line 24: | Line 24: | ||
{{CL|((5 + 0.05 * Cunning) * Talent Level)|100%|20|0|70%|50}} | {{CL|((5 + 0.05 * Cunning) * Talent Level)|100%|20|0|70%|50}} | ||
+ | |||
+ | Notice 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 22:59, 5 August 2014
Introduction
This template is used to denote talent parameters that scale by the combatLimit function.
The template accepts six parameters, corresponding to those in the LUA code: x, limit, y_low, x_low, y_high, x_high. It is assumed that these parameters will be fed to the template in the order specified above.
All six parameters are required.
Basic Example
The LUA code for the chance to activate Arcane Combat is
self:combatLimit(self:getTalentLevel(t) * (1 + self:getCun(9, true)), 100, 20, 0, 70, 50)
which requires some interpretation of the first parameter to produce the following wiki markup
{{CL|((5 + 0.05 * Cunning) * Talent Level)|100%|20|0|70%|50}}
and will in turn produce the following text
20–70%cL:100% as ((5 + 0.05 * Cunning) * Talent Level) varies from 0–50
Notice 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.