Skip to content

Ocarina of Time: a god mode cheat (Link takes no damage, enemies still do) - #1955

Closed
UserDerezzed wants to merge 2 commits into
seedds:mainfrom
UserDerezzed:oot-god-mode
Closed

UserDerezzed wants to merge 2 commits into
seedds:mainfrom
UserDerezzed:oot-god-mode

Conversation

@UserDerezzed

@UserDerezzed UserDerezzed commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

What and why

Ocarina of Time (0400486024DEC000, v131072) gets a god mode cheat by UserDerezzed. With it on, Link loses no hearts and does not die from the damage the game applies to him. It is for Link only: enemies and every other actor still take damage, so they can be fought as usual.

Turn it on from the Cheats menu or panel ("God mode (player, all external damage)"); turning it off puts the patched word back. It patches code, so it runs on the Mac only.

How it works (the game note's new Cheats section has the addresses and the evidence):

  • The apply. Each hit is built by the life component's per-hit receive (main+0x486FA0), filtered by the actor's damage handler, then applied by main+0x488750: the life loss, the death (LifeDepleted_%s), the hit flags and the impulse.
  • The patch. The apply's first word (pacibsp) branches to a cave at main+0x3C46F00, in the zero padding after the text. The cave compares the receiver's handler vtable ([[x0+0x20]]) with Link's (main+0x4B606D0, a class only the player has). For Link it returns, so nothing of the hit is applied. For anyone else it runs the pacibsp and branches back to main+0x488754.
  • Not established: whether every kind of damage goes through that apply (pits, drowning, lava, fall damage and scripted damage were neither traced nor tried), and whether Link still plays his hit reaction, since the handler's filter runs before the apply and is not patched.

The entries are in a new OcarinaOfTime.cheats.toml, bound to build E0F3CCFAF50065AE (the on entry's words are build-specific). The cave (main+0x3C46F00-0x3C46F27) does not overlap the free camera's (main+0x3C46C00-0x3C46E6F, #1949), and none of its words is one the rewriter changed.

This adds OcarinaOfTime.cheats.toml and a Cheats section to the game note. The open PRs #1718 (rupee, ammo and hearts codes) and #1949 (free camera) add both too. Whichever merges later needs a small text merge of its entries and section; the cheats themselves do not overlap.

Checked

  • Played in the Mac app on an M3 Max: a Deku Baba bites at Link at the start and again from about 3 s to the end, its head coming down onto him, and his three hearts stay full in every frame looked at (every 0.25 s).
  • cheat_anchor.py compile of the source writes the same words as the file that was played (the two god mode entries, diffed).
  • The hook and cave words disassembled (capstone): main+0x488750 is b 0x3c46f00; the cave ends in pacibsp and b 0x488754, and its adrp / add give 0x4b606d0.
  • python3 -m unittest dm/tools/tests/test_docs.py dm/tools/tests/test_cheat_anchor.py dm/tools/tests/test_game_profile.py: pass.
  • No host, chain or tool change, so no regression run.
oot-god-mode.mp4

…main+0x488750) branches to a cave that returns when the receiver's handler is Link's, so Link loses no hearts and does not die while enemies still take damage (Mac only, build E0F3CCFAF50065AE)
@seedds

seedds commented Nov 26, 2026

Copy link
Copy Markdown
Owner

Thanks @UserDerezzed for tracing the damage path and sharing this Ocarina of Time god-mode cheat.

We are closing this PR because game-specific, build-bound cheats are outside the scope of the core nxnative repository. Players can still load cheats externally without keeping per-build cheat tables in main.

@seedds seedds closed this Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation game: 0400486024DEC000 A game

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants