5,787 Pages

Description

This template is used to display values or statistics that scale, usually based on level. It can also be applied to non-linear scaling, or values that scale based on a number of stacks.

There are two generated outputs: the visible text output, and the table embedded within the tooltip. The displayed tooltip is generated by Template:Tooltip/Pp. All values are applied default decimal formatting.

Usage

The abbreviated link {{pp|<>}} is used for brevity.

However, there are numerous optional parameters of variable usefulness:

{{pp|<1>|<2>|<changedisplay>|<showtype>|<label1>|<type>|<label2>|<formula>|<key>|<key1>|<round>|<round1>|<color>}}

  • 1
    • The first parameter specifies the progression's values, separated using semicolons and up to a maximum of 30.
  • 2
    • The second parameter specifies the values' associated levels (or other basis of scaling), again separated using semicolons and capped at 30.
    • If left blank, this will automatically be populated using counting numbers.
  • changedisplay
    • If parameter 1 includes 5 or fewer values, the default in-line display is separated by slashes. If there are more than five values, then the in-line output will be abbreviated to a range only displaying the initial and final values.
    • If this parameter is set to true, it will reverse the display settings from the default, established by the previous point.
  • showtype
    • The display includes an in-line text showing the relation between the parameters, defaulted to "(based on level)".
    • Setting this parameter to false will disable the in-line text.
  • label1, type
    • Overwrites the label of the tooltip's first row and the in-line text's scaling factor.
    • If both parameters are present, type will over-write the in-line text, and label1 will override row 1's label.
  • label2
    • Overwrites the label of the tooltip's second row.
  • formula
    • Formulas are displayed automatically in tooltip if available.
    • Can be set to a custom string.
    • Operator symbols are switched with operator characters.
  • key, key1
    • Used to add units to values.
    • key concatenates text to each value of variable 1.
    • key1 concatenates text to each value of variable 2.
      • Both keys concatenate only if the value is a number.
  • round, round1
    • Sets the number of decimal places. Defaults to 2 decimal places.
    • Can be set to a positive integer value, abs, ceil, floor or trunc.
  • color

a) Basic usage:

{{pp|10}}
creates: 10 (based on level)
{{pp|10|20}}
creates: 10 (based on level)
{{pp|1.1;2.2;3.3;4.4;5.5|5;10;15;20;25.5}}
creates: 1.1 / 2.2 / 3.3 / 4.4 / 5.5 (based on level)
{{pp|200/10;400/5;120+20}}
creates: 20 / 80 / 140 (based on level)


b) Automatic adjustment of the text:

{{pp|2;4;6;8;10}}
creates: 2 / 4 / 6 / 8 / 10 (based on level)
{{pp|2;4;6;8;10;12}}
creates: 2 − 12 (based on level)


c) Disabling the relation between the rows:

{{pp|2;4;6;8;10|showtype=false}}
creates: 2 / 4 / 6 / 8 / 10
{{pp|2;4;6;8;10;12|showtype=false}}
creates: 2 − 12


d) Invert the automatic adjustment:

{{pp|2;4;6;8;10|changedisplay=true}}
creates: 2 − 10 (based on level)
{{pp|2;4;6;8;10;12|changedisplay=true}}
creates: 2 / 4 / 6 / 8 / 10 / 12 (based on level)


e) Descriptive labeling:

{{pp|label1=stacks|2;4;6;8;10;12}}
creates: 2 − 12 (based on stacks)
{{pp|label=stacks|2;4;6;8;10;12}}
creates: 2 − 12 (based on level)
{{pp|type=the champion's level|2;4;6;8;10;12}}
creates: 2 − 12 (based on the champion's level)
{{pp|type=the champion's level|label1=champion's level|2;4;6;8;10;12}}
creates: 2 − 12 (based on the champion's level)


f) Basic autocompletion: It is possible to automatically fill the table and the PVO with data. This can be either done with the function x to y which fills the table with all numbers between x to y by following a linear formula, or a manually input formula in which there's at least one x. Simplified formulas, i.e. 2x do not work and must be written in the full form, i.e. 2*x. The number of columns per formula is decided by inputting a for followed by a value at the end of the function, from now on called size. If it is not specified it will be defaulted to 18. If one row is entirely made up of only manual input values, the size parameter will be overwritten by the amount of input values. size may also be automatically generated with the by z function, which increments the starting value by the number following by until reaching the final value. If the value is not able to reach the final value, it will be overwritten by the closest number that can. An automatically generated displayed formula will also be provided:

{{pp|10 to 180}}
creates: 10 − 180 (based on level)
{{pp|2*x+5/4*2}}
creates: 4.5 − 38.5 (based on level)
{{pp|x+2 for 10}}
creates: 3 − 12 (based on level)
{{pp|175/3 to 525/3 for 3}}
creates: 58.33 / 116.67 / 175 (based on level)
{{pp|10 to 40|123;531;131;341;431}}
creates: 10 / 17.5 / 25 / 32.5 / 40 (based on level)
{{pp|600 to 850 by 50}}
creates: 600 − 850 (based on level)
{{pp|600 to 850 by 40}}
creates: 600 − 850 (based on level)


g) Advanced autocompletion: Other values can also be added to the left and right of the function. The function will fill numbers until reaching the size value. If x to y are used one after another and the y of the first is equal to the x of the second, the second to will start filling immediately after the first. then followed by a formula may be used to increment the previous value as wished:

{{pp|1;2*x+5/3*(x-1);20}}
creates: 1 − 20 (based on level)
{{pp|10 to 90 for 9; 90 to 360}}
creates: 10 − 360 (based on level)
{{pp|4 to 20; 20 to 45 by 5|10 to 40 for 10}}
creates: 4 − 45 (based on level)
{{pp|1+2*(x-1) for 6;then + 8*x for 7; then + 4*x}}
creates: 1 − 87 (based on level)


h) Displaying formulas:

{{pp|2*x for 6}}
creates: 2 − 12 (based on level)
{{pp|formula=custom formula|2;4;6;8;10;12}}
creates: 2 − 12 (based on level)


i) Units of measurement:

{{pp|key=k|2*x for 21|10 to 100|key1=%}}
creates: 2k − 42k (based on level)
{{pp|key=k|2*x for 21|10 to 100|key1=%|changedisplay=true}}
creates: 2 / 4 / 6 / 8 / 10 / 12 / 14 / 16 / 18 / 20 / 22 / 24 / 26 / 28 / 30 / 32 / 34 / 36 / 38 / 40 / 42k (based on level)


j) Rounding:

{{pp|round=4|175/3 to 525/3 for 3|round1=0|175/3 to 525/3}}
creates: 58.3333 / 116.6667 / 175 (based on level)
{{pp|-100 to 100}}
creates: -100 − 100 (based on level)
{{pp|round=ceil|-100 to 100}}
creates: -100 − 100 (based on level)
{{pp|round=floor|-100 to 100}}
creates: -100 − 100 (based on level)
{{pp|round=trunc|-100 to 100}}
creates: -100 − 100 (based on level)


k) Colors:

{{pp|color=ad|label1=[[Attack damage]]|type=[[attack damage]]|2 to 12 for 6}}
creates: 2 − 12 (based on attack damage)
{{pp|key1=%|type='''missing''' mana|label1=Missing mana|color=mana|0 to 8 for 9|0 to 80}}
creates: 0 − 8 (based on missing mana)


l) Images:

{{pp|label1=[[File:Moonfall.png|20px]] Moonfall's rank|2 to 12 for 6}}
creates: 2 − 12 (based on Moonfall Moonfall's rank)
{{pp|label=[[File:Moonfall.png|20px]] Moonfall's rank|2 to 12 for 6}}
creates: 2 − 12 (based on level)
{{pp|type=the rank of [[File:Diana OriginalSquare.png|20px]] Diana's [[File:Moonfall.png|20px]] Moonfall|2 to 12 for 6}}
creates: 2 − 12 (based on the rank of Diana OriginalSquare Diana's Moonfall Moonfall)
{{pp|formula=+2 per [[File:Moonfall.png|20px]] Moonfall's rank|2 to 12 for 6}}
creates: 2 − 12 (based on level)
See also


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