Trainer escape glitch: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
>Bbbbbbbbba
(→‎Initial steps of the glitch: Added some technical explanation. It may be strange to put it after just the initial steps of the glitch, but there are too many possible variants of this glitch that I don't think there is any other good position.)
>Bbbbbbbbba
(→‎Special stat encounter: Bit 0 of $CD60 doesn't actually need to be reset, except for the fact that with it set you are unable to do pretty much anything.)
Line 72: Line 72:
This trick can be performed after completing one of the Trainer escape methods above in the '[[Trainer escape glitch#Initial steps of the glitch|initial steps of the glitch]]' section and may temporarily remove the ability to open the start menu.
This trick can be performed after completing one of the Trainer escape methods above in the '[[Trainer escape glitch#Initial steps of the glitch|initial steps of the glitch]]' section and may temporarily remove the ability to open the start menu.


There are two requirements for a Special stat encounter to work, [http://forums.glitchcity.info/index.php?topic=7256.msg198353#msg198353 as documented by Háčky].
There are two obstacles that usually need to be cleared before a Special stat encounter could work, [http://forums.glitchcity.info/index.php?topic=7256.msg198353#msg198353 as documented by Háčky].


*Bit 0 of $CD60 is unset. This bit is set when a Trainer spots the player and when it is set disables use of the Start menu, and partially disables the A and B buttons except for certain actions like using a PC.
*Bit 0 of $CD60 needs to be unset. This bit is set when a Trainer spots the player and when it is set disables use of the Start menu, and partially disables the A and B buttons except for certain actions like using a PC. There is no known method to clear the following obstacle without clearing this one either beforehand or in the process (except by cheating or utilizing other glitches).
*Bit 0 of $D730 is unset. This bit is set while a Trainer walks up to the player and is supposed to be cleared when they finish walking.
*Bit 0 of $D730 needs to be unset. This bit is set while a Trainer walks up to the player and is supposed to be cleared when they finish walking. The map script DisplayEnemyTrainerTextAndStartBattle will wait for this bit to clear before actually displaying the text box and starting the fight.


After completing the long-range Trainer or Rival's effect method, there are four possible ways to enable Special stat encounter.
After completing the long-range Trainer or Rival's effect method, there are two ways to enable Special stat encounter.


1. Encounter a Trainer that can be used up and either win or lose to them. This will bring the ability to use the start menu back and is enough to get the Special stat encounter to work. Wild Pokémon can be encountered afterwards (including a Ditto) to obtain the desired Special stat.<br>
1. Encounter a Trainer that walks up to you, and either win or lose to them. This will bring the ability to use the start menu back and is enough to get the Special stat encounter to work. Wild Pokémon can be encountered afterwards (including a Ditto) to obtain the desired Special stat.
* If you don't let them walk at least one step to you, the game will freeze, because bit 0 of $D730 makes the game think the trainer should be walking up to you anyway.
2. Defeat the Elite Four and watch the end of the credits. After the credits finish and the player reloads the save file, the foe's Special stat in memory will become zero. This does not result in a battle with an [[GlitchDex/RB:000|'M (00)]] or [[GlitchDex/Y:000|3TrainerPoké₽]], so if the player wants to encounter a Pokémon they must have last encountered a Pokémon (either via a wild battle or Trainer) with a Special stat which is not 0.<br>
3. Change boxes and reset the game, then be guided by the Pewter Museum NPC in Pewter City. Changing boxes and resetting the game will unset bit $CD60, and being guided by the Pewter Museum NPC will unset bit $D730.<br>
2. Change boxes (saving the game in the process) and reset the game, which will unset bit 0 of $CD60, allowing the player to use the Start menu or talk with NPCs. From here on, a few methods to unset bit 0 of $D730 exist:
* Defeat the Elite Four and watch the end of the credits. After the credits finish and the player reloads the save file, the foe's Special stat in memory will become zero. This does not result in a battle with an [[GlitchDex/RB:000|'M (00)]] or [[GlitchDex/Y:000|3TrainerPoké₽]], so if the player wants to encounter a Pokémon they must have last encountered a Pokémon (either via a wild battle or Trainer) with a Special stat which is not 0.<br>
4. Change boxes and reset the game, then move a boulder with Strength, such as the one in the warden's house in Fuchsia City. Pushing the boulder will unset bit $D730.
* Be guided by the Pewter Museum NPC in Pewter City.
* Move a boulder with Strength, such as the one in the warden's house in Fuchsia City.


In the [[:#Death-warp|death-warp trick]], a Special stat encounter will be enabled immediately after blacking out to the Trainer if the Trainer didn't have to walk up to the player, or after being guided by the Pewter Museum NPC/pushing a Strength boulder if the Trainer did have to walk up to the player.
In the [[:#Death-warp|death-warp trick]], a Special stat encounter will be enabled immediately after blacking out to the Trainer if the Trainer didn't have to walk up to the player, or after being guided by the Pewter Museum NPC/pushing a Strength boulder if the Trainer did have to walk up to the player.