Template:ItemIdFromName

From Terraria Wiki
Jump to navigation Jump to search
This template uses Lua.
This template uses Module:ItemNames, a script written in the Lua programming language. To learn more about Lua, see Terraria Wiki:Lua.
Template-info.svg Documentation The documentation below is transcluded from Template:ItemIdFromName/doc. (edit | history)

This template returns the Item ID of an item based on its English name. It requires the exact name of the item.

Usage

{{ItemIdFromName | <Item name> (optional) }}

First unnamed parameter

English Name of the item. If empty or invalid, will return empty string.

Examples

Code result
{{ItemIdFromName|Iron Pickaxe}} 1
{{ItemIdFromName|S.D.M.G.}} 1553
{{ItemIdFromName| S.D.M.G. }} 1553
{{ItemIdFromName|}}
{{ItemIdFromName|someNameNotExists}}

Note

{{gameText/internalName|ItemName|<name>|lang=<lang>}} can be used to retrieve item ID from a localized item name.

See also