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

Gen 3 assisted scriptcalling (new method to catch darkrai/shaymin) - Page 1

Gen 3 assisted scriptcalling (new method to catch darkrai/shaymin)

Posted by: RETIRE
Date: 2018-05-22 14:50:11
The 'alt-RETIRE' or 'migration script calling' glitch was a theorethical glitch found last year by aera which would allow you to call 3rd script in runtime.
By migrating 6 pokemon and getting to the pal park map via the void, the game will make all wild encounters in any map (indoors/outdoors)
into the 6 migrated pokemon. Once you 'catch' all 6, it calls 3rd script in runtime, which under normal circumstances should be:

Map 251 (pal park):

[size=8pt]  Script 3:
            Fanfare 1500
            Lockall
            Fanfare 1521
            Setvarhero 0
            Message 5                "Ding-dong!
                                      Congratulations!

                                      \v0103\z0000 has successfully
                                      caught the stocked Pokémon!"
            PlaySound 1002
            Soundfr 1158
            Fadedef
            CloseMsgOnKeyPress
            Releaseall
            Setvar 16627 1
            Goto func_1
            End
[/size]

We were already able to get grasstiles in a 'black sinnoh', which is basicly just a part of the void which has the same maps as sinnoh, 30 maps at the left/right  from the real one, because of how you traverse through RAM. All we had to do is catch 5 pokemon in this area, then if we ever found grass somewhere else we could use that to catch the 6th and call the 3rd script in runtime.

I revisited this subject about 2 weeks ago and made quite a big breakthrough, by refreshing graphics in certain maps with certain patterns/ combinations, you can actually write ANY tile in any part of the void. These tiles include everything from water, grass, snow, mud, sand to bins, town maps and more. Because in the void this data is repeated, the tiles reapear every 30-ish steps. What we want to do is catch 5 pokemon in black sinnoh (to save on time) and then catch the 6th pokemon after having written a pattern of grasstiles. Because the tiles loop, you can get them into any map as long as you don't refresh to remove them, get an encounter and the script will be called.

[img]https://i.imgur.com/c3WHAN1.png[/img]

It seems like the tiles are written depending on what gfx set you currently have.
The first consistent way of doing this I found is using an extremely easy refresh pattern of:

Hall of origin (510)
Jubilife market (4, or any market)

After I figured this out, I wrote a route which I'll explain below.
I make use of the portion of ram where mapdata is stored, so everytime I enter a specific map
I write new maps around me in RAM, then carefully chain all this data to get the maps I need.

Here I show the entire process off (for darkrai's script) https://youtu.be/OKMKF0a2KhE?t=357

Migrate 6 pokemon that can be caught in the 'field' area.
—————–
1 S
17 W
14 N
574 W
Save reset
—————–
2097 S
19 W
288 S
51 E (above mapdata)
352 S (go through map 2, write map 392)
33 W (go through map 392, write map 393)

Save Reset

1 E
77 S
128 E
19 S (go through map 393, write map 251)
63 E (64 if you have been already)
177 N (enter map 251 / pal park map)
32 N
—————
211 W
618 N
19 E               
1253 N
14 E (go to grass in black sinnoh)
1 W/ 1 E until captured 5 of the 6 pokémon
————-
14 W
1345 S
19 W
————-
288 S
51 E (above mapdata)
352 S (go through map 2, write map 392)
33 W (go through map 392, write map 306)
1 E
64 S
128 E (go through map 306, write map 45)
19 N
————-
256 E
32 N (go through map 45, write map 316, go through map 316, write 510)
147 W
64 N
96 W
32 N
96 W
64 N
96 W
95 N
243 E graphic reload (map 510/hall of origin)
————-
64 E graphic reload (map 4, jubilife market)
26 E
1 S (grass tile appears)
————-
[img]https://i.imgur.com/QNEXgjy.png[/img]

From here on you just write your route to any map you'd like to and encounter the pokemon in the grasstile.
But what exactly can we do with this third script in runtime?
I thought I'd list some of the most important ones I found so far by checking a dump of scripts and functions by Ganix.

Map 321:
Darkrai encounter
[img]https://i.imgur.com/jqbOlyG.png[/img] [img]https://i.imgur.com/mdVIN4m.png[/img]

map 274:
Shaymin encounter
[img]https://i.imgur.com/8CwCgK8.png[/img] [img]https://i.imgur.com/EHJx7Om.png[/img]
Map 316:
Azelf encounter
[img]https://i.imgur.com/oenxqHJ.png[/img]
Map 319:
Uxie encounter
[img]https://i.imgur.com/Yn5DCO5.png[/img]

If you are very sharp, you might have noticed that the darkrai encounter is on water, and the other ones also aren't on grass anymore.
This is because the tile was overwritten once we encountered the 6th pokemon, and refreshed the graphics.
This could ofcourse be used for more than just this, but I couldn't list everything and have only looked for the scripts I thought would be interesting to use. If I find other uses I will certainly make an update, maybe even a couple of update videos!

[size=8pt]Edit: I added an extra save, this resets the grasspatterns and makes it easier for future routing[/size]

Re: Gen 3 assisted scriptcalling (new method to catch darkrai/shaymin)

Posted by: BUGLITCH
Date: 2018-05-23 01:49:42
Well done!

Re: Gen 3 assisted scriptcalling (new method to catch darkrai/shaymin)

Posted by: RETIRE
Date: 2018-05-24 12:35:05
I wrote a complete route for darkrai now, I will try to write a shaymin route too if I have time.
(this route hasn't been tested and is only a proof of concept, using a battle tower route is still way faster)

———————————————————————————————————————–
ALT-RETIRE scriptcalling
—————–
1 S
17 W
14 N
574 W
Save reset
—————–
2097 S
19 W
288 S
51 E
352 S
33 W

Save reset

1 E
77 S
128 E
19 S
63 E (64 if you have been already)
177 N (cutscene)
32 N
—————
211 W
618 N
19 E               
1253 N
14 E
1 W/ 1 E until captured 5 of the 6 pokemon
————-
14 W
1345 S
19 W
————-
288 S
51 E
352 S
33 W
1 E
64 S
128 E
32 N
————-
256 E
19 N
147 W
64 N
96 W
32 N
96 W
64 N
96 W
95 N
243 E graphic reload (map 510/hall of origin)

————-
Map 321: Darkrai
————-
256 W
64 S
95 W graphic reload (map 4/market)
321 S
267 N
————-
84 W
64 N
51 E
54 N
————-
365 E
32 N
125 E
16 N
80 S
50 E
1 S (grasstile in map 321) (1 E/1W repeatedly until encounter)
————-
encounter Darkrai
————-
1 N
145 W
210 S
204 W
————-
1 E
78 S
128 E
1 S (wont show on stepcounter)
11 S
64 E
North until countdown
>RETIRE
————-

Re: Gen 3 assisted scriptcalling (new method to catch darkrai/shaymin)

Posted by: RETIRE
Date: 2018-05-25 09:38:17
And now I've also finished the route for shaymin!

———————————————————————————————————————–
ALT-RETIRE scriptcalling
—————–
1 S
17 W
14 N
574 W
Save reset
—————–
2097 S
19 W
288 S
51 E
352 S
33 W

Save reset


1 E
77 S
128 E
19 S
63 E (64 if you have been already)
177 N (cutscene)
32 N
—————
211 W
618 N
19 E               
1253 N
14 E
1 W/ 1 E until captured 5 of the 6 pokemon
————-
14 W
1345 S
19 W
————-
288 S
51 E
352 S
33 W
1 E
64 S
128 E
32 N
————-
256 E
19 N
147 W
64 N
96 W
32 N
96 W
64 N
96 W
95 N
243 E graphic reload (map 510/hall of origin)

————-
Map 274: Shaymin
————-
256 W
64 S
95 W graphic reload (map 4/market)
321 S
267 N
————-
84 W
64 N
19 E
54 N
321 W
1 S
1 N
381 E
1 S (grasstile in map 274) (1 E/1W repeatedly until encounter)
————-
Encounter Shaymin
————-
1 N
164 E
1 S
1 N
242 S
1 W
1 E
78 S
128 E
1 S (wont show on stepcounter)
11 S
64 E
North until countdown
>RETIRE
————-

Re: Gen 3 assisted scriptcalling (new method to catch darkrai/shaymin)

Posted by: Krys3000
Date: 2018-05-25 12:51:33
That sounds awesome! I'll look into it this week-end  ;D

Re: Gen 3 assisted scriptcalling (new method to catch darkrai/shaymin)

Posted by: RETIRE
Date: 2018-05-25 13:17:29

Well done!



That sounds awesome! I'll look into it this week-end  ;D


Thank you guys! I'm still working on the video atm, but after that I might look into more uses and perhaps an easier/faster route if that's possible :p