Template:NpcIdFromInternalName

From Terraria Wiki
Jump to navigation Jump to search
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:NpcIdFromInternalName/doc. (edit | history)

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

Usage

{{ npcIdFromInternalName | <internal NPC name> }}

First unnamed parameter

Internal name of the NPC. If it is empty or invalid, the template will return an empty string. Count is a special internal name which returns the greatest possible NPC ID plus 1. Use {{npcinfo/maxId}} instead preferably to retrieve the maximum NPC ID.

Examples

Code Result
{{npcIdFromInternalName|BlueSlime}} 1
{{npcIdFromInternalName|NonexistentNpcName}}
{{npcIdFromInternalName|Count}} 697

See also