模组:常见的数据字段
跳到导航
跳到搜索
← 目录
不完整的翻译 本文或部分尚未完全翻译成中文。
欢迎您通过编辑帮助其建设。 |
此页面主要记录常出现在游戏数据文件的字段类型。
你不需要直接读取此页面的内容,特定部分会从其它页面的字段文档在中连接。
字符串格式
这些格式仅在特定支持它们的字段中使用,如果适用,字段文件将连接到该页面。
特定的字符串ID
游戏识别数据会使用特定的字符串ID。例如:Town是 Pelican Town (鹈鹕镇)特定的ID,其它位置都不能使用这个ID。ID的使用目的很广,从内部的游戏逻辑到模组编辑
模组最佳做法:
- Use namespaced IDs prefixed with your mod's unique ID. For example, if your mod ID is
Example.PufferchickMod
and you're adding a pufferchick plushy, your item ID would look likeExample.PufferchickMod_PufferchickPlushy
. In a Content Patcher pack, you can use{{ModId}}_PufferchickPlushy
to insert your mod ID automatically. - Only use alphanumeric (a–z, A–Z, 0–9), underscore (
_
), and dot (.
) characters in string IDs. This is important because they're often used in places where some characters have special meaning (like file names or game state queries).
Although the game generally doesn't validate the ID format, you're strongly encouraged to use this exact format to maintain good mod compatibility, eliminate ID conflicts, and make it easy (for both troubleshooters and mod code) to identify which mod added custom content.