Skip to content
Alchyr edited this page Mar 20, 2026 · 16 revisions
  1. Install C# IDE. Rider or Visual Studio are common options. Rider is recommended, as Godot requires a .sln file and Visual Studio is moving away from those, making it more difficult to generate a project that uses one, and so this tutorial will primarily explain in the context of Rider. You can find Rider here.

  2. Download Dependencies

  1. Install template from NuGet with dotnet new install Alchyr.Sts2.Templates, or download this project from Github. If you download the project, add it as a template in Rider by starting from step 7 here.

  2. Create new solution using one of the included templates.

image

The project name should not contain any spaces. The format must be .sln. Enable Put solution and project in same directory. Expand "Advanced Settings" (in Rider) to adjust author and some other options.

  1. Update the filepaths at the top of the project (.csproj) file. Select the project
image

and press F4 to open it in Rider.

There are sections in the project file for each operating system. The lines you will need to edit are the ones labeled GodotPath and SteamLibraryPath. After adjusting them, press the Build button (Hammer on the top bar, or through Build menu on bottom left).

image

This will give you an error if you have set the file paths up incorrectly. Adjust them as necessary. If using the character template and you get an error related to localization, you have set the file paths up correctly.

  1. You can change the mod's display name in the mod's manifest .json. The file will have the same name as the project. Do not modify the id; this determines the names of the files the game will attempt to load. The other values can be modified for the mod you are making. (TODO - Manifest json documentation)

  2. If you are using the character template, you will need to generate the localization for the character. Open the character class in YourModCode/Character/YourMod.cs. It should have two errors like this; one for "character" localization and one for "ancient" localization.

image

For each one, push alt+enter and choose "Generate localization", then move the generated text to the appropriate file (localization/eng/characters.json and localization/eng/ancients.json).

image

Localization can be generated similarly for cards, relics, ancients, and other content. You can find the full list of supported types here.

Publish/Build:

Right click the project and choose "Publish". In Rider, choose Local folder. Publish options can be left as default. This project is set up for Publish to compile your code and the Godot .pck to the Slay the Spire 2 mods folder which is where they need to be for the game to detect them.

Usually you can just Build rather than Publish. This will only generate your code .dll and copy it over to the mods folder, but not the .pck, which is much faster. You will need to Publish when modifying any resource files.

Notes:

Issue with publishing may occur if dotnet on system is not setup properly; can be worked around with DOTNET_ROOT=~/.dotnet (valid path to wherever dotnet is) at start of GodotPublish command.

If you are not using any BaseLib classes, you can simply remove the package reference from the csproj file.

You can find a WIP character mod using BaseLib here

Clone this wiki locally