Dungeon ID swapping
In vanilla ALttP, Hyrule Castle and the Sewers are considered different dungeons. When you pass through the door between the throne room and the sewers, the game changes the ID of the dungeon you're in by XORing it with 2. This is a symmetrical operation, so it creates pairs of dungeons you can swap between if your dungeon ID is not actually Hyrule Castle.
Dungeon ID swapping can allow you to collect the prize (crystal or pendant) of a dungeon without ever entering it. It's important as a way to complete Misery Mire (NL) in No Logic without having the correct medallion for it.
|Tower of Hera
|Hyrule Castle Tower
|Palace of Darkness
(links are to the No Logic guides for these dungeons)
If you're in cave state, the dungeon ID becomes $FD, which is an alternate cave state in the vanilla game, and crashes in the randomizer.
Almost all setups for dungeon ID swapping (besides playing Hyrule Castle as intended) need to come from the sewers and go back and forth through the throne, so you need to do sewer door deletion first.
The usual route
Keep in mind the prerequisites to dungeon ID swapping:
- You must have performed sewer door deletion at some point or be able to hookpush. Remember that the result of sewer door deletion gets saved, so it can be any time earlier in your run.
- This route starts and ends in the Tower of Hera (NL). Assuming the dungeon ID you want to swap isn't Tower of Hera, you need to get into Hera from a different dungeon, which fortunately there are many ways to do. For example, if you want to swap from Palace of Darkness (NL) to Misery Mire (NL), start by performing a YBA from PoD to Hera.
- The last step is in a dark room, so it will be hard to do if you don't have a Lamp.
More images of the steps appear in this imgur post.
- In the southeast room of Hera 3F, place a bomb to the upper right of the crystal switch.
- Dash rightward along the slope into the bomb, and hold during the knockback.
- You clip through the slope into the dark sewer.
2. Pass through the sewer/throne door
Alternative, you can hookpush thought the wall with the closed door.
|Lit room in practice hack
This is the moment that your dungeon ID swaps. If you have a compass and dungeon counters are on, you may see the dungeon counter change.
3. Proceed through the sewers
Play the game normally until you get to the key-rat room.
From the key-rat room:
- Do a south subtile YBA (drinking a red or green potion at the moment you go through the door)
- Tap left or right about 5 times, to back out at least 5 pixels while staying in the door.
- Pass through the door, and emerge from the top wall of Hera 3F.
|Lit room in practice hack