Template:DamageMultiplier

From Noita Wiki
Jump to navigation Jump to search

Usage

{{DamageMultiplier|_}}

Examples

Any version of the number 1 will be formatted the same way

{{DamageMultiplier|1}}

1

Multipliers greater than one receive one alternative formatting:

{{DamageMultiplier|1.5}}

1.5

While multipliers less than one receive another alternative formatting:

{{DamageMultiplier|0.1}}

0.1

While multipliers equal to zero receive another alternative formatting:

{{DamageMultiplier|0}}

0

While multipliers less than zero receive another alternative formatting:

{{DamageMultiplier|-0.25}}

-0.25

Missing parameters, empty strings, and strings of all breaking whitespace are replaced with the default multiplier of 1.0x:

{{DamageMultiplier}}

1

{{DamageMultiplier|}}

1


Special nonconforming multipliers are rendered as-is.

{{DamageMultiplier|1.0x + 0.1x per torches on wand}}

1.0x + 0.1x per torches on wand

We can manually apply styling inside the template parameter itself in these cases, but this requires escaping of equals signs to avoid being interpreted as an attempt to set a named template parameter:

{{DamageMultiplier|<span style{{=}}"color:#228833;">1.0x + 0.1x per torches on wand</span>}}

1.0x + 0.1x per torches on wand


If it looks like a number, it will be converted to a number and formatted back to a string for display. So 0.1, 0.1000, etc., are all the same. Extreme values are formatted using scientific notation.

{{DamageMultiplier|0.1000}}

0.1

{{DamageMultiplier|0.000000001}}

1.0E-9

{{DamageMultiplier|1e-8}}

1.0E-8

{{DamageMultiplier|-10}}

-10

{{DamageMultiplier|-10e8}}

-1000000000

{{DamageMultiplier|-10e20}}

-1.0E+21

infobox test