The modding API for Stardew Valley.
Go to file
Jesse Plamondon-Willard 137d795ab3 fix package 2016-10-21 01:48:57 -04:00
assets add NuGet package spec + icon 2016-10-19 18:54:04 -04:00
build add GOG path on Linux 2016-10-21 01:25:21 -04:00
LICENSE.txt add license + readme 2016-10-19 14:46:23 -04:00
README.md bump to 1.0 2016-10-21 01:41:26 -04:00
package.nuspec fix package 2016-10-21 01:48:57 -04:00

README.md

Stardew.ModBuildConfig is an open-source NuGet package which automates the build configuration for crossplatform Stardew Valley mods that use SMAPI.

The configuration...

  1. detects the operating system (Linux, Mac, or Windows) and the Stardew Valley install path;
  2. injects the correct references to Stardew Valley, SMAPI, and XNA/MonoGame;
  3. (on Windows) configures Visual Studio so you can launch the game for debugging;
  4. and adds a GamePath variable which can be used to automate mod installation during testing if desired.

Installation

Creating a new mod

  1. Create an empty library project.
  2. Reference the Pathoschild.Stardew.ModBuildConfig NuGet package.
  3. Write your code.
  4. Compile on any platform.

Migrating an existing mod

  1. Remove any references to Microsoft.Xna.*, Stardew Valley, StardewModdingAPI, and xTile.
  2. Reference the Pathoschild.Stardew.ModBuildConfig NuGet package.
  3. Compile on any platform.

Configuration

Custom game path

If you customised where Stardew Valley is installed, you can add your path to the list to try.

  1. Get the full path to the directory containing the Stardew Valley executable.

  2. Add this section to your .csproj file (anywhere before the added <Import line):

    <PropertyGroup>
      <GamePath>C:\Program Files (x86)\GalaxyClient\Games\Stardew Valley</GamePath>
    </PropertyGroup>
    

Compatibility with mod builders

The configuration is designed for compatibility with third-party mod compilers. Silverplum is officially supported, and you can inject the GAMEPATH environment variable to override the detected game path.

See also