MUGCAP
Creator of PLA GBA and PKMN F&E Rom Hacks
- 2
- Posts
- 1
- Years
- Seen May 21, 2024
Changing the Player's Overworld ingame
Intro:
I recently made this routine, it's kind of limited in the sense that you can only be change to 30 different overworlds (excluding the special version of the default characters). While it is limited, I don't really think that that's a problem (you'd probably only be OWs swapping to 2-3 different OWs the entire game anyways, so unless you wanted to player to play as more than 30 characters, this routine will work just fine for you). It's also a little "smaller" in comparison to JPAN's 6 seperate routines which he used (though in his favor, I don't think his limits the amount like mine). I blame the table, it's weird. Actually the whole overworld loading thing is weird..it's done in like 9 places lol.
I should also note that if the OW you're changing to doesn't have a running frame, things are going to look weird when you try to run~
How to insert:
Compile into free space the following routine:
Spoiler:
Code:.text .align 2 .thumb .thumb_func @hook from 0805CA4C via r0 main: @flag check checkFlag: mov r0, #0xFF lsl r0, r0, #0x2 add r0, r0, #0xA @0x3FC + 0xA = @406 ldr r2, =(0x806E6D0 +1) push {r1, r3} bl linker pop {r1, r3} cmp r0, #0x1 bne noCrash setOW: ldr r0, =(0x20370B8) ldrb r0, [r0] cmp r0, #0xFF beq noCrash mov r3, r0 noCrash: mov r8, r3 lsl r4, r4, #0x10 lsr r4, r4, #0x10 lsl r5, r5, #0x10 ldr r0, =(0x805CA54 +1) bx r0 linker: bx r2 .align 2
Here's a compiled version:
Code:FF 20 80 00 0A 30 09 4A 0A B4 00 F0 0E F8 0A BC 01 28 04 D1 06 48 00 78 FF 28 00 D0 03 1C 98 46 24 04 24 0C 2D 04 03 48 00 47 10 47 D1 E6 06 08 B8 70 03 02 55 CA 05 08
Now navigate to 0x5CA4C and insert the following byte changes:
Where XX XX XX is where you inserted this routine +1.Code:00 48 00 47 XX XX XX 08
Usage:
The routine requires two conditions to toggle.
1) Flag 0x406 is set
2) Var 0x8000 is not 0xFF
As you may have guessed you need to set variable 0x8000 to a value which matches the overworld you want the player to transform into. Please note that for the effect to happen, you need to warp first.
Here's a list of values and their corresponding sprite to the left:
Spoiler:
Code:0 - male hero 1 - female hero 3 - female hero bike 4 - male hero run 5 - female hero run 6 - male hero vs-seeker 7 - female hero vs-seeker 8 - male hero fishing 9 - female hero fishing 12 - Brendon 13 - May 26 - Male + Female hero Vs seeker on bike 28 - Random guy (A-MAP ID 25) 29 - Little boy 44 - Gem sign thing (buggy) 48 - Spearow 52 - Old man 1 (A-MAP ID 33) 80 - Jogging girl 83 - Blonde dude (A-MAP ID 26) 84 - Fat guy 88 - Old man 2 (A-MAP ID 88) 92 - Scroll backpack thing (buggy) 93 - Team rocket male 104 - Meowth 112 - Chansey 116 - Slowbro 124 - Snorlax 125 - Fisherman 166 - Kid tuber (male) 170 - Old man 3 (A-MAP ID 30) 176 - Green girl (A-MAP ID 40) 213 - Red dress lady 214 - Old lady 228 - Deoxys (I think this one is normal) 245 - Misty 250 - Hey champ in the making guy 251 - Ghost Girl
While no particular value will cause a crash, I've excluded values which are "repeated" OWs. If you experience bugs, use it in conjunction with the backsprite hack I made. If you still have bugs, report them here!
I have a small problem. If it is resolved, I will be able to continue the development of my Hack Rom. A bug happens, when I open any menu. The player's Sprite returns to the original (but with the new palette changed by the routine.) I searched a lot but didn't find any solution. I am very grateful if you can help me.