mirror of
https://github.com/Pathoschild/SMAPI.git
synced 2026-10-12 02:08:51 +00:00
f9c107b751476b799a87cf25f9ed2424ab1a4775
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
GamePathvariable 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.ModBuildConfigNuGet 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.ModBuildConfigNuGet 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
.csprojfile (anywhere before the added<Importline):<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
Languages
C#
92.2%
JavaScript
4%
HTML
2%
CSS
0.9%
PowerShell
0.5%
Other
0.4%