Glitch City Laboratories Archives

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.

Generation IV Glitch Discussion

Catching Heatran twice and duplicating any sprite 1 or 2 - Page 1

Catching Heatran twice and duplicating any sprite 1 or 2

Posted by: RETIRE
Date: 2019-02-11 10:34:43
As the title suggests, we are now able to duplicate any sprite 1 or 2 (unless a flag is set that prevents it from loading).
The glitch itself is simple, making use out of it is however not.

So, the glitch utilises two key components:
1) the void allowing you to enter maps from any side
2) Map Id 177, 179, 181, 183

These four Map Id's are the Elite Four maps.
They have a simple, yet very useful mapscript.

177 and 179 utilise:

      Script 2:
            Lockall
            Applymovement 255 mov_1
            Waitmovement
            Fanfare 1562
            Clearflag 672/673
            Addpeople 1
            Setvar 16385 1
            Releaseall
            End

And 181, 183 utilise:

      Script 2:
            Lockall
            Applymovement 255 mov_1
            Waitmovement
            Fanfare 1562
            Clearflag 674/675
            Addpeople 2
            Setvar 16385 1
            Releaseall
            End

The main points of interests are Highlighted

Applymovement 255 mov_1 moves the player one tile up

Addpeople 1/2Adds an NPC with Sprite 1/2 of the Map you're currently in.

Since the mapscript moves you up first, you can move into a different Map Id in the void.
After that, it will load sprite 1/2 of that Map! This sprite is only here temporarily.
It will save all loaded sprites when you save reset, but if you leave the Map and re-enter it will not be loaded.
It also cannot load sprites that are flagged already. An item that is picked up cannot be respawned, but the sprite can be duplicated and the item picked up twice.

Sadly, many sprites that are useful (Darkrai, Shaymin, Arceus, Giratina…) happen to be Sprite 0.
But, our friend Heatran is not! He is sprite 1.

So this means you can unlock Heatran, therefore loading his sprite.
Then you enter a Map 177/179 under Map 265, enter it and move into Map 265 to duplicate the sprite.

Issue is, we cannot move outside of the Map or the sprite will be lost. So how will we interact with the duplicated sprite?
I told you earlier we could save reset and the sprites will be saved. So, we will use our good old friend Fake Sinnoh to help us out here!

If we, theorethically, got a Map 265 in a Fake Sinnoh, with map 177 or 179 under it, we could duplicate the Heatran sprite, save reset and be at the real Map 265. Then we could battle and catch both Heatran at once!
While routing something like this might proove very difficult, I used a RAM-editor to show you what this would look like.

Catching more than 2 Heatran isn't possible because a flag is set preventing his sprite to load once you capture him.

https://www.youtube.com/watch?v=QKLc-kp1UD4&feature=youtu.be

Re: Catching Heatran twice and duplicating any sprite 1 or 2

Posted by: Parzival
Date: 2019-02-11 20:37:45
Can't wait until this is used to overflow sprite memory and do ACE or some crazy shit like that.

Re: Catching Heatran twice and duplicating any sprite 1 or 2

Posted by: Sherkel
Date: 2019-02-11 22:52:08
Clever! Very different to the recent Ho-Oh exploit compared to what I expected. (All those sub-glitches…I may have to get myself to care about Gen 4… :P )

Re: Catching Heatran twice and duplicating any sprite 1 or 2

Posted by: RETIRE
Date: 2019-02-12 04:11:50

Can't wait until this is used to overflow sprite memory and do ACE or some crazy s**t like that.


We can already do this!

if you have over 64 NPC's, every next NPC deletes an  NPC with the same sprite.
But, in Amity square we can use RETIRE to load the script that makes a Pokémon stroll with you, adding a sprite.
Since there are multiple sprites you can spawn with this, you can spawn one kind untilt he 64 limit is reached and then
add one of another kind, this crashes the game. Probably because it's trying to delete a nonexisting sprite.