WTW mechanics discussions
Posted by: SatoMew
Date: 2015-02-18 23:10:57
Glitch City Laboratories closed on 1 September 2020 (announcement). This is an archived copy of a thread from Glitch City Laboratories Forums.
You can join Glitch City Research Institute to ask questions or discuss current developments.
You may also download the archive of this forum in .tar.gz, .sql.gz, or .sqlite.gz formats.
On an unrelated note, 01xx38CD can be set to 00 to revert the behavior of "walking through walls". I don't know if this was already known since people always mention 010138CD but this is far more practical than disabling the code and entering another map from a warp in order to restore the normal behavior.
I don't know if you know, but CD38 is actually set to 01 when you jump off a ledge. If you use 010038CD and try to jump off a ledge, you won't go two tiles below for some reason and you will end up on top of the ledge.
It is also used when a guide takes you somewhere; where it counts down from a value (29h for the person who brings you to the Pewter Gym, 11h for Professor Oak) each step until it becomes 00h, after which:
For Professor Oak - he disappears interestingly, the game locks up (if you set CD38 to 00 early) and the guide music still plays. In at least Yellow you enter the door while CD38 is 01 so this behaviour is not seen.
For the Pewter Gym guy - the music goes back to normal, the guide stops and says "If you have the right stuff, go take on BROCK!" and he starts walking back.
On an unrelated note, 01xx38CD can be set to 00 to revert the behavior of "walking through walls". I don't know if this was already known since people always mention 010138CD but this is far more practical than disabling the code and entering another map from a warp in order to restore the normal behavior.
Yes. I usually go to CD38 in memory viewer, set it to 01 when I need to and set it to 00 when I want it off (e.g. when I want to use an exit) but people may not be aware you can disable WTW like that.
I don't know if you know, but CD38 is actually set to 01 when you jump off a ledge. If you use 010038CD and try to jump off a ledge, you won't go two tiles below for some reason and you will end up on top of the ledge.
It is also used when a guide takes you somewhere; where it counts down from a value (29h for the person who brings you to the Pewter Gym, 11h for Professor Oak) each step until it becomes 00h, after which:
For Professor Oak - he disappears interestingly, the game locks up (if you set CD38 to 00 early) and the guide music still plays. In at least Yellow you enter the door while CD38 is 01 so this behaviour is not seen.
For the Pewter Gym guy - the music goes back to normal, the guide stops and says "If you have the right stuff, go take on BROCK!" and he starts walking back.
CD38 tells the game if it's simulating joypad states. This feature is used to make the game controls the player in some scripts. When the game is simulating joypad states, it will completely ignore any collision just like how the game do it with NPC. This means that setting CD38 to 01 will fools the game out that it's simulating joypad states and won't check the collision data. Hence why you can walk through walls.
CD38 tells the game if it's simulating joypad states. This feature is used to make the game controls the player in some scripts. When the game is simulating joypad states, it will completely ignore any collision just like how the game do it with NPC. This means that setting CD38 to 01 will fools the game out that it's simulating joypad states and won't check the collision data. Hence why you can walk through walls.
pokechu022 once said that CD38 is a step counter. Which one is correct?
In the Generation II games, there are 4 addresses manipulated by the various codes, with each allowing the player to "walk through walls" in one of the four directions (north, south, east, west–not by this order). Is there an address in these games like CD38 of the Generation I games?
Thanks for the input :)
My description is not exactly accurate. CD38 briefly becomes 02, then 01, then 00 when jumping down off a ledge in Red and there is no guide there. I tried setting it to FF when it become 02 and something weird happened; I jumped up instead and the start menu popped up with the controls locked (and I note that FFF9 is still 00 meaning the game is still reading buttons from the 'joypad' but they still have no effect).
[img]http://i7.minus.com/iHB8DJDzizKmM.png[/img]
That would explain the different results we got, correct? Actually, isn't the menu open automatically when you perform the Mew glitch as soon as you arrive at the exact tile on Route 24? I'm not sure of that behavior right now (may be a false memory) but perhaps it happens due to CD38 changing?
Is it OK if I split the talk about CD38 from this thread Sato? It's getting deep and not related to the glitch Pikachu eye states.
CD38 tells the game if it's simulating joypad states. This feature is used to make the game controls the player in some scripts. When the game is simulating joypad states, it will completely ignore any collision just like how the game do it with NPC. This means that setting CD38 to 01 will fools the game out that it's simulating joypad states and won't check the collision data. Hence why you can walk through walls.
pokechu022 once said that CD38 is a step counter. Which one is correct?
In the Generation II games, there are 4 addresses manipulated by the various codes, with each allowing the player to "walk through walls" in one of the four directions (north, south, east, west–not by this order). Is there an address in these games like CD38 of the Generation I games?
call $3486