Difference between revisions of "Modding:Player Guide"

From Stardew Valley Wiki
Jump to navigation Jump to search
(move some content to 'getting started' page)
 
(15 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{/header}}
+
#REDIRECT [[Modding:Player Guide/Getting Started]]
 
 
Do you want to play Stardew Valley with mods? This page is for you!
 
 
 
==Intro==
 
===What are mods?===
 
A ''mod'' is just a package of files which changes Stardew Valley in some way. Mods can add features (like showing NPCs on the map), change game mechanics (like making fences decay more slowly), make cosmetic changes (like making your house look like a hobbit home), and more.
 
 
 
There are three types of mods:
 
* '''SMAPI mods''' use SMAPI (the Stardew Valley mod loader) to run code within the game. These mods are powerful and convenient. After installing SMAPI, you can install mods by dropping them into a folder and uninstall them by deleting their folder. You can use multiple SMAPI mods, and they'll rarely conflict.
 
* '''SMAPI content packs''' are loaded by a SMAPI mod. As a player, you can just install them the same way as SMAPI mods.
 
* '''XNB mods''' are discouraged and not documented here (see [[Modding:Using XNB mods|using XNB mods]]).
 
 
 
===What is SMAPI?===
 
[https://smapi.io/ SMAPI] is the mod loader for Stardew Valley — it launches the game with mod support and lets mods interact directly with the game code. It's safely installed alongside your normal game, and you can uninstall it anytime.
 
 
 
===Can I use mods on Linux, Mac, Windows, or consoles?===
 
Mod support for each platform:
 
{| class="wikitable"
 
|-
 
! Platform
 
! Mod support
 
|-
 
| Linux
 
| ✓ fully supported
 
|-
 
| Mac
 
| ✓ fully supported
 
|-
 
| Windows
 
| ✓ fully supported
 
|-
 
| Nintendo Switch
 
| ✖ no mod support
 
|-
 
| PS4
 
| ✖ no mod support
 
|-
 
| XBox One
 
| ✖ no mod support
 
|}
 
 
 
Almost all mods will work on any supported platform, since SMAPI rewrites them for compatibility.
 
 
 
===Can mods corrupt my save?===
 
Yes, but it's extremely rare. Only a few mods affect your save file at all (including GetDressed, Makeshift Multiplayer, and Save Anywhere). If you avoid those, mods are very unlikely to corrupt your save file. If you're worried, just back up [[#Save files|your save files]] occasionally. That's strongly recommended even if you don't use mods, since save corruption is almost always caused by the game itself.
 
 
 
In most cases, you can fix save corruption by [[Saves#Undo the last save|undoing the last save]].
 
 
 
===Can I stop using mods later?===
 
Yep. With a few exceptions (see previous question), mods don't directly affect your save file so you can stop using them anytime.
 
 
 
===Do mods disable Steam achievements?===
 
Steam achievements work fine, as long as you launch SMAPI through Steam. Make sure you follow the [[Modding:Installing SMAPI|install instructions]] to configure Steam on Windows (no Steam changes needed on Linux or Mac). If the Steam overlay works, the achievements should work too.
 
 
 
==Finding the game files==
 
===Save files===
 
See ''[[Saves]]''.
 
 
 
===Game folder===
 
See ''[[Modding:Player Guide/Getting Started#Find your game folder]]''.
 
 
 
===SMAPI log===
 
The SMAPI log has useful info for troubleshooting problems (like your versions, mods, game path, errors, etc).
 
 
 
Here's how to share it:
 
<ol>
 
<li>Find the log file here:
 
 
 
{| class="wikitable"
 
|-
 
! Platform
 
! Path
 
|-
 
| Windows
 
| <tt>%appdata%\StardewValley\ErrorLogs\SMAPI-latest.txt</tt><br /><small>(Paste "<tt>%appdata%</tt>" into the address bar, Windows knows where it is.)</small>
 
|-
 
| Linux
 
| <tt>~/.config/StardewValley/ErrorLogs/SMAPI-latest.txt</tt><br /><small>(The folder is hidden by default. From Files, click ''Go » Enter Location'' and enter "~/.config".)</small>
 
|-
 
| Mac
 
| <tt>~/.config/StardewValley/ErrorLogs/SMAPI-latest.txt</tt><br /><small>(The folder is hidden by default. From Finder, click ''Go » Go to Folder'' and enter "~/.config".)</small>
 
|}
 
</li>
 
 
 
<li>Upload the file to [https://log.smapi.io log.smapi.io] and share the link.</li>
 
</ol>
 
 
 
==Troubleshooting==
 
===Before you start===
 
Before trying to troubleshoot a specific issue:
 
 
 
# Make sure you have the [https://smapi.io/ latest version of SMAPI].<br /><small>The SMAPI version is shown at the top of the SMAPI console window.</small>
 
# Make sure you have Stardew Valley 1.2.30 or later (1.2.33 recommended).<br /><small>Click the "?" button on the title screen, and the version will appear in the bottom-left.</small>
 
 
 
===Fix common error messages===
 
; "''Oops! SMAPI can't find the game.''"
 
:
 
:* Make sure you're running <tt>StardewModdingAPI.exe</tt> in your game folder (see the [[Modding:Installing SMAPI|install instructions]]).
 
:* 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.
 
 
 
; "''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 <tt>manifest.json</tt> file for the mod in that folder. That usually means it's not a SMAPI mod, so it won't work from the <tt>Mods</tt> folder. See that mod's documentation for install instructions.
 
 
 
; "''InvalidOperationException: This resource could not be created''"
 
: This usually means you have no speakers or headphones plugged in, which the game can't handle. Make sure you plug in an audio device (but it can be muted).
 
 
 
; "''SEHException: External component has thrown an exception''"
 
: The game crashed while preparing its audio, usually because it ran out of available memory. This isn't caused by SMAPI directly, though SMAPI uses a bit more memory. Common solutions:
 
:* Make sure your audio is plugged in (e.g. speakers or headphones).
 
:* 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).
 
:* '''(experimental)''' If you have 64-bit Windows with at least 3GB of RAM, use the [https://www.techpowerup.com/forums/threads/large-address-aware.112556/ Large Address Aware] tool on <tt>Stardew Valley.exe</tt>.
 
 
 
===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. Antiviruses learn to allow SMAPI after enough users download it, but this resets for each release. SMAPI doesn't have a trojan — you can check by [https://github.com/Pathoschild/SMAPI reading the code], [https://www.jetbrains.com/decompiler/ decompiling the download], or [https://www.virustotal.com/ uploading it to VirusTotal].
 
 
 
If this happens, here's how to fix it:
 
 
 
# Temporarily disable your antivirus.
 
# [[Modding:Installing SMAPI|Install SMAPI]].
 
# Add an exception to your antivirus for the [[#Game folder|Stardew Valley folder]] (search online for your antivirus name with the words ''add folder exception'' for instructions).
 
 
 
===Reset your content files===
 
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.
 
 
 
; Option 1&#58; reset all files (recommended)
 
 
 
:# See instructions [https://support.steampowered.com/kb_article.php?ref=2037-QEUH-3335 for Steam] or [https://support.gog.com/hc/en-us/articles/212807405 for GOG Galaxy]. Any XNB mods will be removed, but SMAPI mods won't be affected.
 
:# If you use SMAPI on Linux/Mac, reinstall SMAPI to fix the launcher.
 
 
 
; Option 2&#58; create retroactive backup to reset any file
 
: If you installed XNB mods and want to reset one file you know is broken, you can just restore the original file. If you forgot to back it up, here's how to recover the original files without losing your modded ones:
 
:# Copy your game's <tt>Content</tt> folder to <tt>Content-modded</tt>.
 
:# Reset your game files (see instructions [https://support.steampowered.com/kb_article.php?ref=2037-QEUH-3335 for Steam] or [https://support.gog.com/hc/en-us/articles/212807405 for GOG Galaxy]).
 
:# Copy your (now reset) <tt>Content</tt> folder to <tt>Content-backup</tt>.
 
:# Move <tt>Content-modded</tt> back to <tt>Content</tt>.
 
: Now your content files are still modded, but you have a backup of the original files.
 
 
 
; Option 3&#58; troubleshoot XNB mods
 
: If you installed XNB mods, you're not sure which caused the problem, and you don't want to remove all your XNB mods, here's how to figure out which one is causing the problem.
 
:# Back up any XNB mods you want to keep.
 
:# Reset your game files (see instructions [https://support.steampowered.com/kb_article.php?ref=2037-QEUH-3335 for Steam] or [https://support.gog.com/hc/en-us/articles/212807405 for GOG Galaxy]). Any XNB mods will be removed, but SMAPI mods won't be affected.
 
:# If you use SMAPI on Linux/Mac, reinstall SMAPI to fix the launcher.
 
:# Launch the game to see if the problem is fixed.
 
:# Reinstall your XNB mods one at a time. After each install, test the game to make sure the mod doesn't cause problems.
 
 
 
===Controller misbehaves (Steam only)===
 
Steam handles controller support when you play the game through Steam. Unfortunately Steam can get confused when SMAPI is installed, since there are two game windows. If you're affected, the most common fix is to use [https://inputmapper.com/ InputMapper] (Windows) or SC Controller (Linux) to bypass Steam's controller features.
 
 
 
===Other problems===
 
Run the game without SMAPI by launching <tt>Stardew Valley.exe</tt> (on Windows) or <tt>StardewValley-original</tt> (on Linux/Mac) in your [[#Game folder|game folder]].
 
 
 
* If it still happens '''without''' SMAPI: see [https://steamcommunity.com/app/413150/discussions/0/142261352650065356/ this guide to fixing your game]. If you still need help, see [[#Asking for help|asking for help]].
 
* If it only happens '''with''' SMAPI: see [[#Asking for help|asking for help]].
 
 
 
==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:
 
 
 
# the discussion thread linked to on the mod page (if any);
 
# the 'bugs' section on the Nexus mod page (if any);
 
# 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, [http://community.playstarbound.com/threads/dos-and-donts-of-reporting-issues-with-smapi-mods.125211/ post in this thread] or [[Modding:Community|ask the community]].
 
 
 
===What to include in a bug report===
 
<span id="bug-report"></span>
 
 
 
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.
 
 
 
# 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.
 
# Describe your context:
 
#* Do you use a mod manager? If so, which one?
 
#* Do you play on Linux, Mac, or Windows?
 
# Cause the problem again (so any details are in the log), then attach a copy of the latest log file (see next section).
 
 
 
[[zh:使用模组:玩家常见问题]]
 

Latest revision as of 23:17, 25 August 2018