Template:Npc names

From Terraria Wiki
Jump to navigation Jump to search
This template is i18n-ready, which means it is easy to localize for different languages. Please see I18n & l10n for templates to learn more.
See Template:Npc names/l10n for the localization of this template.
Important.svg

CAUTION: Terraria Wiki code is complex!!!

If you want to use this code on another wiki, wiki.gg staff are not able to assist you.
Please consider picking a different wiki to adapt code from, or making your own templates!
Remember that content on a wiki is more important than fancy formatting.

Template-info.svg Documentation The documentation below is transcluded from Template:Npc names/doc. (edit | history)

This template displays the list of possible names of an NPC. The data is taken from Terraria's source code via {{gameText}}. {{Npc names}} contains a few manual adjustments.

For displaying a list in the style of this template with completely manual input, see {{names list}}.

Usage

All parameters are optional.

{{ npc names | <name of the NPC> | id = <ID of the NPC> | notext = y/yes | article = <custom article> | width = <CSS column-width> }}

First unnamed parameter

Name of the NPC of whom to display the names. Defaults to the name of the page, e.g. Merchant.

id

NPC ID of the NPC of whom to display the names. Will be filled in automatically as well, but can be used as an alternative/supplement to the first unnamed parameter for manually specifying the NPC, e.g. when using the ID instead of the name is more convenient.

notext

By default, the list of names will be preceded by a short sentence. Set this parameter to suppress display of that text.

article

Custom article for the NPC; only relevant for languages with different grammatical genders. Defaults to the default_article specified in the localization database ("The" for English). Has no effect if $notext is set.

width

CSS column-width of the underlying {{names list}} used to display the names.