Calamity Mod Wiki
mNo edit summary
mNo edit summary
Line 32: Line 32:
 
// Display
 
// Display
 
-->{{#vardefine:sep|}}<!--
 
-->{{#vardefine:sep|}}<!--
-->{{#ifexpr:{{#dplreplace:{{#var:normalValue}}|[,%a-zA-Z]|}}|{{#var:normalValue}}{{#vardefine:sep|&#32;/&#32;}}}}<!--
+
-->{{#ifexpr:{{#dplreplace:{{#var:normalValue}}|\D|}}|{{#var:normalValue}}{{#vardefine:sep|&#32;/&#32;}}}}<!--
-->{{#ifexpr:{{#dplreplace:{{#var:expertValue}}|[,%a-zA-Z]|}}|{{#var:sep}}{{expert|{{#var:expertValue}}}}{{#vardefine:sep|&#32;/{{#if:{{{break|}}}|<br/>|&#32;}}}}}}<!--
+
-->{{#ifexpr:{{#dplreplace:{{#var:expertValue}}|\D|}}|{{#var:sep}}{{expert|{{#var:expertValue}}}}{{#vardefine:sep|&#32;/{{#if:{{{break|}}}|<br/>|&#32;}}}}}}<!--
-->{{#ifexpr:{{#dplreplace:{{#var:revValue}}|[,%a-zA-Z]|}}|{{#var:sep}}{{revengeance|{{#var:revValue}}}}{{#vardefine:sep|&#32;/&#32;}}}}<!--
+
-->{{#ifexpr:{{#dplreplace:{{#var:revValue}}|\D|}}|{{#var:sep}}{{revengeance|{{#var:revValue}}}}{{#vardefine:sep|&#32;/&#32;}}}}<!--
-->{{#ifexpr:{{#dplreplace:{{#var:deathValue}}|[,%a-zA-Z]|}}|{{#var:sep}}{{death|{{#var:deathValue}}}}}}<!--
+
-->{{#ifexpr:{{#dplreplace:{{#var:deathValue}}|\D|}}|{{#var:sep}}{{death|{{#var:deathValue}}}}}}<!--
   
 
--></includeonly><noinclude>{{doc}}</noinclude>
 
--></includeonly><noinclude>{{doc}}</noinclude>

Revision as of 21:04, 6 February 2020

Template-info Documentation The documentation below is transcluded from Template:Difficulty value/doc. (edit | history)

A template used for convenience with showing values for the different difficulty modes.

Usage

{{ difficulty value | <Normal Mode Value> | <Expert Mode Value> | <Revengeance Mode Value> | <Death Mode Value> | <Malice Mode Value> }}

Example: {{ difficulty value | 1 | 2 | 3 }} returns 1 / 2 / 3.

Other parameters

break

Specifies whether you want the latter Revengeance and Death values to be on a separate line, for use in the NPC infobox.

boost

Percentage boost to multiply and automatically calculate the values with in Expert, Revengeance and Death Mode. It should be expressed as a decimal value, i.e. 0.05, which equals to 5% of the value. All set values except for the Normal Mode one will be overridden if used.

Examples

Code Result
{{difficulty value|1}} 1
{{difficulty value|0|1}} 1
{{difficulty value|0|0|1}} 1
{{difficulty value|0|0|0|1}} 1
{{difficulty value|1|2|0|4|7}} 1 / 2 / 4
{{difficulty value|1|2|3|4|break=yes}} 1 / 2 /
3 / 4
{{difficulty value|1000|boost=0.25}} 1000 / 2000 / 2500 / 2800

Notes

  • Values of "0" or null are not displayed.