“模组:使用指南/入门”的版本间的差异

来自Stardew Valley Wiki
跳到导航 跳到搜索
第198行: 第198行:
 
==故障排除==
 
==故障排除==
 
===修复常见的错误消息===
 
===修复常见的错误消息===
* ''"Oops! SMAPI can't find the game."''
+
* ''" 哎呀!SMAPI找不到游戏了。"''
** Make sure you're running <tt>StardewModdingAPI.exe</tt> in your game folder (see the [[Modding:Installing SMAPI|install instructions]]).
+
** 请确定你运行的是游戏文件夹里的<tt>StardewModdingAPI.exe</tt>( 请看[[ 使用模组:安装SMAPI| 安装说明]])
** Did you install SMAPI manually (not using <tt>install.exe</tt>)? Make sure you copied the right files: <tt>internal/Windows</tt> for Windows, or <tt>internal/Mono</tt> for Linux/Mac.
+
** 你是否手动安装了SMAPI(不使用<tt>install.exe</tt> )?请确保你已复制了正确的文件:Windows上是<tt>internal/Windows</tt> ,Linux/Mac上是<tt>internal/Mono</tt>
  
* ''"Oops! SMAPI doesn't seem to be compatible with your game."''
+
* ''" 哎呀!SMAPI似乎与游戏不兼容。"''
** Make sure you have Stardew Valley 1.2.30 or later.
+
** 确保你的游戏是1.2.30 或更高版本。
  
 
* ''"Skipped '...' because it doesn't have a manifest.json"''
 
* ''"Skipped '...' because it doesn't have a manifest.json"''
第212行: 第212行:
  
 
===检查版本===
 
===检查版本===
# Make sure you have the [https://github.com/Pathoschild/SMAPI/releases latest version of SMAPI].<br /><small>The SMAPI version is shown at the top of the SMAPI console window.</small>
+
# 确保你安装了[https://github.com/Pathoschild/SMAPI/releases 最新版本的SMAPI] <br /><small>SMAPI 版本显示在SMAPI控制台窗口的顶部。</small>
# Make sure you have Stardew Valley 1.2.30 or later.<br /><small>Click the "?" button on the title screen, and the version will appear in the bottom-left.</small>
+
# 确保你的游戏是1.2.30 或更高版本。<br /><small> 点击游戏标题画面的问号按钮,版本会显示在左下方。</small>
  
===重 置内容 文件===
+
===重 置Content 文件===
 
Many problems are caused by broken files in the game's <tt>Content</tt> folder (especially if you use XNB mods). You can reset your game files to fix that. If you use any XNB mods, they'll be removed. SMAPI mods won't be affected.
 
Many problems are caused by broken files in the game's <tt>Content</tt> folder (especially if you use XNB mods). You can reset your game files to fix that. If you use any XNB mods, they'll be removed. SMAPI mods won't be affected.
  
第224行: 第224行:
 
# If you use XNB mods, reinstall them one at a time. After each install, test the game to make sure the mod doesn't cause problems.
 
# If you use XNB mods, reinstall them one at a time. After each install, test the game to make sure the mod doesn't cause problems.
  
===SEHException: External component has thrown an exception===
+
===SEHException: 外部组件发生异常===
 
You may see an error like this with <tt>SEHException</tt> in the text:
 
You may see an error like this with <tt>SEHException</tt> in the text:
  

2017年9月18日 (一) 19:32的版本

目录

Robin building.png
“我这里还有很多事情需要处理。”
— 罗宾

不完整的翻译

本文或部分尚未完全翻译成中文。 欢迎您通过编辑帮助其建设。
最后编辑Licer于2017-09-18 19:32:48.

你想在星露谷里使用mod吗?看这个页面吧!

介绍

什么是模组\MOD?

模组即MOD一种以某种方式改变了Stardew Valley的文件。模组可以添加功能(如在地图上显示NPC),改变游戏机制(比如让围栏坏的更慢),改变贴图(让你的房子看起来像霍比特人的家),以及更多功能。

常见的MOD有以下两种类型:

  • SMAPI模组使用SMAPI(一个改装API)在游戏中运行代码。这些模组功能强大而方便。安装SMAPI后,您可以通过将MOD放入文件夹中进行安装,或删除文件夹来卸载它们。您可以使用多个SMAPI模组,它们很少会发生冲突。理想情况下,你可以只使用SMAPI,但也有一些事情是SMAPI做不到的。
  • XNB模组 替换游戏的数据文件(.xnb扩展)。这些都比较难以管理(您需要跟踪覆盖哪些文件,并保持备份),而且您不能使用两个更改相同文件的mods。这些通常用于在游戏中改变图像,而现在SMAPI更加困难。

如果你刚开始,你应该避免使用XNB模组。这样做更容易出错,而且很难修复。但是,您可以同时使用XNB模组和SMAPI模组。

什么是SMAPI?

SMAPI是一个模组API — 使用它可以在启动游戏的时候加载MOD,并允许MOD直接作用于游戏代码。SMAPI可以安全地与普通游戏安装在一起,并且可以随时卸载它。

我可以在Linux、Mac、Windows、主机上使用模组吗?

以下平台支持使用MOD:

平台 Mod支持
Linux ✓ 支持
Mac ✓ 支持
Windows ✓ 支持
PS4 ✖ 不支持
XBox One ✖ 不支持

自从SMAPI的兼容性的修改后,几乎所有的mod都可以在任何支持MOD的平台上使用。

模组会损坏我的存档吗?

有可能,但是非常罕见。只有几个MOD会影响你的存档(包括GetDressed、Makeshift多人游戏、随时存档)。如果你不安装这些MOD,你的存档被损坏的可能性很低。如果还是担心的话,只需要定时备份你的存档。即使不使用MOD也强烈建议你这么做,因为通常存档损坏是由游戏本身造成的。

以后可以不用模组吗?

当然。除了一些例外(见上一个问题),大多MOD不直接影响你的存档,你可以随时停止使用它们。

使用模组会影响Steam成就吗?

只要你通过Steam启动SMAPI,就可以正常取得成就。确保你已经按照安装说明来在设置Windows上的Steam(在Linux或Mac上不需要更改Steam设置)。如果能够使用Steam overlay,就也应该能获得成就。

使用模组

安装SMAPI

在使用大多数MOD之前,您需要安装SMAPI,MOD加载器:

寻找模组

如果你正在寻找MOD,去最有人气的网站是个很好的选择;也可以看看 第一次通关推荐MOD列表

你可以在几个地方找到MOD:

网站 描述
Nexus Mods 大多数MOD都是在这里发布的。
(注册账号是免费的,不过不要注册时选择一个package。)
Chucklefish mods 部分MOD发布在这里。(其余大多数在Nexus)
ModDrop 漂亮的新网站,MOD还不多,但是通过他们的客户端可以快速安装MOD(仅Windows)。
Stardew Valley 论坛 一些MOD直接发布在论坛。一些好东西藏在这里,但发现它们可能是一个挑战。

在你下载MOD之前……

  • 它是否适用于最新版本的游戏?(SMAPI将自动禁用大多数不兼容的SMAPI MOD,但如果是你自己安装的XNB MOD,请在安装之前检查MOD的描述或注释。)
  • 不要从stardewvalleymods.net下载MOD(这里的MOD通常是过时的,因为网站为了获得广告收入未经许可转载了这些MOD)。

添加或移除模组

只需将其解压缩到你的安装目录下的子文件夹Mods中即可安装MOD。并且确保每个MOD都放在单独的子文件夹里;例如,如果你装了一个叫做PineapplesEverywhere的MOD,你的文件结构应该是这样的:

Stardew Valley/
   Mods/
      PineapplesEverywhere/
         PineapplesEverywhere.dll
         manifest.json

要卸载MOD,只需将其从Mods文件夹中删除即可。

配置模组

有些MOD在文件夹里有个config.json文件。这个文件会在第一次使用该MOD启动游戏时创建。可以让你自定义MOD的设置。

要编辑config.json文件,不要在游戏运行时编辑文件,否则更改的设置会无法生效。请看JSON的基本指南;基本上确保值被引号包围(像这样:"value")。你可使用JSON验证器来确保格式正确。

存档

存档在哪?

游戏的存档文件被放在这里:

系统 路径
Windows %appdata%\StardewValley\Saves
(粘贴"%appdata%"到地址栏,Windows知道它在哪里)
Linux ~/.config/StardewValley/Saves
(该文件夹默认隐藏。从文件点击Go » Enter Location并输入"~/.config".)
Mac ~/.config/StardewValley/Saves
(该文件夹默认隐藏。从Finder,点击Go » Go to Folder并输入"~/.config".)

每个存档都放在单独的文件夹,就像这样:JonSnow_123456789, 文件夹里有两个主要文件:JonSnow_123456789SaveGameInfo。这两个文件都是必要的。

如果你要分享或备份存档,请打包整个JonSnow_123456789文件夹。

回到上一次的存档点

如果出现问题,你可以撤销最后一次保存。

  1. 首先找到存档文件夹
    你应该看到了名称后缀有_old的两个文件;如果没有,请求助!
  2. 删除SaveGameInfo文件和名字看起来像角色名字_123456789的文件。
  3. 重命名SaveGameInfo_old角色名字_123456789_old,把后缀中的_old删掉。

编辑存档

您可以编辑存档,用于修复一些常见问题或更改选择(参加这篇教程),但在那之前请务必先备份好存档。小心使用存档编辑器工具要,因为有存档损坏的风险。

其他文件

SMAPI日志

SMAPI日志里的信息有助于故障排除。里面包括了你的游戏版本和SMAPI版本,装了什么MOD,游戏的安装位置,发生的错误以及情况。 以下是分享SMAPI日志的方法:

  1. 在这里查找日志文件:
    平台 路径
    Windows %appdata%\StardewValley\ErrorLogs\SMAPI-latest.txt
    (可以直接粘贴"%appdata%"到地址栏,Windows知道它在哪里)
    Linux ~/.config/StardewValley/ErrorLogs/SMAPI-latest.txt
    (该文件夹默认隐藏。从文件点击Go » Enter Location并输入"~/.config".)
    Mac ~/.config/StardewValley/ErrorLogs/SMAPI-latest.txt
    (该文件夹默认隐藏。从Finder,点击Go » Go to Folder并输入"~/.config".)

    (如果你看到的是MODDED_ProgramLog.Log_LATEST.txt文件的话,说明SMAPI的版本太旧了,请升级到最新版本。)

  2. 如果你要分享这个文件...

游戏文件夹

"游戏文件夹"就是包含Stardew Valley.exe(Windows)或StardewValley.exe (Linux/Mac)的文件夹。以下是找到它的方法:

  1. 检查默认位置:
    平台 路径
    Windows GOG: C:\Program Files (x86)\GalaxyClient\Games\Stardew Valley
    Steam: C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley
    Linux GOG: ~/GOG Games/Stardew Valley/game
    Steam: ~/.local/share/Steam/steamapps/common/Stardew Valley
    Mac GOG: /Applications/Stardew Valley.app/Contents/MacOS
    Steam: ~/Library/Application Support/Steam/steamapps/common/Stardew Valley/Contents/MacOS
  2. 如果没有在以上位置找到你的游戏,试试下面的方法:
    • 如果你的游戏是GOG版本:
      1. 打开GOG Galaxy客户端。
      2. 在游戏侧栏中,右键单击Stardew Valley
      3. 选择Manage Installation > Show Folder打开游戏文件夹。
    • 如果你的游戏是Steam版本:
      1. 打开Steam客户端。
      2. 右键单击Stardew Valley.
      3. 点击属性.
      4. 点击本地文件标签页。
      5. 点击浏览本地文件...'按钮即可打开游戏文件夹。

故障排除

修复常见的错误消息

  • "哎呀!SMAPI找不到游戏了。"
    • 请确定你运行的是游戏文件夹里的StardewModdingAPI.exe(请看安装说明)
    • 你是否手动安装了SMAPI(不使用install.exe)?请确保你已复制了正确的文件:Windows上是internal/Windows ,Linux/Mac上是internal/Mono
  • "哎呀!SMAPI似乎与游戏不兼容。"
    • 确保你的游戏是1.2.30或更高版本。
  • "Skipped '...' because it doesn't have a manifest.json"
    • SMAPI couldn't find the manifest.json file for the mod in that folder. That usually means it's not a SMAPI mod, so it won't work from the Mods folder. See that mod's documentation for install instructions.

SMAPI文件消失或杀毒软件报错

Your antivirus might remove or complain about some SMAPI files. This is based on heuristic detection — SMAPI rewrites mods so they work on your computer, and rewriting files is something malware also does, so your antivirus got suspicious. SMAPI doesn't have a trojan — you can check by reading the code, decompiling the download, or uploading it to VirusTotal. You just need to tell your antivirus that SMAPI is okay; try searching online for your antivirus name with the words "add exception" to find instructions.

检查版本

  1. 确保你安装了最新版本的SMAPI
    SMAPI版本显示在SMAPI控制台窗口的顶部。
  2. 确保你的游戏是1.2.30或更高版本。
    点击游戏标题画面的问号按钮,版本会显示在左下方。

重置Content文件

Many problems are caused by broken files in the game's Content folder (especially if you use XNB mods). You can reset your game files to fix that. If you use any XNB mods, they'll be removed. SMAPI mods won't be affected.

Recommended steps:

  1. Reset your game files (see instructions for Steam or for GOG Galaxy).
  2. Launch the game to see if the problem is fixed.
  3. If you use SMAPI on Linux/Mac, reinstall SMAPI to fix the launcher.
  4. If you use XNB mods, reinstall them one at a time. After each install, test the game to make sure the mod doesn't cause problems.

SEHException: 外部组件发生异常

You may see an error like this with SEHException in the text:

System.Runtime.InteropServices.SEHException (0x80004005): External component has thrown an exception.
   at new[](UInt32 )
   at Microsoft.Xna.Framework.Audio.UnsafeNativeMethods.AllocateArrayAndReadFile(String filename, Void** ppData, UInt32* pdwBufferSize)
   at Microsoft.Xna.Framework.Audio.UnsafeNativeMethods.WaveBank.CreateHandle(UInt32 hEngine, String string, Int32 length, IntPtr& pCleanup)
   at Microsoft.Xna.Framework.Audio.WaveBank..ctor(AudioEngine audioEngine, String nonStreamingWaveBankFilename)
   at StardewValley.Game1.Initialize()
   at StardewModdingAPI.Inheritance.SGame.Initialize() in D:\source\_Stardew\SMAPI\src\StardewModdingAPI\Inheritance\SGame.cs:line 302
   at Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun)
   at Microsoft.Xna.Framework.Game.Run()
   at StardewModdingAPI.Program.StartGame() in D:\source\_Stardew\SMAPI\src\StardewModdingAPI\Program.cs:line 274

That error happens in the game's audio startup code, which is very sensitive to resources being used before the audio is ready. This isn't caused by SMAPI directly, though SMAPI uses some extra resources during startup.

Common solutions:

  • Restart your computer.
  • Close your browsers and any open apps before playing. (You can reopen them once the game is started.)
  • Remove any mods that change the game's audio (e.g. mods which add more music).

其他问题

Run the game without SMAPI by launching Stardew Valley.exe (on Windows) or StardewValley-original (on Linux/Mac) in your game folder.

寻求帮助

寻找帮助

For help with a mod, the mod author is the best person to ask. These are the best ways to contact them:

  1. the discussion thread linked to on the mod page (if any);
  2. the 'bugs' section on the Nexus mod page (if any);
  3. otherwise contact the author directly (e.g. use the 'Contact' button on the Nexus mod page).

For help with SMAPI, or if you can't ask the mod author, post in this thread or ask in Discord.

包含在错误报告中的内容

Figuring out why something went wrong for someone else can be tough, so it helps if you include as much information as possible. Here's the most useful information you can give.

  1. Describe your problem:
    • Which mod has an issue?
    • What is the problem? Be as descriptive as possible. (Does the game freeze or close? Does the screen go black? Does nothing at all happen?)
    • What were you doing when it broke? Did you notice a pattern? For example, maybe it always breaks when you do a certain thing.
  2. Describe your context:
    • Do you use a mod manager? If so, which one?
    • Do you play on Linux, Mac, or Windows?
  3. Cause the problem again (so any details are in the log), then attach a copy of the latest log file (see next section).