Jump to content

Retire glitch: Difference between revisions

m
fixed minor typos
>Torchickens
(Created page with "{{bulbapedia2|Pal Park Retire glitch}} The '''Retire glitch''' (also known as the '''Pal Park Retire glitch''') is a glitch derivative of Tweaking or Elite Four doo...")
 
>Map233224
m (fixed minor typos)
 
(5 intermediate revisions by 3 users not shown)
Line 1:
{{bulbapedia2|Pal Park Retire glitch}}
[[File:Retire void.png|thumb|right|300px|RETIRE appearing in the void]]
 
The '''Retire glitch''' (also known as the '''Pal Park Retire glitch''') is a [[glitch derivative]] of [[Tweaking]] or [[Elite Four door glitch]]. It was documented by Ganix, formerly known as Cryo, on January 10, 2017.
 
By entering the [[void]], then traveling through RAM until you enter Map 0x00FB (251) '''Pal Park''', a mapscript will run. The player is granted a Menu, which has the '''RETIRE''' function on it, similarly to the Menu granted in the Great Marsh.
The glitch involves travelling to the Pal Park while in the [[out of bounds|void]]. This allows the player to access the retire option from the menu, which here, in normal circumstances, would be the script to leave the Pal Park.
 
It also sets a flag that accounts for the Encounters, making sure you can only encounter '''wild''' Pokémon (on grass, water, cave and pond tiles) that you have transfered from gen 3. If none are present, you cannot encounter wild Pokémon. This does not apply to static battles (Drifloon, legendaries, berry trees).
Upon leaving the Pal Park, choosing the retire option will run map script 3. This allows the player to run scripts they aren't supposed to or glitch scripts. The script that appears depends on the area, and sometimes the contents of the writable memory.
 
The '''RETIRE''' glitch occurs when pressing the RETIRE function.
The glitch is most known for its use in the Hall of Origin, which allows for the player to battle Arceus.
The sourcecode shown was provided by Ganix.
 
int StartMenu_RETIRE(int wptr)
{
int wdata;
int wmenu;
int flagptr;
 
wdata = GetOverworldDataAddress(wptr);
wmenu = GetOverworldStruct(wptr);
 
//-----------------------------------------------------------------------
// Close the start menu
//-----------------------------------------------------------------------
Function_2035718(wmenu);
Function_200ccf8(wmenu, 1);
Function_201ac68(*wmenu, *(wmenu + 4));
Function_2019178(wmenu);
Function_20358a0(wptr);
 
flagptr = LoadFlagAddress(*(wdata + 12));
 
//-----------------------------------------------------------------------
// Check if the Great Marsh flag (0x967) is set.
//-----------------------------------------------------------------------
if (CheckFlag(flagptr, 0x967))
{
//---------------------------------------------------------------------
// When script 0x2275 is run, it asks if you want to exit Great Marsh.
//
// Answering YES clears flag 0x967 and quits the Safari game.
//---------------------------------------------------------------------
RunScript(wptr, 0x2275u, 0);
}
 
//-----------------------------------------------------------------------
// Pal Park's flags SHOULD have been explicitly checked here, but the
// fact that they weren't is why the RETIRE glitch is possible.
//-----------------------------------------------------------------------
else
{
//---------------------------------------------------------------------
// While script 0x2275 references a defined script number, lower
// numbers such as this reference scripts relative to the current map's
// script runtime.
//
// scripts in runtime from a map then goes to a defined script. This means
// that the script is based on what map you use the menu in, and what the
// 4th script is.
//---------------------------------------------------------------------
RunScript(wptr, 4, 0);
}
free(wmenu);
return 0;
}
 
It first checks for flag 0x0967, a flag set when entering the Great Marsch,
if set, it runs script 0x2275 and asks to leave the Safari Zone.
 
Otherwise, it runs the 4th script in runtime. In normal circumstances it cannot be used outside of Pal Park's Map, where it would be:
 
Script 4:
Fanfare 1500
Lockall
Message 8 "Would you like to retire?"
Yesnobox 32780
CloseMsgOnKeyPress
If 32780 0
CheckLR 1 func_2
Releaseall
End
 
with func_2 being
 
Func 2:
Setvar 16627 2
Releaseall
Goto func_1
End
 
And func_1 being
 
Func 1:
StopGreatMarsh 1
Fadescreen 6 1 0 0
Resetscreen
Warp 393 0 7 7 1
Fadescreen 6 1 1 0
Resetscreen
Killscript
 
In this case, pressing YES would warp you to Map 0x0189 (393).
 
Once out of bounds, you can use it in any map you'd like, running 4th script in runtime in any Map.
 
A year later an alternative was found by glitchologist Aera (yem), called alt-RETIRE.
By transfering 6 Pokémon from gen 3 and being in '''Pal Park mode''', then catching all 6, the game would run 3rd script un runtime.
 
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
 
with func_1 (still) being
 
FUNCTIONS:
Func 1:
StopGreatMarsh 1
Fadescreen 6 1 0 0
Resetscreen
Warp 393 0 7 7 1
Fadescreen 6 1 1 0
Resetscreen
Killscript
 
Since the flag set by the mapscript made the game ignore all encountertables to only encounter the transfered Pokémon, this meant you could call 3rd script in runtime too. At the time, it wasn't quite that useful since it was limited to areas where we could find grass/water, and a small area in the void called 'Black Sinnoh', where these tiles are naturally read from RAM.
 
A year later the glitchologist RETIRE found a way to manipulate tiles in the void, allowing to write any tile by chaining gfx set changes (by opening menus in specific maps) and for specific tiles manipulating ASLR too. Now you could call 3rd script in runtime in any map.
 
The glitch is most known for its use in the Hall of Origin, which allows for the player to battle Arceus.
{{clr}}
{{stub}}
 
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.