Repository navigation
Setup
Familiarity with C# and object-oriented programming is strongly recommended. If you are new to C#, learn the language first, then return here.
These steps create a project based on RitsuLib using the Miooowo.Sts2.Templates package.
We recommend Rider. Other IDEs work if you are comfortable with C#.
Godot requires a classic .sln file, not .slnx.
- Install Slay the Spire 2 from Steam
- Download MegaDot (Mega Crit’s Godot build), or Godot .NET that matches MegaDot (4.5.1)
- Install .NET SDK 9+
- Install STS2-RitsuLib into the game
modsfolder:- Prefer a stable asset from STS2-RitsuLib releases (not the Development build), or
- Use Steam Workshop if RitsuLib is available there
Your mod’s NuGet reference (STS2.RitsuLib) is separate from the runtime mod folder install. You need both for a normal workflow.
dotnet new install Miooowo.Sts2.TemplatesIn Rider: create any placeholder solution first if you need a Terminal, then run the command there.
File → New Solution, then pick one of:
- Slay the Spire 2 Character — new character
- Slay the Spire 2 Content — cards / relics / potions / events, etc.
- Empty Slay the Spire 2 Mod — minimal shell
When creating:
- Enable Put solution and project in same directory
- Project name: no spaces
- Solution format:
.sln - Expand Advanced Settings for
--ModAuthorand other options
dotnet new miosts2charmod -n MyCharMod --ModAuthor "YourName" -o MyCharMod
# or: miosts2contentmod / miosts2modAlways prefer -o so files land in a dedicated folder.
The template does not ship this file. Create it next to your .csproj:
<Project>
<PropertyGroup>
<GodotPath>C:/path/to/MegaDot_mono_win64.exe</GodotPath>
<!-- If build cannot find game data, set Sts2Path explicitly -->
<!-- <Sts2Path>C:/Steam/steamapps/common/Slay the Spire 2</Sts2Path> -->
</PropertyGroup>
</Project>Do not quote the path. You can also use local.props for machine-local overrides (Sts2Path / Sts2DataDir).
Try Build. If you see something like:
Slay the Spire 2 data not found at path '...'
uncomment / set Sts2Path to your install directory.
For the Character template, a localization-related build error usually means the game path is fine but localization files are missing — the stock template should already include them.
You can change name, author, description, and version.
- Do not change
idafter you start distributing the mod (it drives load paths and localization IDs). - Keep the dependency entry
STS2-RitsuLib. -
min_game_versionis set for 0.110.1 in the current templates (matches beta-oriented RitsuLib).
Keys for model content should look like:
{MODID}_{CATEGORY}_{ORIGINAL_ID}.title / .description
Example: MY_CHAR_MOD_CARD_STRIKE.title
The Character template already seeds eng and zhs under {ModFolder}/localization/. You can Publish and launch without writing localization first.
Optional template parameter: StrictLocalizationValidation=true (or set MainFile.StrictLocalizationValidation).
Analyzers: package Miooowo.STS2RitsuLib.ModAnalyzers is referenced for localization / asset path checks in the IDE and build.
| Action | What it does | When |
|---|---|---|
| Build | Compiles .dll, copies .dll / .json into the game mods folder |
C# code-only changes |
| Publish | Build + Godot headless export of .pck
|
Localization, images, scenes, or first-time asset deploy |
In Rider: right-click the project → Publish → Local folder (defaults are fine).
Warning: Non-code changes will not appear in-game until you Publish and a
.pckis produced.
GodotPath must be valid for Publish.
Launch Slay the Spire 2 and enable your mod (and STS2-RitsuLib) in the mod list. For Character template, you should see the sample character after a successful Publish.
- Troubleshooting
- RitsuLib tutorials
- STS2-RitsuLib
- Alchyr wiki for decompiling, debugging, and other STS2 topics