Skip to content

Repository files navigation

sts2-mod-template

A bare-bones starting point for a Slay the Spire 2 mod. It uses C# and Godot, with BaseLib and Harmony. It builds one example card into the Colorless pool, so the whole pipeline works before you write any content: code, localization, design sheet, art, build, publish, lint, and release.

Start a new mod

git clone https://github.com/sethmcleod/sts2-mod-template MyMod
cd MyMod
scripts/init.sh MyMod "Your Name" "One line about the mod."

init.sh renames every ModTemplate token, regenerates the solution GUID, and removes itself. Then:

scripts/dev.sh doctor     # check the environment
scripts/dev.sh publish    # build the mod into the game

Start the game through Steam and spawn the example card from the dev console with its full model id, for example card MYMOD-EXAMPLE_STRIKE. When that works, replace the example card with your own content.

What is in the box

Path What it holds
ModTemplateCode/ all C#; MainFile.cs is the entry point, one card class per file
ModTemplate/ everything that ships in the .pck: images, localization/eng/*.json
cards.csv the plain-text design sheet, one row per card
scripts/dev.sh publish, lint, changelog, release, doctor
scripts/lint_sync.py offline check of the three-way rule

The mod name flows from the project filename and the ModId const in MainFile.cs; model ids derive from it (ExampleStrike in mod MyMod becomes MYMOD-EXAMPLE_STRIKE). BaseLib discovers model subclasses from the assembly, so there is no registration list to maintain.

The example card sits in the base game's Colorless pool. For a mod with its own playable character, replace the pool in Cards/ModTemplateCard.cs with a CustomCardPoolModel subclass and add a character model.

Document map

Doc What is in it
BUILD.md prerequisites, build and publish commands, asset rules
CONTRIBUTING.md the three-way update rule, code rules
RELEASING.md version policy, changelog workflow, how to cut a release

About

📦 Slay the Spire 2 Mod Template

Resources

Contributing

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages