137d795ab3 | ||
---|---|---|
assets | ||
build | ||
LICENSE.txt | ||
README.md | ||
package.nuspec |
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...
- detects the operating system (Linux, Mac, or Windows) and the Stardew Valley install path;
- injects the correct references to Stardew Valley, SMAPI, and XNA/MonoGame;
- (on Windows) configures Visual Studio so you can launch the game for debugging;
- and adds a
GamePath
variable which can be used to automate mod installation during testing if desired.
Installation
Creating a new mod
- Create an empty library project.
- Reference the
Pathoschild.Stardew.ModBuildConfig
NuGet package. - Write your code.
- Compile on any platform.
Migrating an existing mod
- Remove any references to
Microsoft.Xna.*
, Stardew Valley,StardewModdingAPI
, and xTile. - Reference the
Pathoschild.Stardew.ModBuildConfig
NuGet package. - 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.
-
Get the full path to the directory containing the Stardew Valley executable.
-
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
- NuGet package
Discussion thread