Difference between revisions of "Template:Cl"

From Tales of Maj'Eyal
Jump to: navigation, search
(Basic Example: Fixed example)
(Basic Example: Switched example to lower case "cl")
 
Line 19: Line 19:
 
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>{{CL|( (1 + 0.09 * Cun) * Talent Level )|100%|20|0|70%|50}}</pre>
+
<pre>{{cl|( (1 + 0.09 * Cun) * 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|( (1 + 0.09 * Cun) * Talent Level )|100%|20|0|70%|50}}
+
  {{cl|( (1 + 0.09 * Cun) * Talent Level )|100%|20|0|70%|50}}
  
 
Note that any percentage signs must be inserted manually with the parameters.
 
Note that any percentage signs must be inserted manually with the parameters.
  
 
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.

Latest revision as of 07:50, 28 September 2021


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|( (1 + 0.09 * Cun) * Talent Level )|100%|20|0|70%|50}}

and will in turn produce the following text

20–70%cL:100% as ( (1 + 0.09 * Cun) * Talent Level ) varies from 0–50

Note that any percentage signs must be inserted manually with the parameters.

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.