ExampleMod is a commented, feature-based starter project for Slay the Spire 2 modding.
It includes:
- Linux/WSL build/install scripts (
bash) - conda environment file (
environment.yml) - an included decompile reference folder (curated subset)
- 5 tutorial examples behind main-menu toggles
Install these first:
- Slay the Spire 2 installed via Steam.
- WSL2 (Ubuntu) if you are working from Windows.
- Git.
- Miniconda (recommended).
- Godot 4.5.1 CLI (optional if you use
./scripts/bash/setup_godot_cli.sh).
Official guides:
- WSL install: Microsoft WSL install guide
- Git install: Git install guide
- Miniconda install: Miniconda install guide
- .NET 9 SDK (only if not using conda-managed dotnet): .NET on Linux
- Godot 4.5.1 release downloads (only if not using setup godot script): Godot 4.5.1
Notes:
- This repo’s conda environment installs Python + dotnet for you.
./scripts/bash/setup_godot_cli.shdownloads a local Godot CLI binary into.tools/.- You must set
STS2_INSTALL_DIRin a local.envfile (see below).
All gameplay examples are disabled by default and controlled from a main-menu button (Example Mod).
- Add a
Gamblebutton to the top bar (with wager selection) - Change
Burning Bloodto heal 10 after combat (instead of 6) - Force Ironclad
Strikebase damage to 10 - Give Ironclad +1 Strength at the start of each combat
- Add a main-menu UI for toggling all features on/off
You can clone this repository anywhere.
Example:
mkdir -p ~/dev/sts2
cd ~/dev/sts2
git clone https://github.com/customjack/sts2_ExampleMod ExampleMod
cd ExampleModYou must create a local .env from .env.example before running scripts.
Do this once:
cp .env.example .envThen edit .env and set:
STS2_INSTALL_DIR='C:\Program Files (x86)\Steam\steamapps\common\Slay the Spire 2'Notes:
.envis local-only and gitignored by default.- You can use either a Windows path (
C:\...) or a WSL path (/mnt/c/...). - Bash scripts in
scripts/bash/load.envautomatically.
cd /path/to/ExampleMod
cp .env.example .env # once, then edit STS2_INSTALL_DIR
./scripts/bash/setup_env.sh
source ./scripts/bash/activate_env.shUse the guides in the Prerequisites section, then ensure tools are on PATH.
./scripts/bash/build_and_stage.sh
./scripts/bash/setup_godot_cli.sh
./scripts/bash/make_pck.sh
./scripts/bash/install_to_game.shInstalled mod output goes to:
${STS2_INSTALL_DIR}/mods/ExampleMod/ExampleMod.dll${STS2_INSTALL_DIR}/mods/ExampleMod/ExampleMod.pck
- Launch STS2 with mods enabled.
- In main menu, click
Example Mod. - Toggle feature checkboxes.
- Start a run (or next combat) to observe enabled examples.
Notes:
- Toggles are persisted to
user://example_mod_settings.json. - Existing in-run objects may keep old values until the next relevant rebuild/combat.
decompile/ includes a curated subset of decompiled game files needed by these examples.
To refresh from your local full decompile dump:
./scripts/bash/sync_decompile_subset.shEdit mod_manifest.json to change how your mod appears:
{
"pck_name": "ExampleMod",
"name": "ExampleMod",
"author": "local-dev",
"description": "Tutorial mod with toggleable gameplay examples.",
"version": "0.1.0"
}Notes:
pck_nameshould match your mod package/base name (and usually your DLL/PCK names).name,author,description, andversionare display metadata.
Preview image:
- Use
mod_image.pngat the project root. - This repo already includes a working
mod_image.pngpreview image. - Replace it with your own PNG to change the mod card image.
After changing manifest or image, rebuild the PCK:
./scripts/bash/make_pck.sh
./scripts/bash/install_to_game.shRun the included web log viewer:
cd ./scripts/tools/log_viewer
./run.shThen open:
http://127.0.0.1:8765
Default log path:
- auto-detected from
/mnt/c/Users/*/AppData/Roaming/SlayTheSpire2/logs/godot.log
You can override with:
LOG_VIEWER_LOG_PATH="/mnt/c/Users/<you>/AppData/Roaming/SlayTheSpire2/logs/godot.log" ./run.shRemote debug launch option:
--remote-debug tcp://127.0.0.1:6007
Then connect from Godot editor Output/Remote inspector.