5,327 Pages

Line 19: Line 19:
 
;Autocompletion
 
;Autocompletion
 
In addition to manually entering individual values, the template can also automatically generate them. For this, the start value and the end value must be specified. The intermediate values ​​are then automatically supplemented according to a linear function, displaying 5 values by default:
 
In addition to manually entering individual values, the template can also automatically generate them. For this, the start value and the end value must be specified. The intermediate values ​​are then automatically supplemented according to a linear function, displaying 5 values by default:
*<code><nowiki>{{ap|60:200}}</nowiki></code> creates: {{ap|60:200}}
+
*<code><nowiki>{{ap|60 to 200}}</nowiki></code> creates: {{ap|60 to 200}}
   
 
However, this preset can be overwritten by adding a number at the end, that indicates the amount of values displayed:
 
However, 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}}
   
 
Additional values may still be input:
 
Additional values may still be input:
*<code><nowiki>{{ap|1|3:9 4|10}}</nowiki></code> creates: {{ap|1|3:9 4|10}}
+
*<code><nowiki>{{ap|1|3 to 9 4|10}}</nowiki></code> creates: {{ap|1|3 to 9 4|10}}
*<code><nowiki>{{ap|2:5 3|6:9 3}}</nowiki></code> creates: {{ap|2:5 3|6:9 3}}
+
*<code><nowiki>{{ap|2 to 5 3|6 to 9 3}}</nowiki></code> creates: {{ap|2 to 5 3|6 to 9 3}}
   
 
If the indicator is missing, the function will fill the values until 5 are being displayed:
 
If the indicator is missing, the function will fill the values until 5 are being displayed:
*<code><nowiki>{{ap|60:200|220}}</nowiki></code> creates: {{ap|60:200|220}}
+
*<code><nowiki>{{ap|60 to 200|220}}</nowiki></code> creates: {{ap|60 to 200|220}}
   
 
The basic values ​​of the calculation can also be formulated as a term:
 
The basic values ​​of the calculation can also be formulated as a term:
*<code><nowiki>{{ap|10/(3+2):600/3}}</nowiki></code> creates: {{ap|10/(3+2):600/3}}
+
*<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 is rounded to 2 decimal places by default. If a deviation is desired, this can be achieved as follows:
*<code><nowiki>{{ap|1/3:1 3|round=4}}</nowiki></code> creates: {{ap|1/3:1 3|round=4}}
+
*<code><nowiki>{{ap|1/3 to 1 3|round=4}}</nowiki></code> creates: {{ap|1/3 to 1 3|round=4}}
   
 
==See also==
 
==See also==

Revision as of 15:41, December 10, 2018

Description

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, remaining values are simply not shown.
  • 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.

Usage

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
  • {{ap|0|1/3|2/3|1}} creates: 0 / 0.33333333333333 / 0.66666666666667 / 1
Autocompletion

In addition to manually entering individual values, the template can also automatically generate them. For this, the start value and the end value must be specified. The intermediate values ​​are then automatically supplemented according to a linear function, displaying 5 values by default:

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

However, 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

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

If the indicator is missing, the function will fill the values until 5 are being displayed:

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

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 is rounded to 2 decimal places by default. If a deviation is desired, this can be achieved as follows:

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

See also

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