STS2.RitsuLib.Compat.0.104.0 0.2.30

dotnet add package STS2.RitsuLib.Compat.0.104.0 --version 0.2.30
                    
NuGet\Install-Package STS2.RitsuLib.Compat.0.104.0 -Version 0.2.30
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="STS2.RitsuLib.Compat.0.104.0" Version="0.2.30" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="STS2.RitsuLib.Compat.0.104.0" Version="0.2.30" />
                    
Directory.Packages.props
<PackageReference Include="STS2.RitsuLib.Compat.0.104.0" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add STS2.RitsuLib.Compat.0.104.0 --version 0.2.30
                    
#r "nuget: STS2.RitsuLib.Compat.0.104.0, 0.2.30"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package STS2.RitsuLib.Compat.0.104.0@0.2.30
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=STS2.RitsuLib.Compat.0.104.0&version=0.2.30
                    
Install as a Cake Addin
#tool nuget:?package=STS2.RitsuLib.Compat.0.104.0&version=0.2.30
                    
Install as a Cake Tool

STS2-RitsuLib

Shared framework library for Slay the Spire 2 mods.

Chinese README: README.zh.md

RitsuLib gives mod authors a stable set of APIs for content registration, model identity, lifecycle hooks, persistence, settings UI, localization, audio, UI extensions, and compatibility helpers. It is designed to sit beside the base game API and other libraries such as BaseLib.

Documentation site: https://sts2-ritsulib.ritsukage.com/

Install

Reference the NuGet package in your mod project:

<PackageReference Include="STS2.RitsuLib" />

Then declare the runtime dependency in mod_manifest.json. For game API 0.105.x and newer, use the object form:

{
  "dependencies": [
    { "id": "STS2-RitsuLib" }
  ]
}

For older game API branches, use the legacy string form because older manifest parsers may fail on dependency objects:

{
  "dependencies": [
    "STS2-RitsuLib"
  ]
}

If your project does not use central package management, let your package manager or IDE choose the current compatible package version instead of copying a pinned version from this README. Older game API branches use the matching STS2.RitsuLib.Compat.<api-version> package.

Runtime Package Choices

For normal mod development, reference one NuGet package from your project:

  • STS2.RitsuLib for the current supported game API branch.
  • STS2.RitsuLib.Compat.<api-version> when your mod intentionally targets an older Slay the Spire 2 API branch.

For players, GitHub releases may also provide STS2-RitsuLib.<version>.variant-pack.zip. Use this asset, not the per-compat *.github.zip files, when you want one installed mods/STS2-RitsuLib/ folder that chooses the matching RitsuLib build for the running game. The root STS2-RitsuLib.dll is a loader, and the real API-specific builds live under lib/<api-version>/.

Downstream mods still declare the runtime dependency by mod id. Match the manifest format to the game API branch you target.

For 0.105.x and newer:

{
  "dependencies": [
    { "id": "STS2-RitsuLib" }
  ]
}

For older branches:

{
  "dependencies": [
    "STS2-RitsuLib"
  ]
}

The variant pack does not change your compile-time NuGet reference. It only changes how the runtime RitsuLib mod is installed for users who need one folder to support multiple game API branches.

Main Entry Points

  • RitsuLibFramework.CreateContentPack(modId) for content, keywords, timeline entries, card piles, and top-bar buttons.
  • RitsuLibFramework.CreatePatcher(modId, patcherName) for Harmony patches with RitsuLib diagnostics.
  • RitsuLibFramework.SubscribeLifecycle<TEvent>(...) for framework and game lifecycle events.
  • RitsuLibFramework.GetDataStore(modId) with BeginModDataRegistration(modId) for JSON-backed mod data.
  • RitsuLibFramework.RegisterModSettings(modId, configure) for player-editable settings pages.

Start with the getting-started guide, then use the topic pages for the specific feature you are adding.

Optional Analyzer

RitsuLib-style mods can also use the companion Roslyn analyzer: STS2-ModAnalyzers-RitsuLib (STS2.ModAnalyzers.RitsuLib).

License

MIT

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.30 53 5/11/2026
0.2.29 73 5/9/2026
0.2.28 72 5/8/2026
0.2.27 73 5/8/2026