A mod for Slay the Spire 2 that replaces the plain-colored freehand map drawing lines with animated color gradients.
- Built-in gradient presets
- Custom palette - define your own gradient using up to 10 hex color codes
- Live preview of the selected gradient in the mod settings UI
- Multiplayer support - each player's gradient preferences are synced across clients
- Random gradient - can be random each line drawn or the same pregenerated random gradient
- Slay the Spire 2 (Early Access)
- BaseLib mod installed
- Install BaseLib if you haven't already.
- Copy the
GradientLine/folder (containingGradientLine.dll,GradientLine.pck, andGradientLine.json) into your StS2 mods directory.
All settings are available in-game through the mod settings menu:
| Setting | Default | Description |
|---|---|---|
| Gradient Type | Rainbow | Choose from: Rainbow, Fire, Ocean, Monochrome, Christmas, Spring, Random, or Custom |
| Animate | On | Whether the gradient shifts/animates as you draw |
| Randomize Start Offset | On | Whether each line starts with a random position in the gradient |
| Animation Speed | 120 | Controls how fast the gradient shifts while drawing (range: 30–200, higher = faster) |
(Only visible when Gradient Type is set to "Custom")
| Setting | Default | Description |
|---|---|---|
| Custom Colors | (empty) | Up to 10 hex color codes, each prefixed with # (e.g. #FF0000#00FF00#0000FF) |
(Only visible when Gradient Type is set to "Random")
| Setting | Default | Description |
|---|---|---|
| Random Gradient Size | 5 | Number of color keyframes in the random gradient (range: 2–10) |
| Randomize Each Line | Off | Generate a new random gradient for every line drawn |
| Randomness | 1.0 | Controls color smoothness (range: 0.1–1.0). Lower values = smoother transitions between colors, higher values = more chaotic/vibrant |
| Reroll Random | (button) | Generate a new random gradient immediately |
A live gradient preview strip updates in real time as you change settings.
- .NET 9 SDK
- Godot 4.5.1 (the version bundled with StS2 / "Megadot") - needed only for exporting the
.pck - Slay the Spire 2 installed via Steam
The project auto-detects the Steam library location on Windows, Linux, and macOS. If it can't find the game, the build will error with a helpful message.
dotnet buildThis compiles the mod and copies GradientLine.dll, GradientLine.json, and required BaseLib files directly into the StS2 mods directory.
dotnet publishThis additionally exports the Godot .pck asset bundle using Godot in headless mode.
Adding a new built-in preset requires changes to two files:
1. Add the preset to GradientType enum in GradientUtil.cs
public enum GradientType : ushort
{
Rainbow,
Fire,
// ...
YourPreset, // add here (before Custom)
Random,
Custom
}2. Define color keyframes in GradientsPresets.cs
Making the last color identical to the first is recommended because a mismatch between the end and start colors creates a visible hard
Add a case to the switch expression:
public static Gradient BuildGradient(float hueOffset)
{
return Config.GradientType switch
{
// ...
GradientType.Christmas => GradientsPresets.ChristmasColors,
GradientType.Spring => GradientsPresets.SpringColors,
GradientType.YourPreset => GradientsPresets.YourPresetColors,
GradientType.Rainbow => null, // Handled differently
GradientType.Custom => null, // same
_ => null
};
}- Make erasing better
- Allow gradient to repeat