Template:Recipes/register

From Terraria Wiki
Jump to navigation Jump to search
This template uses Lua.
This template uses Module:Recipes, a script written in the Lua programming language. To learn more about Lua, see Terraria Wiki:Lua.
This template uses the Cargo extension.
This template uses Extension:Cargo, an integral part of the wiki's back-end.
  • This template adds rows to the table "Recipes", which is declared by the template Recipes. View table.
Template-info.svg Documentation The documentation below is transcluded from Template:Recipes/register/doc. (edit | history)

This template is used to store the data for a recipe into the cargo database.

Usage

{{recipes/register
| version = <recipe exclusivity (see below)>
| result = <result item name> | resultid = <result item ID> | amount = <result item amount> | note = <note text> | image = <result item image>
| station = <crafting station name>
| <ingredient 1 name> | <ingredient 1 amount>
| <ingredient 2 name> | <ingredient 2 amount>
...
| <ingredient n name> | <ingredient n amount>
}}

For <ingredient name>, you can use the following syntax to customize its image/note: <itemname>(#i:<image>)?(#n:<note>)?. You can use & to represent the item name in #i:<image>. Further more, #i:old is a shortcut for #i:& (old).png. For example: Tungsten Bar#i:old is same as Tungsten Bar#i:& (old).png and will get Tungsten BarTungsten Bar (same as the result of {{item|Tungsten Bar|image=Tungsten Bar (old).png}}). This is mainly used in old-version-exclusive/platform-exclusive recipes.

Notes

  • All result and ingredient amounts are required, even if they are 1.
  • The version parameter is only to be used if there are two or more recipes for a result item or if a result item is only craftable on a proper subset of the versions it is available on (i.e., if it can be crafted on one version but not on another). Result items that are exclusive to at least one version generally do not get version tags, since the little version icons added by {{item}} sufficiently denote exclusivity of the entire recipe (the same applies to recipes including ingredient items that are exclusive to any version).
    • Use {{eversions}} with code=y as the parameter's value.
  • The note and image parameters are rarely used, and are only appropriate in edge cases. For note, if l10n is needed, you should use l10n ref instead of actual text. For example, |note=#note_moon_1 will use l10n['result_note']['#note_moon_1'] from Module:Recipes/l10n as result note.
  • This template shouldn't be used on normal pages, and instead should only be used on Recipes/[station]/register subpages. Here's a list of all those subpages: