Skip to content

MLT5419/StS2_DevelopSugar

Repository files navigation

StS2 DevelopSugar

StS2 DevelopSugar is a Slay the Spire 2 modding toolkit repository.

It contains:

  • Roslyn analyzers for StS2-oriented C# authoring rules
  • source generators used by StS2 mod projects
  • Roslyn code fixes for supported diagnostics
  • a Godot sample/template project
  • a console project creator that scaffolds new Godot-based mod projects

Projects

StS2_DevelopSugar.Analyzers

This project contains the Roslyn analyzer and source generator logic.

Use it when you want:

  • diagnostics while writing StS2 mod code
  • generated helper code for supported patterns
  • a shared compile-time toolchain for StS2 mod projects

StS2_DevelopSugar.CodeFixes

This project contains the Roslyn code fixes and is also the current NuGet packaging entry point for the analyzer toolchain.

In practice, this is the project that assembles the final package containing:

  • StS2_DevelopSugar.Analyzers.dll
  • StS2_DevelopSugar.CodeFixes.dll

StS2_DevelopSugar.Godot

This is the Godot-side sample project and template source.

It includes:

  • the Godot plugin used during StS2 mod development
  • template files for new projects
  • release-to-mods tooling
  • reference documentation under .readme/

StS2_DevelopSugar.ProjectCreator

This is the recommended entry point for creating a new project.

It is a console application that creates a Godot template project with the expected structure and metadata already filled in.

Current features include:

  • command-line creation mode
  • no-argument wizard mode
  • automatic Slay the Spire 2 installation discovery
  • localized prompts based on the OS UI language

Recommended Usage

If you want to start a new project, the recommended path is:

  1. Download the latest ProjectCreator build from the repository release page.
  2. Run the creator and generate a new Godot project from the template.
  3. Open the generated project in Godot and continue development there.

This is preferred over copying StS2_DevelopSugar.Godot manually, because the creator:

  • keeps template metadata consistent
  • writes project-specific names and identifiers for you
  • can resolve the local Slay the Spire 2 installation automatically
  • is the intended distribution path for the template project

Typical Scenarios

I want to create a new mod project

Use StS2_DevelopSugar.ProjectCreator.

If you run it without arguments, it starts an interactive wizard.

I want analyzers, source generators, and code fixes in my C# project

Use the NuGet package produced from StS2_DevelopSugar.CodeFixes.

That package is intended to carry the analyzer/generator/code-fix toolchain together.

I want to inspect or improve the template itself

Work in:

  • StS2_DevelopSugar.Godot
  • StS2_DevelopSugar.ProjectCreator/TemplateSource/GodotProject

The Godot project is the functional reference project, and the creator embeds the cleaned template source during build.

Building From Source

To build the Roslyn tooling:

dotnet build .\StS2_DevelopSugar.Analyzers\StS2_DevelopSugar.Analyzers.csproj
dotnet build .\StS2_DevelopSugar.CodeFixes\StS2_DevelopSugar.CodeFixes.csproj

To build the project creator:

dotnet build .\StS2_DevelopSugar.ProjectCreator\StS2_DevelopSugar.ProjectCreator.csproj

To pack the current analyzer/code-fix NuGet package:

dotnet pack .\StS2_DevelopSugar.CodeFixes\StS2_DevelopSugar.CodeFixes.csproj -c Release

Notes

  • .readme/ directories are intentionally tracked. They are part of the project and template documentation.
  • local.props, .godot, .dotnet, bin, obj, and similar generated files are intentionally excluded from version control.

About

The mod-making scaffolding for Slay the Spire 2

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors