注意:1.4.5 的更新内容量较大,页面上很可能仍有内容尚未更新。
如中文 wiki 信息过时,可以参考英文 wiki 对应页面。
Terraria Wiki:项目/1.4.5 获取 wiki 状态与更新指南

Template:NpcIdFromInternalName

来自Terraria Wiki
跳转到导航 跳转到搜索
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 文档 以下文档来自Template:NpcIdFromInternalName/doc。(编辑 | 历史

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

es-formal:Plantilla:NpcIdFromInternalName