5,349 Pages

m (clean up, typos fixed: i.e → i.e. , paranthesis → parenthesis)
 
(47 intermediate revisions by 5 users not shown)
Line 2: Line 2:
 
==Description==
 
==Description==
 
This template is used to show the progression of a value with an [[Champion ability|ability's level]] (though this template may also be used for other progressions).
 
This template is used to show the progression of a value with an [[Champion ability|ability's level]] (though this template may also be used for other progressions).
* Up to 6 values can be displayed.
+
* Up to 6 values can be displayed, if this limit is exceeded an error is displayed.
 
* In addition, line wrapping within the displayed progression is prevented.
 
* In addition, line wrapping within the displayed progression is prevented.
 
* The [[Template:Format decimal|default decimal formatting]] is applied to the output.
 
* The [[Template:Format decimal|default decimal formatting]] is applied to the output.
 
* All values may be generated using mathematical operations.
 
* All values may be generated using mathematical operations.
* For uniformity the short version [[Template:Ap|Ap]] should be used.
+
* For uniformity the short version [[Template:Ap|ap]] should be used.
   
 
==Usage==
 
==Usage==
Line 15: Line 15:
 
*<code><nowiki>{{ap|1|2|3|4|5|6}}</nowiki></code> creates: {{ap|1|2|3|4|5|6}}
 
*<code><nowiki>{{ap|1|2|3|4|5|6}}</nowiki></code> creates: {{ap|1|2|3|4|5|6}}
 
*<code><nowiki>{{ap|1.5|1.7|2.1}}</nowiki></code> creates: {{ap|1.5|1.7|2.1}}
 
*<code><nowiki>{{ap|1.5|1.7|2.1}}</nowiki></code> creates: {{ap|1.5|1.7|2.1}}
*<code><nowiki>{{ap|0|1/3|2/3|1}}</nowiki></code> creates: {{ap|0|1/3|2/3|1}}
 
   
 
;Autocompletion
 
;Autocompletion
In addition to manually entering the individual values, the template can also automatically generate the values. For this, the start value and the end value must be specified. The intermediate values ​​are then automatically supplemented according to a linear function:
+
In addition to manually entering individual values, the template can also automatically generate them with a formula that includes at least one <code>x</code>, displaying 5 values by default:
*<code><nowiki>{{ap|60:200}}</nowiki></code> creates: {{ap|60:200}}
+
*<code><nowiki>{{ap|2*x}}</nowiki></code> creates: {{ap|2*x}}
   
The basic values ​​of the calculation can also be formulated as a term:
+
If the formula is known to be linear it can be generated with a <code>start to end</code>:
*<code><nowiki>{{ap|175/(3+2) : 525/3}}</nowiki></code> creates: {{ap|175/(3+2) : 525/3}}
+
*<code><nowiki>{{ap|60 to 200}}</nowiki></code> creates: {{ap|60 to 200}}
   
By default, 5 values ​​are displayed. However, this preset can be overwritten as follows:
+
This preset can be overwritten by adding a number at the end, that indicates the amount of values displayed:
*<code><nowiki>{{ap|60:200 2}}</nowiki></code> creates: {{ap|60:200 2}}
+
*<code><nowiki>{{ap|60 to 200 2}}</nowiki></code> creates: {{ap|60 to 200 2}}
*<code><nowiki>{{ap|60:200 4}}</nowiki></code> creates: {{ap|60:200 4}}
+
*<code><nowiki>{{ap|60 to 200 4}}</nowiki></code> creates: {{ap|60 to 200 4}}
*<code><nowiki>{{ap|60:200 6}}</nowiki></code> creates: {{ap|60:200 6}}
+
*<code><nowiki>{{ap|60 to 200 6}}</nowiki></code> creates: {{ap|60 to 200 6}}
  +
  +
Multiple linear functions can be included to make a non-linear formula. To do so they need to be put inside parenthesis. This input also accepts <code>x</code>:
  +
*<code><nowiki>{{ap|(85 to 225)*(1+(0.3 to 0.5))}}</nowiki></code> creates: {{ap|(85 to 225)*(1+(0.3 to 0.5))}}
  +
*<code><nowiki>{{ap|(10 to 50)*x}}</nowiki></code> creates: {{ap|(10 to 50)*x}}
  +
  +
Additional values may still be input:
  +
*<code><nowiki>{{ap|1|3 to 9 4|10}}</nowiki></code> creates: {{ap|1|3 to 9 4|10}}
  +
*<code><nowiki>{{ap|2 to 5 3|6 to 9 3}}</nowiki></code> creates: {{ap|2 to 5 3|6 to 9 3}}
  +
  +
The basic values ​​of the calculation can also be formulated as a term:
  +
*<code><nowiki>{{ap|10/(3+2) to 600/3}}</nowiki></code> creates: {{ap|10/(3+2) to 600/3}}
   
The output is rounded to 2 decimal places by default. If a deviation is desired, this can be achieved as follows:
+
The output can be rounded as desired with the parameter <code>round</code>. Variables accepted: numbers; abs; ceil; floor:
*<code><nowiki>{{ap|1/3 : 3/3 3|round=4}}</nowiki></code> creates: {{ap|1/3 : 3/3 3|round=4}}
+
*<code><nowiki>{{ap|1/3 to 1 3|round=4}}</nowiki></code> creates: {{ap|1/3 to 1 3|round=4}}
  +
*<code><nowiki>{{ap|1 to 3|round=ceil}}</nowiki></code> creates: {{ap|1 to 3|round=ceil}}
   
Additional values may still be input:
+
==Notes==
*<code><nowiki>{{ap|1|3:8 4|10}}</nowiki></code> creates: {{ap|1|3:8 4|10}}
+
* When used on an ultimate ability page (i.e. {{ai|Soul Shackles|Morgana}}) it will display 3 values by default, instead of 5.
  +
* Have any questions or requests? Ask {{ci|Illaoi|icononly=true}} [[User:AnataBakka|AnataBakka]].
   
 
==See also==
 
==See also==
*Module basis: [[Module:Ability_progression|Ability progression]]
+
*Module basis: [[Module:Ability progression|Ability progression]] (and [[Module:Feature|Feature]])
 
*Redirecting template: [[Template:Ap|Ap]]
 
*Redirecting template: [[Template:Ap|Ap]]
 
*Related template: [[Template:Passive progression|Passive progression]]
 
*Related template: [[Template:Passive progression|Passive progression]]
   
<includeonly>[[Category:Templates]]</includeonly>
+
<includeonly>[[Category:Formatting templates]]</includeonly>
 
[[de:Vorlage:Ability progression]]
 
[[de:Vorlage:Ability progression]]
  +
[[ru:Шаблон:Ability progression]]

Latest revision as of 21:52, September 2, 2019

DescriptionEdit

This template is used to show the progression of a value with an ability's level (though this template may also be used for other progressions).

  • Up to 6 values can be displayed, if this limit is exceeded an error is displayed.
  • In addition, line wrapping within the displayed progression is prevented.
  • The default decimal formatting is applied to the output.
  • All values may be generated using mathematical operations.
  • For uniformity the short version ap should be used.

UsageEdit

The template can be integrated anywhere with the following code: {{ap|<parameters>}}

Manual examples
  • {{ap|50|70|90}} creates: 50 / 70 / 90
  • {{ap|1|2|3|4|5|6}} creates: 1 / 2 / 3 / 4 / 5 / 6
  • {{ap|1.5|1.7|2.1}} creates: 1.5 / 1.7 / 2.1
Autocompletion

In addition to manually entering individual values, the template can also automatically generate them with a formula that includes at least one x, displaying 5 values by default:

  • {{ap|2*x}} creates: 2 / 4 / 6 / 8 / 10

If the formula is known to be linear it can be generated with a start to end:

  • {{ap|60 to 200}} creates: 60 / 95 / 130 / 165 / 200

This preset can be overwritten by adding a number at the end, that indicates the amount of values displayed:

  • {{ap|60 to 200 2}} creates: 60 / 200
  • {{ap|60 to 200 4}} creates: 60 / 106.66666666667 / 153.33333333333 / 200
  • {{ap|60 to 200 6}} creates: 60 / 88 / 116 / 144 / 172 / 200

Multiple linear functions can be included to make a non-linear formula. To do so they need to be put inside parenthesis. This input also accepts x:

  • {{ap|(85 to 225)*(1+(0.3 to 0.5))}} creates: 110.5 / 162 / 217 / 275.5 / 337.5
  • {{ap|(10 to 50)*x}} creates: 10 / 40 / 90 / 160 / 250

Additional values may still be input:

  • {{ap|1|3 to 9 4|10}} creates: 1 / 3 / 5 / 7 / 9 / 10
  • {{ap|2 to 5 3|6 to 9 3}} creates: 2 / 3.5 / 5 / 6 / 7.5 / 9

The basic values ​​of the calculation can also be formulated as a term:

  • {{ap|10/(3+2) to 600/3}} creates: 2 / 51.5 / 101 / 150.5 / 200

The output can be rounded as desired with the parameter round. Variables accepted: numbers; abs; ceil; floor:

  • {{ap|1/3 to 1 3|round=4}} creates: 0.3333 / 0.6667 / 1
  • {{ap|1 to 3|round=ceil}} creates: 1 / 2 / 2 / 3 / 3

NotesEdit

  • When used on an ultimate ability page (i.e. Soul Shackles Soul Shackles) it will display 3 values by default, instead of 5.
  • Have any questions or requests? Ask Illaoi OriginalSquare AnataBakka.

See alsoEdit

Community content is available under CC-BY-SA unless otherwise noted.