Skip to content

Prince of Persia: Warrior Within Mod

A playable character mod that turns time travel into a risky deckbuilder resource: earn Sand, use the Medallion of Time to rewind bad futures, and accept that every stolen second brings the Dahaka closer.

Solo project. I built the character, combat systems, pursuit encounter, audio layer and presentation pipeline inside Slay the Spire 2's early-access mod environment.

Gameplay from the current build (May 5, 2026): the Sand HUD, Wind Back rewinds and Dahaka pressure.
My role
Solo designer and gameplay engineer; also integration, assets, audio and presentation
Built with
Slay the Spire 2 v0.103.2, BaseLib v3.1.0, Godot 4.5.1, C#/.NET 9, Harmony patches
Challenge
Restore a full combat checkpoint while keeping health, cards, enemies and custom resources consistent
Status
Playable: character, Sand, rewind, Dahaka pursuit, cards, audio, UI and contextual videos
Jump to a section

The rewind system

Rewind is the centrepiece because it touches almost every fragile part of combat. A partial undo would be easier, but it wouldn't survive real fights with generated cards, powers, relic counters, changing enemy rosters and a live hand UI. Six problems had to be solved:

  • Combat Snapshots

    Rewind stores turn-start and combat-start checkpoints instead of only undoing HP. The restored timeline has to land on a coherent combat model.
  • Pile Repair

    Cards move back into hand, draw, discard, and exhaust while generated utility cards are recreated through valid combat-card registration paths.
  • Power And Relic State

    Mutable runtime fields matter. Powers, relic counters, temporary flags, and owner bindings have to be cloned or restored carefully.
  • Enemy Roster Repair

    Summons, splits, deaths, missing enemies, and monster move machines can all drift away from the snapshot unless they are reconciled.
  • Hand UI Repair

    The live STS2 hand can keep stale card holders and drag state after rewind, so the mod rebuilds holders and bindings without leaving floating cards.
  • Replay Divergence

    STS2 replay/state-divergence hooks can keep recording the wrong future, so rewind has to clean up engine-side action and visual residue.

The Dahaka loop

The Dahaka makes time travel costly. Rewinding helps the Prince survive this fight, but pushes a persistent pursuit toward a dedicated escape encounter.

  • 01. Earn Sand

    Enemy kills and Sand-focused cards build charges that carry through the Medallion rather than resetting every room.
  • 02. Spend Time

    Wind Back turns Sand into a 1/2/3-turn rewind choice. The stronger the rewind, the louder the cost.
  • 03. Advance Chase

    Rewind pressure feeds the persistent Dahaka meter, so survival creates a second strategic threat.
  • 04. Escape Takeover

    When the meter fills, Dahaka can replace the normal fight flow with a distance-based escape encounter.
  • 05. Escape Or Fall

    Escape cards push distance up; Dahaka pressure pulls it down. Rewind is clamped inside the chase once the encounter begins.
Character select in the current build, with the Medallion of Time starter relic.

Card families

The Prince should survive through motion, timing and dangerous second chances, not drift into a stealth assassin, shield tank or passive stall class. These cards are design-family evidence: some are in the registered playable pool, newer ones are authored pre-release assets.

Dual-Blade Flow

Movement and blade sequencing are meant to make the Prince feel fast and dangerous, not like a planted blocker.

Hook Kick. Movement payoff that turns positioning into weak application and extra block.

Deflect / Counter

Defense should read as slipping, catching, and punishing commitment rather than walling off the turn.

Blade Catch. Reactive defense that rewards attacking first instead of hiding behind passive block.
Dead Angle. Rare payoff for exploiting Weak or Vulnerable windows after the enemy overcommits.

Time Predator

The time lane makes rewind proactive: Sand generation, second-pass advantages, and pressure that grows more dangerous with use.

Borrowed Breath. Sand economy and post-rewind draw, keeping time manipulation tied to a resource loop.
Wind of Fate. All-enemy pressure that feeds Sand while keeping the table under threat.

Art and presentation

The art is still in beta and uses ComfyUI-assisted concept output in places, so my claim is the production pass around it: choosing assets, cleaning sprites and mattes, cutting puppet layers, baking UI, and wiring it all to live game state.

  • ComfyUI helps with concept and lookdev only; it is not the claim on its own.
  • The production work is integration: choosing usable assets, cutting sprites, cleaning mattes, baking card, relic and UI images, and wiring them into the game.
  • The Prince and the Dahaka are layered puppets cut from their sprites, so they can animate in combat.
  • The Sand medallion, loading videos, game-over overlays, music, voice and sound effects all react to live game state.
Sprites, puppet layers and UI art
The Prince combat sprite from the live mod folder.
Puppet layer cuts (v15): base body, hair, weapon arms and sash.
The Dahaka sprite used in the chase and escape.
Dahaka puppet parts: separated underpaint and tentacle layers.
Matte cleanup in Silhouette (Mask ML / Matte Assist) after ComfyUI-assisted source generation.
Sand medallion HUD art; the filled pips are procedural and follow the live resource.

What the build contains

  • A selectable Prince with custom starter deck, Medallion of Time starter relic, reward/shop card hooks, rest/shop/combat visuals, and 25 Prince-facing Neow lines.
  • Sand resource loop with carryover, enemy-kill gain, Medallion HUD sockets, hover tips, Sand spend validation, and generated Wind Back access.
  • Snapshot rewind that restores card piles, powers, relic runtime fields, generated combat cards, enemy rosters, monster move state, and live combat UI.
  • Persistent Dahaka chase that can turn a normal fight into a dedicated escape encounter with distance tracking, escape cards, widgets, and staged presentation.
  • Room-aware Warrior Within audio across combat, chase, menu, rest, shop, events, treasure, Prince voice, Dahaka voice, sword impacts, rewind SFX, and Sand feedback.
  • Art/presentation pipeline covering card portrait bakes, relic/UI bakes, Prince and Dahaka puppet rigs, loading overlays, and contextual game-over videos.
Reviewer documents