模组:使用 XNB 模组

来自Stardew Valley Wiki
跳到导航 跳到搜索

命令

XNB 模组是已过时的模组类型,不再建议使用。SMAPI 无法验证它们的兼容性,使用 XNB 模组需要自担风险,查看 使用 Content Patcher 的替代方法

XNB 模组 通过替换游戏的 .xnb 文件来实现修改 (而不是你的 Mods 文件夹)

常见问题

什么是 XNB 模组?

XNB 模组通过替换游戏的数据文件来工作 (也就是 .xnb 后缀的文件)。例如,假设要更改 Abigail 的肖像;你可以替换 Content/Portraits/Abigail.xnb 来实现。(参阅 编辑 XNB 文件)

为什么已弃用?

XNB 模组有很多限制,通常会相互冲突,通常在游戏更新时会丢失更新,难以安装和删除等

考虑使用 SMAPI 模组 和 内容包。与 XNB 模组相比,它们具有以下优点:

功能 XNB 模组 SMAPI 模组 SMAPI 内容包
易于安装 ✘ 每个模组都不一样 ✓ 拖入 Mods
易于卸载 ✘ 需要原版的文件 ✓ 从 Mods 中移除
检查更新 ✘ 无 ✓ SMAPI 控制台自动检测
兼容性检查 ✘ 无 ✓ 不兼容的模组会在导致问题之前被禁用
兼容性列表 定期更新解决方法
模组相容性 ✘ 每个文件只能替换一次 ✓ 几乎无穷 ✓ 高
翻译支持 ✘ 难以翻译 ✓ 集成翻译接口 (取决于内容包)
游戏兼容性 ✘ 游戏一更新就爆炸 ✓ SMAPI 自动重写许多模组以实现兼容性
✓ 开源的模组能够更快地更新

它们可以在 Linux,Mac,Windows 或控制台上运行吗?

XNB 模组在 Linux,Mac,Windows 和 Android 上均能正常工作,不支持控制台

他们会破坏我的存档吗?

是的,但这并不常见。确保你备份了 你的文件,并在卸载 XNB 模组之前删除所有自定义内容。在大多数情况下可以通过以下方式修复损坏的存档:还原到上一次的存档.

它们会禁用 Steam 成就吗?

不会

使用 Content Patcher 的替代方法

Content Patcher 是一种 SMAPI 模组,可进行类似 XNB 的更改,并可创建 SMAPI 内容包。许多 XNB 模组 具有与 Content Patcher 等效的功能,或已经非官方更新以使它们可用。考虑在可用的地方改用这些

模组制作者:

  • 迁移 XNB 模组时,你如果实际上需要替换整个文件(例如肖像模组),仅使用 Action: Load 即可。不要使用 Action: Load 用于对话模组或更改文件的一小部分!
  • 参阅在官方论坛上获取有关创建转化的更多信息:将XNB 模组 迁移到 Content Patcher 内容包

Using XNB mods

Find mods

See Find mods on the Getting Started page.

Install mods

Installation is different for each mod; check its mod description for details. But in general:

  1. Download the XNB mod and unzip it somewhere (not in your game folder!).
  2. It should contain some .xnb files.
  3. Find your game folder.
  4. Replace the existing .xnb files under Content with the ones from the mod. Make sure you replace the correct files! There are different files with the same name (like Content/Data/hats.xnb and Content/Characters/hats.xnb), and replacing the wrong file will cause in-game errors or crashes.

Uninstall mods

Either restore the original files that mod replaced (hope you kept track!), or reset your game files.

Troubleshooting

Reset content files

If you know which mod caused the problem, uninstall it.

If you're not sure, the simplest option is:

  1. reset your game files;
  2. reinstall each XNB mod one by one;
  3. test after each install to make sure it didn't cause problems.

Other issues

See Modding:Player Guide/Troubleshooting for more suggestions.