模组:使用指南/入門

出自Stardew Valley Wiki
於 2017年9月18日 (一) 19:32 由 Licer對話 | 貢獻 所做的修訂 →‎故障排除
跳至導覽 跳至搜尋

目錄

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