Mew glitch: Difference between revisions

2,009 bytes added ,  12 February 2018
many things were wrong
(→‎Level and roster manipulation: I used Growl 6 times on a Clefairy, then caught it. The wild Nidoqueen was level 7.)
(many things were wrong)
Line 9: Line 9:
==Explanation==
==Explanation==
===Trainer-Fly glitch===
===Trainer-Fly glitch===
The Mew glitch works by exploiting a separate glitch called the Trainer-Fly glitch.  The Trainer-Fly glitch is caused by encountering a Trainer that can battle the player at any point in the Trainer's line of sight and escaping from them.  These Trainers are nicknamed "Long-Range Trainers" due to the long distance that they can spot the player being defined as the maximum allowed by the game and will spot the player the moment that they appear on screen in the Trainer's line of sight.  When the game draws any NPC on the screen, that NPC is first placed in their default direction (south) for one frame, before being updated to face their correct direction. For Long-Range Trainers, this causes their line of sight to point south for the first frame, before correcting to their intended direction. For that first frame, the player can still bring up the start menu and use any [[Field move]] or items from their bag.  If the player uses {{m|Fly}} or a similar move or item, then the player will be spotted by the Long-Range Trainer before the player flies away from them.  This causes the game to believe that the player is starting a battle when they are actually not, causing various values to be read improperly and creating the core of the glitch.
The Mew glitch works by exploiting a separate glitch called the Trainer-Fly glitch.  The Trainer-Fly glitch is caused by encountering a Trainer that can battle the player at any point in the Trainer's line of sight and escaping from them.  These Trainers are nicknamed "Long-Range Trainers" due to the long distance that they can spot the player being defined as the maximum allowed by the game and will spot the player the moment that they appear on screen in the Trainer's line of sight.  When the game draws any NPC on the screen, that NPC is first placed in their default direction (south) for one frame, before being updated to face their correct direction. For Long-Range Trainers, this causes their line of sight to point south for the first frame, before correcting to their intended direction. For that first frame, the player can still bring up the start menu and use any [[Field move]] or items from their bag.  If the player uses {{m|Fly}} or a similar move or item, then the player will be spotted by the Long-Range Trainer before the player flies away from them.  This causes the game to believe that the player is starting a battle when they are actually not, causing various values to be read improperly and creating the core of the glitch. Specifically, the map script of the route the player left is set to a value where the game is constantly trying to display pre-battle text and start a battle.


The player must then battle a Trainer (not just a wild Pokémon) in between the escape and the final encounter, otherwise no encounter will appear. This is because the game initially expects the player to be spotted by the Long-Range Trainer and 'start' a Trainer battle.  For this reason, the player must 'finish' a battle with any Trainer before the game can begin behaving properly.  Additionally, this Trainer must walk up to the player (have at least 1 tile in between the player and trainer); he/she cannot be talked to directly or walked immediately in front of to initiate the battle, or the game will [[game freeze|soft lock]].  This is because the game believes that the player is about to battle the Long-Range Trainer that was escaped from and attempts to have the sprite of the Trainer walk up to the player.  If there is no space for the sprite to walk up to, then the game gets stuck in a loop that prevents the battle from occurring and the player from regaining control.
The player must then battle a Trainer (not just a wild Pokémon, unless you want to perform extra steps) in between the escape and the final encounter, otherwise no encounter will appear. This is because the game requires the value that contains the ID of the enemy trainer in the overworld or the unmodified special stat of the enemy Pokémon to not be 0 if it is to start a battle, and at this point the game is in a state where the start menu is disabled and the A and B buttons only work for using the PC, making it impossible to talk to anyone or use moves outside of battle.  Additionally, this Trainer must walk up to the player (have at least 1 tile in between the player and trainer); he/she cannot be talked to directly or walked immediately in front of to initiate the battle, or the game will [[game freeze|soft lock]].  This is because the game is in a state where it is waiting for the trainer that is currently being engaged to finish moving so it can display their text and start the battle.  If there is no space for the sprite to walk up to, then the game gets stuck in a loop that prevents the battle from occurring and the player from regaining control.


Afterwards, the player will regain full control and be able to access the menu at will.  Should the player return to the same location or floor as the Long-Range Trainer, the menu will pop back up as the game believes that the player has yet to close the menu in the location. After closing the menu, the game will immediately start a battle due to the game believing that the player has yet to enter a battle and ends up generating a battle with a wild Pokémon based on the Special stat of the Pokémon last battled and at a level based on the attack stage modifier of the Pokémon last battled.
Afterwards, the player will regain full control and be able to access the menu at will.  Should the player return to the same location or floor as the Long-Range Trainer, the game will go to display the pre-battle text and start the battle. This pre-battle text is text using the textbox ID of the most recently seen textbox, which if doing a textbook Mew glitch is the start menu seen when you go to Fly to Lavender Town to go back to route 8, resulting the Start menu popping up on its own-this is good as the start menu is always safe to have pop up this way. After closing the menu, the game will immediately start a battle due to the game being in a state where it is constantly attempting to display enemy trainer text and start a battle, and ends up generating a battle with a wild Pokémon based on the Special stat of the Pokémon last battled and at a level based on the attack stage modifier of the Pokémon last battled. Note that if the Special stat of the Pokémon last battled happened to be in between 200 and 255, the player will instead encounter an enemy trainer, as trainer IDs are stored on the same table as Pokémon IDs. This trainer will have a roster based on the attack stage modifier of the Pokémon last battled. Avoid fighting Pokémon with a Special stat of over 248 without a lookup table of trainer IDs to avoid fighting ZZAZZ glitch trainers, as they corrupt the game.


For the Mew Glitch, the reason why Mew specifically appears at the end is based on the relationship between its [[index number]], which is 21, and the {{stat|Special}} stat of the Pokémon last battled. In both of the above cases, the Youngster's level 17 Slowpoke and the Swimmer's level 16 {{p|Shellder}}, the last Pokémon in their respective parties, have a Special stat of 21.
For the Mew Glitch, the reason why Mew specifically appears at the end is based on the relationship between its [[index number]], which is 21, and the {{stat|Special}} stat of the Pokémon last battled. In both of the above cases, the Youngster's level 17 Slowpoke and the Swimmer's level 16 {{p|Shellder}}, the last Pokémon in their respective parties, have a Special stat of 21.  


Any method of 'escape' from the Long-Range Trainer may be used, including {{m|Teleport}} and both {{m|Dig}} and the [[Escape Rope]] if the Trainer is in a cave area.
Any method of 'escape' from the Long-Range Trainer may be used, including {{m|Teleport}} and both {{m|Dig}} and the [[Escape Rope]] if the Trainer is in a cave area.
Line 29: Line 29:
After landing in Cerulean City, the Start, A, and B buttons will not function properly, as the game believes that the player is about to be in a battle. From here, the player should walk to Route 25 and battle the aforementioned Youngster. Importantly, the Youngster must walk up to the player (must have at least 1 tile between the player and the Youngster when the player is spotted) to initiate the battle, or else the game will soft lock.
After landing in Cerulean City, the Start, A, and B buttons will not function properly, as the game believes that the player is about to be in a battle. From here, the player should walk to Route 25 and battle the aforementioned Youngster. Importantly, the Youngster must walk up to the player (must have at least 1 tile between the player and the Youngster when the player is spotted) to initiate the battle, or else the game will soft lock.


After battling the Youngster, the previously disabled buttons will now work again. The player must now return to Route 8 (with the most convenient method being Flying to [[Lavender Town]] and heading west). Upon entering the Route, the start menu will appear by itself; closing the menu will immediately begin a battle with a wild Level 7 Mew.
After battling the Youngster, the previously disabled buttons will now work again. The player must now return to Route 8 (with the most convenient method being Flying to [[Lavender Town]] and heading west), opening the start menu at least once along the way (Flying works). Upon entering the Route, the start menu will appear by itself; closing the menu will immediately begin a battle with a wild Level 7 Mew.


If the game is saved and reset during the glitch, or the player returns to Route 8 after Flying but before battling, or if any battle occurs or any NPC is interacted with between the time of the Youngster battle and the Mew encounter, then the glitch will not work and the game must be reset to before Flying from the Gambler.
If the game is saved and reset during the glitch, or if any battle occurs between fighting the Youngster and encountering the Mew, you must battle a Pokémon with a Special stat of 21 again for the glitch to work. If the player does anything that causes a non-start-menu textbox to appear onscreen (excluding anything in the start menu itself) or saves and resets the game, the player must open the start menu before entering route 8 to load its textbox ID (0) into memory. If the player returns to Route 8 after Flying but before battling, then the glitch will not work and the game must be reset to before Flying from the Gambler.


===Method #2===
===Method #2===
Line 57: Line 57:
In {{game|Yellow}}, as wild Ditto can only be found in the basement of {{ka|Pokémon Mansion}} or [[Cerulean Cave]], it is highly recommended to bring an Escape Rope or a Pokémon who knows Dig, in order to leave the Mansion immediately after battling the Ditto. If the player attempts to walk out of the Mansion and encounters another wild Pokémon on the first floor, its Special stat will overwrite that of the Ditto and cause a different Pokémon than the one desired to be encountered.
In {{game|Yellow}}, as wild Ditto can only be found in the basement of {{ka|Pokémon Mansion}} or [[Cerulean Cave]], it is highly recommended to bring an Escape Rope or a Pokémon who knows Dig, in order to leave the Mansion immediately after battling the Ditto. If the player attempts to walk out of the Mansion and encounters another wild Pokémon on the first floor, its Special stat will overwrite that of the Ditto and cause a different Pokémon than the one desired to be encountered.


As it is easily possible for one's Special stat to exceed 190, the highest index number of a valid Pokémon, the Ditto glitch allows easy access to several [[glitch Pokémon]] for Special stats of 191 or higher. For example, in Red/Blue, a Special stat of 198 will lead to battling a [[ゥL ゥM 4]]. If the Special stat is between 200 and 255, the player will instead battle a [[glitch Trainer]] instead of a wild Pokémon. It is even possible to battle [[Professor Oak]] in this way. Some Special stats (namely [[Jacred|200]] and 248-255) correspond to invalid [[Trainer class]]es and may lead to the memory-corrupting [[ZZAZZ glitch]] depending on the level/roster value (which defaults to 7; see [[:#Level and roster manipulation|level and roster manipulation]]). As the ZZAZZ glitch can be hazardous to the [[save]] file, performing the Ditto glitch with these Special stats should be avoided.
As it is easily possible for one's Special stat to exceed 190, the highest index number of a valid Pokémon, the Ditto glitch allows easy access to several [[glitch Pokémon]] for Special stats of 191 or higher. For example, in Red/Blue, a Special stat of 198 will lead to battling a [[ゥL ゥM 4]]. If the Special stat is between 200 and 255, the player will instead battle a [[glitch Trainer]] instead of a wild Pokémon. It is even possible to battle [[Professor Oak]] in this way. Some Special stats (namely [[Jacred|200]] and 248-255) correspond to invalid [[Trainer class]]es and may lead to the memory-corrupting [[ZZAZZ glitch]] depending on the level/roster value (which defaults to 7; see [[:#Level and roster manipulation|level and roster manipulation]]). As the ZZAZZ glitch can be hazardous to the [[save]] file (specifically, overwriting a large portion of memory with hex 99, resulting a heavily corrupted file that most likely cannot be saved), performing the Ditto glitch with these Special stats should be avoided.


Special stats of 256 or higher will wrap around to 0 and continue from there, as index numbers are limited to one byte. For example, a Special stat of 300 will yield exactly the same effects as a Special stat of 44. This is the only way to use the Ditto glitch to encounter Pokémon whose index values are less than 5 (as Special stats cannot normally go lower than that).
Special stats of 256 or higher will wrap around to 0 and continue from there, as index numbers are limited to one byte. For example, a Special stat of 300 will yield exactly the same effects as a Special stat of 44. This is the only way to use the Ditto glitch to encounter Pokémon whose index values are less than 5 (as Special stats cannot normally go lower than that).
Line 844: Line 844:


====Text box errors and variations====
====Text box errors and variations====
This can be also one of the side-effects of the Mew glitch If the player causes a text box to pop up before returning to the area where the long-range Trainer was escaped from, such as by talking to a NPC or reading a sign, then something other than the start menu will pop up at the end of the glitch. This is typically dialogue from Trainers on the route, which may be followed by a wild Pokémon battle, after which the player will no longer be able to move.{{fact}} Alternately, the text may be from interacting with a sign or an item; in the latter case, the item will appear in the player's inventory and disappear from the route as if they had picked it up normally. This may also allow the player to obtain items which are not currently on the route. Finally, instead of a text box, the player may trigger other glitches, such as [[glitch song]]s or [[0 ERROR]].
This can be also one of the side-effects of the Mew glitch. If the player causes a text box to pop up before returning to the area where the long-range Trainer was escaped from, such as by talking to a NPC or reading a sign, then something other than the start menu will pop up at the end of the glitch, due to having a textbox ID other than 0 saved into memory. This is typically dialogue from Trainers on the route, which may be followed by a wild Pokémon battle, after which the player will no longer be able to move.{{fact}} Alternately, the text may be from interacting with a sign or an item; in the latter case, the item will appear in the player's inventory and disappear from the route as if they had picked it up normally. This may also allow the player to obtain items which are not currently on the route. Finally, instead of a visible text box, the player may trigger other glitches, such as [[glitch song]]s or [[0 ERROR]]. Glitch songs are caused by invalid glitch textboxes that contain text script sound commands, and 0 Error is caused by any text box whose text script initiates a trainer battle, as it overrides the battle spawned by the Mew glitch and increments the map script to an invalid state.  


====No Trainers remaining====
====No Trainers remaining====
Line 850: Line 850:
As the method written above requires the player to battle another Trainer (in a different area) after escaping from the long-range Trainer, this can cause problems if all possible Trainers have been defeated. The [[Elite Four]] can be rebattled indefinitely, but as the A button to talk to characters remains nonfunctional until a Trainer has been defeated, it is not possible to challenge them directly. Nor can the player directly save the game as the start menu cannot be opened.
As the method written above requires the player to battle another Trainer (in a different area) after escaping from the long-range Trainer, this can cause problems if all possible Trainers have been defeated. The [[Elite Four]] can be rebattled indefinitely, but as the A button to talk to characters remains nonfunctional until a Trainer has been defeated, it is not possible to challenge them directly. Nor can the player directly save the game as the start menu cannot be opened.


To remedy this, after escaping the long-range Trainer, the player must visit a PC and save the game indirectly by switching boxes. (The A and B buttons remain functional for the PC.) After saving, the player must reset the game. This makes the Start, A, and B buttons functional again.
To remedy this, after escaping the long-range Trainer, the player must visit a PC and save the game indirectly by switching boxes. (The A and B buttons remain functional for the PC.) After saving, the player must reset the game. This makes the Start, A, and B buttons functional again-the game no longer thinks the player is about to battle a trainer, although it is still waiting for an NPC to finish moving.


At this point, there are a number of methods that can be used to complete the glitch:
At this point, there are a number of methods that can be used to complete the glitch:
* As implied above, the player can now defeat the entire [[Elite Four]] and {{pkmn|Champion}}. This will count as a Trainer battle, and the player can then return to the area of the first long-range Trainer to complete the glitch.
* As implied above, the player can now defeat the entire [[Elite Four]] and {{pkmn|Champion}}. Professor Oak walks at the end of this.  
* As the above method is tedious, a much simpler alternate method is to simply go to [[Pewter City]] and talk to the NPC who brings the player to the Museum (the player must choose No to his question, so he will actually walk the player there). This will count as a battle being initiate. However, the player must encounter a Pokémon after this to get an actual Special stat loaded into memory. The Start menu must also be flashed after this, to prevent a possible text box error (see above).
* As the Museum person is vulnerable to the Snorlax skip glitch side effect (see above), the above method may fail to work after being used once. An even simpler alternate method is to simply push any [[Strength]] boulder, which  will count as a battle being initiate. (No other [[HM]]s behave this way as none of them move sprites or objects.)


{{Incomplete|section|Describe why all of the above actually work; see http://forums.glitchcity.info/index.php/topic,7365.0.html. For the same reason, losing to the second Trainer (see below) works but losing to the Elite Four or Champion does not.}}
* As the above method is tedious, a much simpler alternate method is to simply go to [[Pewter City]] and talk to the NPC who brings the player to the Museum (the player must choose No to his question, so he will actually walk the player there). When he is done moving, the game is done waiting. However, the player must encounter a Pokémon after this to get an actual Special stat loaded into memory. The Start menu must also be flashed after this, to prevent a possible text box error (see above).


Note that as long as the player has at least one undefeated Trainer in a different area than the long-range Trainer, they can avoid having to do any of the above indefinitely. It is not necessary to defeat another Trainer after escaping, only battle one, so a player can deliberately lose to a Trainer and continue on with the glitch, and that Trainer will remain battleable. However, if the player loses to that Trainer and then goes back to the area of the long-range Trainer and battles a Pokémon with this glitch, the long-range Trainer will no longer be battleable.
* As the Museum person is vulnerable to the Snorlax skip glitch side effect (see above), the above method may fail to work after being used once. An even simpler alternate method is to simply push any [[Strength]] boulder, which  will count as an NPC moving, because apparently Strength boulders are really NPCs. (No other [[HM]]s behave this way as none of them move sprites or objects.)
 
 
Note that as long as the player has at least one undefeated Trainer in a different area than the long-range Trainer, they can avoid having to do any of the above indefinitely, as all that is needed is for an NPC to finish a movement script that disables player input for the duration of the script and for a Special stat to be loaded into memory. It is not necessary to defeat another Trainer after escaping, only battle one, so a player can deliberately lose to a Trainer and continue on with the glitch, and that Trainer will remain battleable. However, if the player loses to that Trainer and then goes back to the area of the long-range Trainer and battles a Pokémon with this glitch, the long-range Trainer will no longer be battleable.


=====No Trainers to escape from at all=====
=====No Trainers to escape from at all=====
6

edits