Difference between revisions of "Template:Cs"

From Tales of Maj'Eyal
Jump to: navigation, search
m (Vyn moved page Template:CS to Template:Cs: Same reasoning)
m
 
Line 1: Line 1:
 
<includeonly><onlyinclude>{{{2}}}–{{{4}}}<sup>[[Scaling#cS|cS{{#if:{{{6|}}}|&#58;{{{6}}}P{{#if:{{{7|}}}|,{{{7}}}{{#if:{{{8|}}}|,{{{8}}}|}}|}}|{{#if:{{{7|}}}|&#58;{{{7}}}{{#if:{{{8|}}}|,{{{8}}}|}}|}}}}]]</sup> as {{{1}}} varies from {{{3}}}–{{{5}}}</onlyinclude></includeonly>
 
<includeonly><onlyinclude>{{{2}}}–{{{4}}}<sup>[[Scaling#cS|cS{{#if:{{{6|}}}|&#58;{{{6}}}P{{#if:{{{7|}}}|,{{{7}}}{{#if:{{{8|}}}|,{{{8}}}|}}|}}|{{#if:{{{7|}}}|&#58;{{{7}}}{{#if:{{{8|}}}|,{{{8}}}|}}|}}}}]]</sup> as {{{1}}} varies from {{{3}}}–{{{5}}}</onlyinclude></includeonly>
 
[[Category:Templates]]
 
 
 
===Introduction===
 
===Introduction===
  
Line 28: Line 25:
  
 
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.
 +
 +
[[Category:Templates]]

Latest revision as of 10:25, 13 October 2021

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 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.