Skip to content

Add Corpse Run enhancement mode#6790

Open
jdperos wants to merge 12 commits into
HarbourMasters:developfrom
jdperos:corpse-run
Open

Add Corpse Run enhancement mode#6790
jdperos wants to merge 12 commits into
HarbourMasters:developfrom
jdperos:corpse-run

Conversation

@jdperos

@jdperos jdperos commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Summary

This adds a new enhancement mode: Corpse Run.

When enabled, dying drops a “remnant” at Link’s death location containing the consumable resources he was carrying. After respawning, the remnant appears in the world as a small collectible marker. Touching it restores the lost contents.

Currently dropped contents are:

  • Rupees
  • Magic
  • Bombs
  • Arrows
  • Deku Sticks
  • Deku Nuts
  • Deku Seeds
  • Bombchus

This is meant to add a bit of Dark Souls-ish tension without getting too hostile or softlock-prone. For now, it intentionally avoids dropping progression items, equipment, keys, quest state, etc.

Behavior

  • On death, the current remnant is replaced.
  • If Link dies again with nothing worth dropping, the previous remnant is still cleared.
  • The remnant is saved with the file, so it persists across reloads.
  • The remnant only becomes recoverable after respawn/player init, which avoids duplicate death-hook weirdness during the same death flow.
  • Recovery uses the existing ammo/magic/rupee helpers where appropriate so normal clamping/behavior is preserved.

Implementation notes

The mode is registered behind the CorpseRun enhancement CVar and binds into the existing GameInteractor hook system.

It currently uses:

  • [NEW] OnPlayerDeath to capture Link’s current location and move supported resources into the remnant.
  • [NEW] OnPlayerInit to reactivate a dropped remnant after respawn/load, instead of making it recoverable immediately during the death flow.
  • OnGameFrameUpdate to check whether Link is close enough to recover the remnant.
  • OnPlayDrawEnd to draw the remnant marker in-world after the scene/room/actor draw pass.

The remnant data is stored in a small custom save section named corpseRun, registered through SaveManager with init/load/save callbacks.

The drawn marker currently reuses the randomizer mystery item draw helper with a small bob/spin transform. It is just presentation... the saved remnant data is the actual source of truth.

For the resource data, ammo-backed consumables use a small descriptor table mapping:

save name -> Remnant field -> item id

That keeps the repeated bomb/arrow/stick/nut/seed/bombchu save/capture/restore logic compact, while keeping rupees and magic explicit since they do not behave exactly like normal ammo.

Possible next steps

There are a few obvious places this could go next, but I intentionally kept this first version conservative.

  • Bottle contents: Dropping bottle contents would be fun, but it needs some thought around merging/recovery priority. If the player dies with multiple bottles, then picks up bottles or changes contents before recovering the remnant, we need clear rules for what gets restored, what gets discarded, and which bottle slots get filled first.
  • Progression items: This is the big spicy version, but also the dangerous one. Dropping progression items means interacting carefully with progression checks, randomizer logic, and any systems that assume acquired items stay acquired. This would need softlock prevention and probably special handling for items that unlock required paths.
  • Equipment: Tunics, boots, swords, shields, etc. probably have similar issues to progression items. Some are safe-ish, some can affect access, and some may interact strangely with current scene/player state.
  • Better remnant presentation: The current marker is intentionally simple and reuses existing mystery item drawing. A future pass could give it a more unique model/effect, add a minimap/world cue, or make the visual reflect what kind of stuff is inside.
  • Recovery feedback: Add a small message or something. Right now, sound from rupee collection plays, but it could use more feedback.
  • Config options: This could eventually expose toggles for what drops: rupees only, consumables, magic, bottles, equipment, progression, etc. That would let players choose how punishing/chaotic they want the mode to be. Will be required if Item/Equipment drops are added.

For now, consumables felt like the safest and cleanest starting point: enough to change how death feels, without immediately turning the save file into a softlock machine.

Build Artifacts

@jdperos jdperos marked this pull request as ready for review June 22, 2026 01:36
Comment thread soh/src/overlays/actors/ovl_player_actor/z_player.c Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants