Repository navigation
Ocarina of Time: a god mode cheat (Link takes no damage, enemies still do) - #1955
Closed
UserDerezzed wants to merge 2 commits into
Closed
UserDerezzed wants to merge 2 commits into
UserDerezzed wants to merge 2 commits into
Conversation
…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)
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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):
main+0x486FA0), filtered by the actor's damage handler, then applied bymain+0x488750: the life loss, the death (LifeDepleted_%s), the hit flags and the impulse.pacibsp) branches to a cave atmain+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 thepacibspand branches back tomain+0x488754.The entries are in a new
OcarinaOfTime.cheats.toml, bound to buildE0F3CCFAF50065AE(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.tomland 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
cheat_anchor.py compileof the source writes the same words as the file that was played (the two god mode entries, diffed).main+0x488750isb 0x3c46f00; the cave ends inpacibspandb 0x488754, and itsadrp/addgive0x4b606d0.python3 -m unittest dm/tools/tests/test_docs.py dm/tools/tests/test_cheat_anchor.py dm/tools/tests/test_game_profile.py: pass.oot-god-mode.mp4