Template:ItemIdFromInternalName

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.
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:ItemIdFromInternalName/doc. (edit | history)

This template returns the ID of an item based on its internal name.

Usage

{{ itemIdFromInternalName | <internal item name> }}

First unnamed parameter

Internal name of the item. If it is empty or invalid, the template will return an empty string.

Examples

Code Result
{{itemIdFromInternalName|IronPickaxe}} 1
{{itemIdFromInternalName|SDMG}} 1553
{{itemIdFromInternalName| SDMG }} 1553
{{itemIdFromInternalName|NonexistentItemName}}
{{itemIdFromInternalName|}}

See also