模组:使用指南/入門

出自Stardew Valley Wiki
於 2017年8月28日 (一) 12:45 由 Licer討論 | 貢獻 所做的修訂 →‎Other files
跳至導覽 跳至搜尋

目錄

Robin building.png
“我這裡還有很多事情需要處理。”
— 羅賓

不完整的翻譯

本文或部分尚未完全翻譯成中文。 歡迎您通過編輯幫助其建設。
最後編輯Licer於2017-08-28 12:45:34.

你想在星露谷里使用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 Most mods are released here.
(Registering an account is free, just don't choose a package when you register.)
Chucklefish mods Some mods are released here (most are also on Nexus).
ModDrop Pretty new. Not many mods yet, but you can install those it has very quickly through their (Windows-only) client.
Stardew Valley forums Some mods are posted directly in the forums. Some hidden gems are only here, but finding them can be a challenge.

Before you download a mod...

  • Does it work with the latest version of the game? (SMAPI will automatically disable most incompatible SMAPI mods, but you're on your own with XNB mods. Try checking the mod description or comments.)
  • Don't download from stardewvalleymods.net. (Mods here are usually outdated, since the site republishes mods without permission for ad revenue.)

添加或移除模組

To install a mod, just unzip it into the Mods folder inside your game folder. Make sure each mod has its own subfolder; for example, if you have a PineapplesEverywhere mod, you should have a file structure like this:

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

To uninstall a mod, just remove it from the Mods folder.

配置模組

Some mods have a config.json file in their mod folder. It might be created the first time you launch the game with that mod. This file lets you customise the mod settings.

To edit the config.json file, just open it in a text editor. Make sure the game isn't running when you edit it, or your changes might not take effect. See a basic guide to JSON; basically make sure your values are surrounded by quotes (like "value"). You can use this JSON validator to make sure the format is correct.

存檔

存檔在哪?

遊戲的存檔文件被放在這裡:

系統 路徑
Windows %appdata%\StardewValley\Saves
(Paste "%appdata%" into the address bar, Windows knows where it is.)
Linux ~/.config/StardewValley/Saves
(The folder is hidden by default. From Files, click Go » Enter Location and enter "~/.config".)
Mac ~/.config/StardewValley/Saves
(The folder is hidden by default. From Finder, click Go » Go to Folder and enter "~/.config".)

Each save has a folder like JonSnow_123456789, with two main files inside it: JonSnow_123456789 and SaveGameInfo. Both files are needed to load the save.

To share or backup your save, zip the entire JonSnow_123456789 folder.

回到上一次保存

If something went wrong, you can undo the last save.

  1. Find your save files.
    You should see two files with an _old suffix in the name; if not, ask for help instead!
  2. Delete SaveGameInfo and the file that looks like YourName_123456789.
  3. Remove the _old suffix from SaveGameInfo_old and the file that looks like YourName_123456789_old.

編輯存檔

You can edit your save to fix some common issues or change your choices (see walkthrough), but make sure to back up your save first. Be careful using save-editor tools, since they can break your save.

其他文件

SMAPI日誌

The SMAPI log has useful info for troubleshooting problems. It includes your game and SMAPI version, which mods you have, where the game is installed, any errors that occurred, and what happened.

Here's how to share it:

  1. Find the log file here:
    Platform Path
    Windows %appdata%\StardewValley\ErrorLogs\SMAPI-latest.txt
    (Paste "%appdata%" into the address bar, Windows knows where it is.)
    Linux ~/.config/StardewValley/ErrorLogs/SMAPI-latest.txt
    (The folder is hidden by default. From Files, click Go » Enter Location and enter "~/.config".)
    Mac ~/.config/StardewValley/ErrorLogs/SMAPI-latest.txt
    (The folder is hidden by default. From Finder, click Go » Go to Folder and enter "~/.config".)

    (If you see a MODDED_ProgramLog.Log_LATEST.txt file instead, you have an older version of SMAPI. Try updating to the latest version.)

  2. If you're sharing it...

遊戲文件夾

The "game folder" is the folder that contains the Stardew Valley.exe (Windows) or StardewValley.exe (Linux/Mac) file. Here's how to find it:

  1. Check the default location:
    Platform Path
    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. If your game wasn't there, try this:
    • If you have the GOG version:
      1. Open the GOG Galaxy client.
      2. In the game sidebar, right-click on Stardew Valley.
      3. Choose Manage Installation > Show Folder to open the game folder.
    • If you have the Steam version:
      1. Open the Steam client.
      2. Right-click on Stardew Valley.
      3. Click Properties.
      4. Click the Local Files tab.
      5. Click the Browse Local Files... button to open the game folder.

Troubleshooting

Fix common error messages

  • "Oops! SMAPI can't find the game."
    • Make sure you're running StardewModdingAPI.exe in your game folder (see the install instructions).
    • Did you install SMAPI manually (not using install.exe)? Make sure you copied the right files: internal/Windows for Windows, or internal/Mono for Linux/Mac.
  • "Oops! SMAPI doesn't seem to be compatible with your game."
    • Make sure you have Stardew Valley 1.2.30 or later.
  • "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 files disappear or your antivirus complains

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.

Check your versions

  1. Make sure you have the latest version of SMAPI.
    The SMAPI version is shown at the top of the SMAPI console window.
  2. Make sure you have Stardew Valley 1.2.30 or later.
    Click the "?" button on the title screen, and the version will appear in the bottom-left.

Reset your content files

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: External component has thrown an exception

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).

Other problems

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

Asking for help

Find help

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.

What to include in a bug report

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).