Glitch City Laboratories Forums

Lab γ: Video Games and Glitches Discussion => Pokémon Glitch Discussion => Generation IV Glitch Discussion => Topic started by: BUGLITCH on March 12, 2018, 11:44:48 am

Title: How to catch glitch Pokémon in D/P(Pl?)
Post by: BUGLITCH on March 12, 2018, 11:44:48 am
Hello guys, I found a way to get glitch Pokémon in D/P without using any emulator-only glitches like "glitch scripts" or similar things. (however I couldn't test on real hardware for now)

It's using a glitch I will call the Battle Corruption Glitch from now on.

This glitch will corrupt the wild encounters as well as the Great Marsh encounters. I called it Battle Corruption Glitch because it's actually affecting every battles, you will get why later.

I think the best way to explain it is to go through the process of its discovery.

Pomeg Glitch

You may know that you can't directly get a Fainted Pokemon with the Pomeg in D/P/Pl, however it's easy to get one by using Pomeg in order to get a negative amount of HP, so that you can use a Rare Candy to raise its HP to 0.

(http://www.prama-initiative.com/DPP/BCG/pomeg.png)

You may also know that, if you have less than six Pokémon in your team, and if all your Pokémon are Fainted, the game will pick the Pokemon just after your last one (the 5th if you have 4, the 6th Pokemon if you have 5 etc) which will result in you sending in battle the well known "DPBox".

If you have 6 Pokemon, the game will crash, because it wants to access the 7th Pokemon of your team, which is out of bound. (However I'm not quite sure about this anymore because double battles work if you have 5 fainted Pokémon on you, so the problem might be elsewhere)

I wanted to avoid this crash to see what was really happening, the way I did it is by having 6 invalid Pokémon in my team (KO, Eggs), but I cheated to have some invalid Pokemon that could fight (the empty Pokémon). Basically, I had 3 Fainted Pokémon in my team, and I edited my team size to 6.

This was the result of it :

(http://www.prama-initiative.com/DPP/BCG/empty.png)

As you can see, the wild Pokemon is glitched, this is what I called the Battle Corruption Glitch.

Battle Corruption Glitch

So this is what the BCG is: having a team of 6 invalid Pokémons will result in a wild encounter against glitched Pokémon, however it was impossible to know because of the crash.

How to not crash

So from there, it's easy to conclude than the crash was the result of our Pokémon, not of the wild corrupted one.

So all I had to do is to find a place where our Pokémon wasn't appearing, I picked the Great Marsh.

(http://www.prama-initiative.com/DPP/BCG/BCG.png)

So here it is guys, all you have to do is to get 6 invalids Pokemon in your team by using the Pomeg, before heading to the Great Marsh.

Most of the time, it will crash, all Pokemons called "Bad eggs" are a no go, I couldn't catch any of them. But I could catch some of the non-bad eggs one :

(http://www.prama-initiative.com/DPP/BCG/box.png)

(http://www.prama-initiative.com/DPP/BCG/e.png)

Title: Re: How to catch glitch Pokémon in D/P(Pl?)
Post by: Evie the Bird Mother 🌸 ☽ on March 12, 2018, 12:02:31 pm
Wow! This is groundbreaking :).

Amazing find BUGLITCH.

If you bring up the Pokédex entry of one of these glitch Pokémon could that lead to reliable arbitrary code execution?
Title: Re: How to catch glitch Pokémon in D/P(Pl?)
Post by: BUGLITCH on March 12, 2018, 12:21:38 pm
Thanks!
Hmm, I'm not sure what you meant but sadly I don't think the entry is accessible.
Title: Re: How to catch glitch Pokémon in D/P(Pl?)
Post by: Gravedigger on March 12, 2018, 12:49:59 pm
I think we'll need to find a way to circumvent the crashes on hardware, but it has potential to work with the correct setups, I hope
Title: Re: How to catch glitch Pokémon in D/P(Pl?)
Post by: xylo on March 12, 2018, 02:35:02 pm
Good work! :D
Title: Re: How to catch glitch Pokémon in D/P(Pl?)
Post by: Wack0 on March 15, 2018, 02:21:32 pm
Reminds me of this, which was the same effect (well, seems so anyway) caused by editing a save file with 0 Pokémon in the party to have partycount=6: https://forums.glitchcity.info/index.php?topic=7168.0
Title: Re: How to catch glitch Pokémon in D/P(Pl?)
Post by: ISSOtm on March 15, 2018, 06:52:36 pm
Trying this on my Diamond cartridge yielded a crash before the battle transition showed up. Interestingly, Desmume crashes, but later.
Title: Re: How to catch glitch Pokémon in D/P(Pl?)
Post by: BUGLITCH on March 16, 2018, 09:01:16 am
Reminds me of this, which was the same effect (well, seems so anyway) caused by editing a save file with 0 Pokémon in the party to have partycount=6: https://forums.glitchcity.info/index.php?topic=7168.0

Oh yep, never saw this topic, but yes, having your partycount to 6 while having no Pokémon means having 6 invalid Pokémon, so that's it.
Title: Re: How to catch glitch Pokémon in D/P(Pl?)
Post by: RichardG867 on March 17, 2018, 12:04:21 pm
This is also possible in the HG/SS Safari Zone. The following screenshots were taken on HeartGold with a party of 6 fainted Pokémon. Ending the encounter in any way results in a crash while returning to the overworld (black screen), however the glitches never run away from too many throws/bait/mud.

(https://i.imgur.com/WgoMgOb.png) (https://i.imgur.com/kwSuyoq.png) (https://i.imgur.com/PuwDXLO.png) (https://i.imgur.com/fL7Gwzr.png)

The Bad Eggs hang the game and eventually crash with a stuck music note, while the blue boxes appear to just hang. All Bad Eggs have a really long animation (normal hop, then sprite jumps around randomly), but I did find a blue box that had Bulbasaur's cry and animation followed by the jump-around sequence.

I did manage to catch some that didn't crash immediately, but they do crash before the summary (see second image). Throwing bait also crashes (third image):

(https://i.imgur.com/71gWjie.png) (https://i.imgur.com/WGZ69KB.png) (https://i.imgur.com/vaMDf17.png)

This one broke out of the ball, started watching carefully and promptly crashed with some top screen corruption:

(https://i.imgur.com/SOXra8u.png)

This blue box broke out of 20 balls and was only catchable with an Action Replay code to increase the catch rate, it didn't crash at first, although it crashed while loading the overworld as I mentioned above:

(https://i.imgur.com/XskLDgH.png) (https://i.imgur.com/AP3C8fh.png) (https://i.imgur.com/XOlvumg.png)

Also, my very first attempt ended in a crash during the battle transition, although I never manage to reproduce that.
Title: Re: How to catch glitch Pokémon in D/P(Pl?)
Post by: 0ErrorYT on March 18, 2018, 12:48:24 pm
I have uploaded a video on this, mostly bad egg, but got a few cool things.
https://youtu.be/oBcZrfUr-dE
Title: Re: How to catch glitch Pokémon in D/P(Pl?)
Post by: Evie the Bird Mother 🌸 ☽ on April 11, 2018, 12:55:09 pm
This is also possible in the HG/SS Safari Zone.

(...)

I think this is an obscure fact but I'm not sure if Pomeg glitch works in HeartGold/SoulSilver.
Unfortunately for that reason this may be a Diamond/Pearl/Platinum(?) only glitch. I didn't test the Japanese version however.

In at least English HeartGold/SoulSilver I wasn't able to get the Pomeg glitch to work and I believe I did the same things for it to successfully work in Diamond/Pearl/Platinum (as in this video https://www.youtube.com/watch?v=E12pPXg4-dM).

For what its worth if it is possible in HeartGold/SoulSilver you can also activate a glitch where the walking Pokémon stays on the spot by having only fainted Pokémon but can't remember how.

Going to go test this on physical Diamond/Pearl and Platinum by modifying the save file first.

Edit 1: US Diamond results: Set up the party like BUGLITCH did but the game froze before battle. :(
Edit 2: EU Platinum results: Freeze as before
Edit 3: JP Diamond results: Freeze as before
Edit 4: Also for what it's worth, I tried this on the original DS ('DS phat'), a DS Lite and New Nintendo 3DS XL. Same result sadly.
Edit 5: Added PKM file for hacked Azumarill. To get it to 0 HP use the Pomeg Berry and then the Rare Candy. https://sites.google.com/site/torchickens2/miscellany
Edit 6: Yep, HeartGold/SoulSilver can't be used for the Pomeg glitch, including Japanese versions (only the maximum HP is reduced). :(
Title: Re: How to catch glitch Pokémon in D/P(Pl?)
Post by: BUGLITCH on April 16, 2018, 04:15:41 pm
There there
Yeah sadly it doesn't seem to work on hardware.

If it's only due to the battles, we can maybe still try to learn how to control the corruption to get non-crashing Pokémons (or even non-glitchmons).

If it's due to the corruption itself, well, we should stop trusting DS emulation on corruption glitches like cascade glitch, battle corruption glitch, glitchscripts etc. which are then just due to a glitch in emulation (well cascade glitch actually works but not the same way).

Anyway this was still fun to experiment these things with you guys!
Title: Re: How to catch glitch Pokémon in D/P(Pl?)
Post by: RETIRE on January 02, 2019, 12:50:15 pm
And, then I decided that it was time to revive this glitch and make it work on hardware. Using the method shown here it nearly works, but one extra factor is required! You need to be in a doublebattle, then the battle seems to stabilize allowing you to achieve the Battlecorruption!

Because of partnermode being achievable anywhere in diamond and pearl its probably the most useful there, because that allows you to corrupt wild battles anywhere, but it works in platinum and HG/SS too. It also works on doublebattles with trainers, and since the corruption seems to be influenced by the enemy's stats, if it works once with it'll always works with this couple (altho ASLR also influences the results)

(https://i.imgur.com/27cKHIY.jpg)
(https://i.imgur.com/tavAxjx.jpg)
Title: Re: How to catch glitch Pokémon in D/P(Pl?)
Post by: Evie the Bird Mother 🌸 ☽ on January 03, 2019, 11:54:54 am
You mean to say the only extra requirement needed was to be in a Double Battle? :O

Wow, this is amazing! Nice work. Really want to try it again now and see if any of the glitch Pokémon can be obtained with no freezing dex entries.

Umm.. Just to be sure, do you need to both be in the Safari Zone and double battle mode with all fainted Pokémon? ✿
Title: Re: How to catch glitch Pokémon in D/P(Pl?)
Post by: RETIRE on January 03, 2019, 03:53:29 pm
You mean to say the only extra requirement needed was to be in a Double Battle? :O

Wow, this is amazing! Nice work. Really want to try it again now and see if any of the glitch Pokémon can be obtained with no freezing dex entries.

Umm.. Just to be sure, do you need to both be in the Safari Zone and double battle mode with all fainted Pokémon? ✿

You do not have to be in the safari zone, the safari overlay will be removed once you have a partner anyway. Speaking of the safari zone, here are two dp exclusive methods to get 6 dead pokémon/eggs in partnermode!

First is the easy option, you take a normal partner out of bounds using the wrong warp setup, swap out your pokémon for weak pokemon or eggs, enter safari zone and kill all 6 in one battle.
You'll get safari kicked with 6 dead pokémon. Using eggs also works meaning you have to kill less of them

Second option is a bit harder, but might proove more interesting if you could get a stable battle. If you get an amity square partner out of bounds you need to have 5 eggs and one weak pokémon, save in front of the safari girls, and enter hoping to get a wifi battletype and die in it to get Safari kicked. Resetting if you do not get the desired result

Either of these methods will allow you to have doublebattles with 6 dead pokémon anywhere in dp. For platinum you can only do this glitch around partners their areas and heartgold is probably limited to double trainerbattles.
Title: Re: How to catch glitch Pokémon in D/P(Pl?)
Post by: Evie the Bird Mother 🌸 ☽ on January 03, 2019, 04:41:16 pm
Thanks for the information. I've yet to have tried the partner out of bounds setup, but out of interest (on a physical DS Lite) I obtained all fainted Pokémon (with Pomeg Berry and Rare Candy) and activated Cheryl as a partner using the normal method (entering Eterna Forest for the first time). Unfortunately the game has only frozen with black screens so far, but the freeze occurred with the battle music still playing. ✿
Title: Re: How to catch glitch Pokémon in D/P(Pl?)
Post by: RETIRE on January 03, 2019, 05:52:05 pm
Thanks for the information. I've yet to have tried the partner out of bounds setup, but out of interest (on a physical DS Lite) I obtained all fainted Pokémon (with Pomeg Berry and Rare Candy) and activated Cheryl as a partner using the normal method (entering Eterna Forest for the first time). Unfortunately the game has only frozen with black screens so far, but the freeze occurred with the battle music still playing. ✿

Crashes are still going to happen like 7/8 times. But I can confirm with cheryl I've gotten some working ones in her regular gameplay area!
Title: Re: How to catch glitch Pokémon in D/P(Pl?)
Post by: Evie the Bird Mother 🌸 ☽ on January 03, 2019, 06:01:29 pm
Thanks for the information. I've yet to have tried the partner out of bounds setup, but out of interest (on a physical DS Lite) I obtained all fainted Pokémon (with Pomeg Berry and Rare Candy) and activated Cheryl as a partner using the normal method (entering Eterna Forest for the first time). Unfortunately the game has only frozen with black screens so far, but the freeze occurred with the battle music still playing. ✿

Crashes are still going to happen like 7/8 times. But I can confirm with cheryl I've gotten some working ones in her regular gameplay area!

Oh OK. Cool! I'll keep trying then. Were those from wild battles or a double Trainer? Also which region/game were you using if that matters? I'm using a NA Diamond (even though I live in Europe), but I have EU Pearl. Do I not need to have entered the Safari Zone at all (so say hypothetically you play up to Cheryl, trade in a Pomeg Berry from another game and keep trying wild encounters, will you eventually find stable glitch Pokémon)?

Tried the first Cheryl Double Trainer battle and that one didn't work. There is another Double Trainer pair, but Cheryl heals your party after every battle, and you need to have battled the first pair/have used Cut to get there, which is normally impossible because you need to have beaten Eterna Gym to use it. Thanks in advance.

Edit: Check this out ^^ I was trying both Cheryl (NA Diamond) and Marley (EU Platinum) multiple times and found success. Unfortunately after I sent out the Level 252 Bad Egg the game froze though. :(

(https://i.imgur.com/tvA3s08.png)

Edit 2: Cheryl in US Diamond, unfortunately another freeze after I sent out the Bad Egg.

(https://i.imgur.com/8sQ5pQx.png)

I've also got in on video if interested:

https://www.youtube.com/watch?v=lUOyO5XZakI ✿
Title: Re: How to catch glitch Pokémon in D/P(Pl?)
Post by: BUGLITCH on January 03, 2019, 08:25:41 pm
I've been busy lately but I'm glad to see it's getting somewhere, congratulation!
Title: Re: How to catch glitch Pokémon in D/P(Pl?)
Post by: Evie the Bird Mother 🌸 ☽ on January 03, 2019, 08:52:10 pm
I've been busy lately but I'm glad to see it's getting somewhere, congratulation!

Thanks! It seems that the next steps then may be to find out exactly what happens (whether the game indeed tries to load the 7th Pokémon if you have 6), and what this data represents. There might be a way of securing a decent chance of a non-freezing Bad Egg. RETIRE, when you took those screenshots do you remember if the game froze after sending out your Bad Egg like it did with me? ✿
Title: Re: How to catch glitch Pokémon in D/P(Pl?)
Post by: RETIRE on January 04, 2019, 02:25:23 am
I've been busy lately but I'm glad to see it's getting somewhere, congratulation!

Thanks! It seems that the next steps then may be to find out exactly what happens (whether the game indeed tries to load the 7th Pokémon if you have 6), and what this data represents. There might be a way of securing a decent chance of a non-freezing Bad Egg. RETIRE, when you took those screenshots do you remember if the game froze after sending out your Bad Egg like it did with me? ✿

It did, but I also know why! If moves have indexes above the highest, the game automatically crashes after throwing out the pokémon. The data, from a first glance, may be read from the opponent's pokémon, and while searching for valid terminators it could corrupt that data along the way, resulting in two corrupted pokémon? I'd have to check on an emulator to be sure of that tho. I'm also going to make a full dp setup video allowing you to do this without pomeg, anywhere

Anyway, bad egg is actually an errorhandler. Its not a real glitchmon, in a way. If a pokémon's checksums are invalid it becomes a bad egg, but I have had real glitchmon appear on emu and they should be accesible on hardware too. By manipulating what enemy you encounter, you might be able to rng for overleveled glitchmon or ideally even regular pokémon, or breed a glitchmon for bad eggs that will change into valid pokémon.

Here's a list of potential crashes when battling
Buffer overflows
Invalid sprites
Invalid moves (both being loaded as selection on screen or used by the enemy)
Invalid weather types

An ideal battle would have
A valid checksum for at least the opponent's side (because glitchmon can be captured and eggs can't, also glitchmon can be bred into bad eggs anyway)
No glitchmoves on your side, no crashing ones on the other side
If this can be achieved at any point then your battle will most likely work
Title: Re: How to catch glitch Pokémon in D/P(Pl?)
Post by: Evie the Bird Mother 🌸 ☽ on January 07, 2019, 02:05:42 pm
Thanks for the information! :) I have a vague question, but do you think (given you need a Double Battle and a partner might set it up) would it be possible to do this on a specially crafted Pal Park Pokémon (with RNG abuse if necessary) to convert one of them into another species like say Celebi/Deoxys? It seems unlikely but that sounds like it could be a means of exploiting the glitch to get desired Pokémon, even perhaps if the foe becomes a Bad Egg and the only purpose is to register the base Pokémon's Pokédex entry (if it works like that). Thanks. ✿
Title: Re: How to catch glitch Pokémon in D/P(Pl?)
Post by: RETIRE on January 07, 2019, 02:14:32 pm
Thanks for the information! :) I have a vague question, but do you think (given you need a Double Battle and a partner might set it up) would it be possible to do this on a specially crafted Pal Park Pokémon (with RNG abuse if necessary) to convert one of them into another species like say Celebi/Deoxys? It seems unlikely but that sounds like it could be a means of exploiting the glitch to get desired Pokémon, even perhaps if the foe becomes a Bad Egg and the only purpose is to register the base Pokémon's Pokédex entry (if it works like that). Thanks. ✿

Whilst that sounds good at first, think about the instant boxing glitch. It doesn't matter what you capture in pal park, it just copy and pastes the data once you enter the pal park indoor map. And we've gotten fully working battles on emulator now, and we figured out that the values for the moves seem to be consistent using the same aslr. Which makes me wonder if it'll work at all on hardware (emus accept glitchmoves to be loaded)
Title: Re: How to catch glitch Pokémon in D/P(Pl?)
Post by: Matt1990 on May 18, 2019, 08:07:06 am
(https://puu.sh/DtXJO/dd44aab2c5.png)
Anyone else found this kind of glitchmons when performing this glitch? I mostly got the green box and the Bad eggs. Whenever I try to do any kind of action (save the game, another wild encounter of any kind, even with a healthy party, see its info on the box) the game will either crash or soft-freeze.
Title: Re: How to catch glitch Pokémon in D/P(Pl?)
Post by: Caveat on May 18, 2019, 04:26:42 pm
Ooh, hybrids. Did you only encounter the Shellos hybrid?

I've noticed that most, if not all of the Glitch Pokemon in Gen 4 will crash the game whenever you do LITERALLY ANYTHING after catching them. RETIRE told me once (on his old account) that it corrupts the type of battle you're in (and probably some other stuff too) which makes me wonder if there's any possible way to get the game into a semi-playable state, or at least let you LOOK at the dang Pokemon.
Title: Re: How to catch glitch Pokémon in D/P(Pl?)
Post by: Matt1990 on May 18, 2019, 07:56:01 pm
Yeah, besides the green box/Bad eggs this is the only hybrid I've encountered. It did let me catch it and everything but right after it I couldn't do anything. Trying to view its info instantly soft-locked the game, trying a trainer/wild encounter or saving the game instantly froze it. Didn't know that you could encounter hybrids as well. If someone wants to work on it I can give my save state

EDIT: Other than the hybrid you can (although very rare) find Bad eggs with side effects such as these two:

(https://puu.sh/DuA12/a02b875e3c.png)
This one flickered the screen and then it crashed the game
(https://puu.sh/DuA2u/0d57baf2a6.png)
While this one just displayed a message and then froze the game

I'm quite sure that there will be other ones other than that. I'll keep trying and see if I run into something interesting
Title: Re: How to catch glitch Pokémon in D/P(Pl?)
Post by: Hālian on May 24, 2019, 01:16:16 am
Twenty-six exclamation points. Impressive. :P