Difference between revisions of "Template:Cl"
From Tales of Maj'Eyal
(Created template for combatScale) |
(Fixing mixup with combatScale.) |
||
Line 13: | Line 13: | ||
===Basic Example=== | ===Basic Example=== | ||
− | The LUA code for the | + | The LUA code for the chance to activate [[Arcane combat (talent)|Arcane Combat]] is |
− | self: | + | 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 | which requires some interpretation of the first parameter to produce the following wiki markup | ||
− | <pre>{{ | + | <pre>{{CL|((5 + 0.05 * Cunning) * Talent Level)|100%|20|0|70%|50}}</pre> |
and will in turn produce the following text | and will in turn produce the following text | ||
− | {{ | + | {{CL|((5 + 0.05 * Cunning) * Talent Level)|100%|20|0|70%|50}} |
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 21:56, 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
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.