Difference between revisions of "Modding:Installing SMAPI on Windows"

From Stardew Valley Wiki
Jump to navigation Jump to search
(Added brief explanation of why a batch script is used for GOG Galaxy)
(split Steam/GOG instructions into a separate "Launch SMAPI through Steam or GOG Galaxy" section, tweaks)
Line 11: Line 11:
 
===Option A: use SMAPI's installer===
 
===Option A: use SMAPI's installer===
 
: ''See also [https://www.youtube.com/watch?v=9ULXeC9CL0c unofficial video guide].''
 
: ''See also [https://www.youtube.com/watch?v=9ULXeC9CL0c unofficial video guide].''
 
; Part 1: install SMAPI
 
  
 
:# Run the game without SMAPI at least once (so it can do first-time setup).
 
:# Run the game without SMAPI at least once (so it can do first-time setup).
Line 18: Line 16:
 
:# Extract the <tt>.zip</tt> file somewhere (but not in your game folder! (nor the windows %TEMP% folder)).
 
:# Extract the <tt>.zip</tt> file somewhere (but not in your game folder! (nor the windows %TEMP% folder)).
 
:# Double-click <tt>install on Windows.bat</tt>¹, and follow the on-screen instructions.<br />''The installer will detect your game and add SMAPI for you.''<br />Note: if you get the error <code>"Where is your game folder? Oops, couldn't find the game automatically. Type the file path to the game directory (the one containing 'Stardew Valley.exe'), then press enter."</code>, you can go to [[Modding:Player Guide/Getting Started#Find your game folder|this page]] to find your game folder.
 
:# Double-click <tt>install on Windows.bat</tt>¹, and follow the on-screen instructions.<br />''The installer will detect your game and add SMAPI for you.''<br />Note: if you get the error <code>"Where is your game folder? Oops, couldn't find the game automatically. Type the file path to the game directory (the one containing 'Stardew Valley.exe'), then press enter."</code>, you can go to [[Modding:Player Guide/Getting Started#Find your game folder|this page]] to find your game folder.
:# If you use Steam, continue to the next section. If you use GOG Galaxy, skip to Part 3. Otherwise just run <tt>StardewModdingAPI.exe</tt> in [[Modding:Player Guide/Getting Started#Find your game folder|your game folder]] to play with mods.
+
:# See [[#Launch SMAPI through Steam or GOG Galaxy|Launch SMAPI through Steam or GOG Galaxy]] for the final steps.
 
 
; Part 2&#58; configure Steam
 
 
 
: You can use SMAPI through the Steam client to enable the overlay and achievements. This requires a few more steps.
 
:# Keep SMAPI's installer window open.<br /><small>(If you already closed it, just run it again. No need to uninstall first.)</small>
 
:# Copy the text '''in the installer window''' that looks like this ([https://community.playstarbound.com/threads/smapi-stardew-modding-api.108375/page-139#post-3292321 see how to copy text]):<br />[[File:Modding - installing SMAPI on Windows - installer Steam text.png]]<br />'''Make sure you copy the entire line, including both quotation marks <code>"</code> and the <code>%command%</code> part.''' <br /><small>Your final path should look something like this: <code>"Your path here" %command%</code></small>
 
:# In the Steam client, right-click on ''Stardew Valley'' and choose ''Properties'':<br />[[File:Modding - installing SMAPI on Windows - Steam 1.png]]
 
:# Click ''General > Set Launch Options'':<br />[[File:Modding - installing SMAPI on Windows - Steam 2.png]]
 
:# Replace anything in the textbox with the text you copied from the installer.<br /><small>To paste text, click in the box and press {{key|CTRL}} and {{key|V}}.</small>
 
:# Click OK to save your changes.
 
:# From now on, just launch the game through Steam to run SMAPI with the Steam overlay and achievements.
 
 
 
; Part 3&#58; configure GOG Galaxy
 
 
 
: You can use SMAPI through the GOG Galaxy client to track your play time. The steps below tell GOG Galaxy to launch a batch script, which in turn launches StardewModdingAPI.exe. This is because telling GOG Galaxy to launch StardewModdingAPI.exe directly causes the SMAPI console to be invisible, which can hide important errors and warning messages.
 
:# Open Notepad and paste in the following: <code>start "" "C:\Program Files (x86)\GOG Galaxy\Games\Stardew Valley\StardewModdingAPI.exe"</code> If Stardew Valley and SMAPI are not installed at <code>C:\Program Files (x86)\GOG Galaxy\Games\Stardew Valley\</code>, (the default location for most people), replace that location with the location of where you installed Stardew Valley.
 
:# Click on File, then Save As... <br />[[File:Save_batch_script.png|800px]]
 
:# Navigate to your Stardew Valley installation folder and change the file type from Text Documents to All Files as shown below and then click Save. <br />[[File:Choose_batch_extension.png|800px]]
 
:# Then type <code>start.bat</code> for the file name as shown below <br />[[File:Name_batch_script.png|800px]]
 
:# In the GOG Galaxy client, click on Stardew Valle' and then the settings icon on the right-hand side of the 'Play' button, then hover over 'Manage installation' and click 'Configure...' as shown below. <br /> [[File:Gog_galaxy_configure.png|800px]]
 
:# A new menu will appear. Check the "Custom executables / arguments" box. <br />[[File:Gog_galaxy_custom_launch.png|400px]]
 
:# Then click 'Add another executable / arguments' <br /> [[File:Gog_galaxy_add_exectuable.png|400px]]
 
:# Select start.bat in the window that appears and then click Open. <br />[[File:Select_batch_file.png|800px]]
 
:# Finally, click the circle next to 'Default Executable' underneath File 2, then click OK. <br />[[File:Gog_galaxy_select_default_executable.png|400px]]
 
:# From now on, you can launch Stardew Valley through GOG Galaxy and both the SMAPI console and game will load as expected!
 
  
 
<small>¹ To install manually instead, see instructions in the installer's readme.</small>
 
<small>¹ To install manually instead, see instructions in the installer's readme.</small>
Line 56: Line 29:
 
===Option C: use Vortex===
 
===Option C: use Vortex===
 
Vortex is a mod manager by Nexus Mods. It can install SMAPI, keep it updated, and simplify installing/updating mods.
 
Vortex is a mod manager by Nexus Mods. It can install SMAPI, keep it updated, and simplify installing/updating mods.
 
; Part 1&#58; install SMAPI
 
  
 
:# Log into a [https://www.nexusmods.com Nexus Mods] account.
 
:# Log into a [https://www.nexusmods.com Nexus Mods] account.
Line 65: Line 36:
 
:# Click the notification bell in the upper-right hand corner, which will prompt you to download and install SMAPI.
 
:# Click the notification bell in the upper-right hand corner, which will prompt you to download and install SMAPI.
 
:# After SMAPI is installed in Vortex, click ''enable'' and you're done!
 
:# After SMAPI is installed in Vortex, click ''enable'' and you're done!
 
+
:# See [[#Launch SMAPI through Steam or GOG Galaxy|Launch SMAPI through Steam or GOG Galaxy]] for the final steps.
; Part 2&#58; configure Steam or GOG Galaxy
 
: See ''Part 2: configure Steam'' or ''Part 3: configure GOG Galaxy'' under [[#Option A: use SMAPI's installer|''Option A: use SMAPI's installer'']].
 
  
 
==Update SMAPI==
 
==Update SMAPI==
Line 85: Line 54:
  
 
==Uninstall==
 
==Uninstall==
# Run <tt>install.exe</tt> and choose ''uninstall''.
+
# [[#Install|Run the installer]] again, but choose ''uninstall''.
 
# Blank the Steam launch options (if you changed them).
 
# Blank the Steam launch options (if you changed them).
  
(If you want to play without mods temporarily, you can just launch <tt>Stardew Valley.exe</tt> directly instead.)
+
(If you want to play without mods temporarily, you can just launch <tt>Stardew Valley.exe</tt> directly or rename your <tt>Mods</tt> folder instead.)
 +
 
 +
==Launch SMAPI through Steam or GOG Galaxy==
 +
If you use Steam or GOG Galaxy, and want them to track your achievements and game time, you can configure them to launch SMAPI.
 +
 
 +
If you don't care about achievements or tracking game time, you can just launch <tt>StardewModdingAPI.exe</tt> in [[Modding:Player Guide/Getting Started#Find your game folder|your game folder]] to play with mods.
 +
 
 +
===Steam===
 +
You can launch SMAPI through the Steam client to enable the overlay and achievements.
 +
 
 +
# Keep SMAPI's installer window open.<br /><small>(If you already closed it, just run it again. No need to uninstall first.)</small>
 +
# Copy the text '''in the installer window''' that looks like this ([https://community.playstarbound.com/threads/smapi-stardew-modding-api.108375/page-139#post-3292321 see how to copy text]):<br />[[File:Modding - installing SMAPI on Windows - installer Steam text.png]]<br />'''Make sure you copy the entire line, including both quotation marks <code>"</code> and the <code>%command%</code> part.''' <br /><small>Your final path should look something like this: <code>"Your path here" %command%</code></small>
 +
# In the Steam client, right-click on ''Stardew Valley'' and choose ''Properties'':<br />[[File:Modding - installing SMAPI on Windows - Steam 1.png]]
 +
# Click ''General > Set Launch Options'':<br />[[File:Modding - installing SMAPI on Windows - Steam 2.png]]
 +
# Replace anything in the textbox with the text you copied from the installer.<br /><small>To paste text, click in the box and press {{key|CTRL}} and {{key|V}}.</small>
 +
# Click OK to save your changes.
 +
# From now on, just launch the game through Steam to run SMAPI with the Steam overlay and achievements.
 +
 
 +
===GOG Galaxy===
 +
You can use SMAPI through the GOG Galaxy client to track your play time. The steps below tell GOG Galaxy to launch a batch script, which in turn launches StardewModdingAPI.exe. This is because telling GOG Galaxy to launch StardewModdingAPI.exe directly causes the SMAPI console to be invisible, which can hide important errors and warning messages.
 +
 
 +
# Open Notepad and paste in the following: <code>start "" "C:\Program Files (x86)\GOG Galaxy\Games\Stardew Valley\StardewModdingAPI.exe"</code> If Stardew Valley and SMAPI are not installed at <code>C:\Program Files (x86)\GOG Galaxy\Games\Stardew Valley\</code>, (the default location for most people), replace that location with the location of where you installed Stardew Valley.
 +
# Click on File, then Save As... <br />[[File:Save_batch_script.png|800px]]
 +
# Navigate to your Stardew Valley installation folder and change the file type from Text Documents to All Files as shown below and then click Save. <br />[[File:Choose_batch_extension.png|800px]]
 +
# Then type <code>start.bat</code> for the file name as shown below <br />[[File:Name_batch_script.png|800px]]
 +
# In the GOG Galaxy client, click on Stardew Valle' and then the settings icon on the right-hand side of the 'Play' button, then hover over 'Manage installation' and click 'Configure...' as shown below. <br /> [[File:Gog_galaxy_configure.png|800px]]
 +
# A new menu will appear. Check the "Custom executables / arguments" box. <br />[[File:Gog_galaxy_custom_launch.png|400px]]
 +
# Then click 'Add another executable / arguments' <br /> [[File:Gog_galaxy_add_exectuable.png|400px]]
 +
# Select start.bat in the window that appears and then click Open. <br />[[File:Select_batch_file.png|800px]]
 +
# Finally, click the circle next to 'Default Executable' underneath File 2, then click OK. <br />[[File:Gog_galaxy_select_default_executable.png|400px]]
 +
# From now on, you can launch Stardew Valley through GOG Galaxy and both the SMAPI console and game will load as expected!
  
 
{{Modding guide footer
 
{{Modding guide footer

Revision as of 19:10, 23 December 2020

Modding:Player Guide/header

This page explains how to install SMAPI (the tool which lets you use mods) on Windows. See also:

Install

Option A: use SMAPI's installer

See also unofficial video guide.
  1. Run the game without SMAPI at least once (so it can do first-time setup).
  2. Download the latest version of SMAPI.
  3. Extract the .zip file somewhere (but not in your game folder! (nor the windows %TEMP% folder)).
  4. Double-click install on Windows.bat¹, and follow the on-screen instructions.
    The installer will detect your game and add SMAPI for you.
    Note: if you get the error "Where is your game folder? Oops, couldn't find the game automatically. Type the file path to the game directory (the one containing 'Stardew Valley.exe'), then press enter.", you can go to this page to find your game folder.
  5. See Launch SMAPI through Steam or GOG Galaxy for the final steps.

¹ To install manually instead, see instructions in the installer's readme.

Option B: use ModDrop

ModDrop is a mod manager which supports SMAPI. It can install SMAPI, keep it updated, and simplify installing/updating mods.

  1. Install ModDrop and open the client.
  2. In the top-right corner, click Install SMAPI or Update Available.
  3. A window should appear that says something like "A new version of SMAPI is available." Click the Install button and follow the on-screen instructions.

Option C: use Vortex

Vortex is a mod manager by Nexus Mods. It can install SMAPI, keep it updated, and simplify installing/updating mods.

  1. Log into a Nexus Mods account.
  2. Install and launch Vortex.
  3. Click the Log In or Register button in the upper-middle part of the Vortex main screen. A web browser should open asking whether to authorize Vortex to sync with your Nexus Mods account. That enables the Mod Manager Download buttons on Nexus mod pages. Accept the authorization.
  4. Set up Stardew Valley in Vortex by clicking the left-hand games tab, finding Stardew Valley, and clicking it. You may wish to set up the download folder locations as well in the left-hand Settings tab.
  5. Click the notification bell in the upper-right hand corner, which will prompt you to download and install SMAPI.
  6. After SMAPI is installed in Vortex, click enable and you're done!
  7. See Launch SMAPI through Steam or GOG Galaxy for the final steps.

Update SMAPI

Option A: use SMAPI's installer

Just install the new version; the installer will automatically clean up previous versions. (You don't need to configure Steam again.)

Option B: use ModDrop

If you use the ModDrop mod manager:

  1. Click Update Available in the top-right if it appears.
  2. Follow the on-screen instructions.

Option C: use Vortex

If you use the Vortex mod manager:

  1. Go to SMAPI's mod page and download it using the Mod Manager Download button.
  2. Click Open Vortex when the popup appears.
  3. Click the Vortex window, and the notification bell will appear with a notification in the upper right. Click install and then enable.

Uninstall

  1. Run the installer again, but choose uninstall.
  2. Blank the Steam launch options (if you changed them).

(If you want to play without mods temporarily, you can just launch Stardew Valley.exe directly or rename your Mods folder instead.)

Launch SMAPI through Steam or GOG Galaxy

If you use Steam or GOG Galaxy, and want them to track your achievements and game time, you can configure them to launch SMAPI.

If you don't care about achievements or tracking game time, you can just launch StardewModdingAPI.exe in your game folder to play with mods.

Steam

You can launch SMAPI through the Steam client to enable the overlay and achievements.

  1. Keep SMAPI's installer window open.
    (If you already closed it, just run it again. No need to uninstall first.)
  2. Copy the text in the installer window that looks like this (see how to copy text):
    Modding - installing SMAPI on Windows - installer Steam text.png
    Make sure you copy the entire line, including both quotation marks " and the %command% part.
    Your final path should look something like this: "Your path here" %command%
  3. In the Steam client, right-click on Stardew Valley and choose Properties:
    Modding - installing SMAPI on Windows - Steam 1.png
  4. Click General > Set Launch Options:
    Modding - installing SMAPI on Windows - Steam 2.png
  5. Replace anything in the textbox with the text you copied from the installer.
    To paste text, click in the box and press CTRL and V.
  6. Click OK to save your changes.
  7. From now on, just launch the game through Steam to run SMAPI with the Steam overlay and achievements.

GOG Galaxy

You can use SMAPI through the GOG Galaxy client to track your play time. The steps below tell GOG Galaxy to launch a batch script, which in turn launches StardewModdingAPI.exe. This is because telling GOG Galaxy to launch StardewModdingAPI.exe directly causes the SMAPI console to be invisible, which can hide important errors and warning messages.

  1. Open Notepad and paste in the following: start "" "C:\Program Files (x86)\GOG Galaxy\Games\Stardew Valley\StardewModdingAPI.exe" If Stardew Valley and SMAPI are not installed at C:\Program Files (x86)\GOG Galaxy\Games\Stardew Valley\, (the default location for most people), replace that location with the location of where you installed Stardew Valley.
  2. Click on File, then Save As...
    Save batch script.png
  3. Navigate to your Stardew Valley installation folder and change the file type from Text Documents to All Files as shown below and then click Save.
    Choose batch extension.png
  4. Then type start.bat for the file name as shown below
    Name batch script.png
  5. In the GOG Galaxy client, click on Stardew Valle' and then the settings icon on the right-hand side of the 'Play' button, then hover over 'Manage installation' and click 'Configure...' as shown below.
    Gog galaxy configure.png
  6. A new menu will appear. Check the "Custom executables / arguments" box.
    Gog galaxy custom launch.png
  7. Then click 'Add another executable / arguments'
    Gog galaxy add exectuable.png
  8. Select start.bat in the window that appears and then click Open.
    Select batch file.png
  9. Finally, click the circle next to 'Default Executable' underneath File 2, then click OK.
    Gog galaxy select default executable.png
  10. From now on, you can launch Stardew Valley through GOG Galaxy and both the SMAPI console and game will load as expected!