Template:Modes

From Terraria Wiki
Jump to navigation Jump to search
Template-info.svg Documentation The documentation below is transcluded from Template:Modes/doc. (edit | history)

This template is to be used in {{npc infobox}} values where a distinction between Classic/Expert/Master Modes is needed.

Usage

{{ modes | <Classic value> | <Expert value> | <Master value> | expertonly = y/yes | wrap = n/no }}

First, second, and third unnamed parameters

Classic, Expert, and Master values. The named parameters | normal =, | expert =, and | master = can be used alternatively.

expertonly

Use this parameter if there is no Classic value (e.g. for Expert-exclusive NPCs). Named parameters are recommended in this case.

wrap

By default, the Expert and Master values are formatted in their characteristic styling via {{expert}} and {{master}}. Use this parameter to prevent that wrapping. This can be useful if the Expert and Master values contain parts that should not be formatted.

Examples

Code Result
{{npc infobox
| name = Modes example | imagealt = <nowiki/>

| damage = {{modes|1|2|3}}

<!-- don't wrap Expert/Master values with {{expert}} and {{master}} -->
| life = {{modes|wrap=no|4|5|6}}

<!-- Expert only, no Classic value -->
| defense = {{modes|expertonly=yes|8|9}}

<!-- the Classic value will be ignored -->
| knockback = {{modes|expertonly=yes|7%|8%|9%}}

<!-- named parameters -->
| money = {{modes|normal={{cc|10}}|expert={{cc|11}}|master={{cc|12}}}}
}}
Modes example
Classic mode icon.png Classic
Expert mode icon.png Expert
Master mode icon.png Master
Statistics
Type
Damage123
Max Life456
Defense89
KB Resist8%9%
Drops
Coins10 CC11 CC12 CC