Template:Shop

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:Shop/l10n for the localization of this template.
Template-info.svg Documentation The documentation below is transcluded from Template:Shop/doc. (edit | history)

For use with NPC vendors.

Usage

All parameters are optional.

{{ shop
| nonote = y/yes | onlynote = y/yes | notenohappiness = y/yes
| width1 = <item column width> | width2 = <cost column width> | width3 = <availability column width>
| header = <header text>
| sortable = n/no | align = <align attribute> | css/style = <custom CSS>
| {{ shop row | <item name of sold item 1> | <availability> | value = <buy value> | image = <displayed image> }}
| {{ shop row | <item name of sold item 2> | <availability> | value = <buy value> | image = <displayed image> }}
...
| {{ shop row | <item name of sold item n> | <availability> | value = <buy value> | image = <displayed image> }}
}}
First, second, third, etc. unnamed parameters

The vendor's shop inventory content using {{shop row}}; see below. Can be continued ad infinitum.

width1, width2, width3

The width of the respective column in pixels by default. When omitted, the lowest possible width would be selected automatically for the column.

header

Header text of the template; defaults to "Inventory".

sortable

Makes the lists not sortable.

nonote

Set this parameter to remove the note about shop prices Happiness from above the table.

onlynote

Set this parameter to only display the note about shop prices Happiness. The unnamed {{shop row}} parameters will be ignored and the table will not be displayed at all.

notenohappiness

Set this parameter to omit the part regarding Happiness from the note. Has no effect if |nonote=yes.

align

Sets the align attribute, e.g. center, right.

css / style

Custom CSS for the table.

{{shop row}} parameters

The first unnamed parameter is required, all others are optional.

First unnamed parameter

Name of the sold item.

Second unnamed parameter

The circumstances under which the item is sold; defaults to "Always available.".

value

Override the automatic buy value of the item. Use the {{coin}} or {{cc}}, {{sc}}, {{gc}}, and {{pc}} templates. Supports @@@@ (the value of the item is substituted in its place).

image, icons

These parameters behave like with {{item}}: $image changes the sold item's displayed image (e.g. |image=Wood.png/Acorn.png), and $icons controls the display of the item's exclusivity icons.