• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Expanding the Pokédex into Emerald

Status
Not open for further replies.

Deokishisu

Mr. Magius
990
Posts
18
Years
A Pokémon that I rarely use...I'm okay with this.

I hope that the glitch CR stated above is fixed soon. Hopefully by tomorrow, since my birthday is tomorrow :3

It's probably better to have a system that doesn't break random Pokemon. Who knows? Castform might not be the only one unaffected. And, is it Castform, or is it the Forecast ability? More testing is needed to make sure there aren't random buggy Pokemon elsewhere, while someone narrows down what's eatin' Castform.

I won't be able to do even moderate hacking before the end of this month, but I'll see if I can test out other unique Pokemon. Kecleon might be another culprit, if it's Castform's type changing being the problem.
 
91
Posts
14
Years
  • Seen Feb 22, 2023
I already posted a fix and an explenation why it is castform that is affected, so yeah, it is castform, and non other, at least for this issue, since this is not essentially tested nobody can say what other kinds of issues will occur.

~SBird
 
1,323
Posts
16
Years
  • Seen Dec 9, 2023
Whenever I have time this weekend or next weekend, I'll try and find the offset for the Castform ID that got changed. It shouldn't be that hard to fix, since it's only one out of 29 offsets.
 
252
Posts
10
Years
  • Age 27
  • Seen Jul 6, 2019
So I experimented with the 29 offsets using an unmodified rom, and at the 5th occurrence, changing the offset there prevented the transformation from working. I think that might be related to the issue with Castform. I haven't completely expanded the pokedex yet, so I can't test it, but that might be the issue on hand.
 
40
Posts
9
Years
Hello!
I'm new here, and i tried to adapt this to a french version. But i have a problem with the step 1.
I found all the equivalent offset for my ROM exept the 0x0DA284. Do you have an idea of how can i do ?
Thank you for this tuto !
 

ShyRayq

Unprofessional Unprofessional
1,856
Posts
16
Years
  • Seen Apr 2, 2024
Hello!
I'm new here, and i tried to adapt this to a french version. But i have a problem with the step 1.
I found all the equivalent offset for my ROM exept the 0x0DA284. Do you have an idea of how can i do ?
Thank you for this tuto !

Well uh, you could go to 0xDA284 in an english rom, then copy a couple of bytes there. Then go to the french rom and search for those bytes. If you find a couple cases, just copy more bytes. If that's what you're doing already then well...keep searching?
 
1,323
Posts
16
Years
  • Seen Dec 9, 2023
I hope that the glitches for this project are figured out soon...

EDIT: I'm lost on step 2. Where do I edit the RAM in HxD?
You can't edit the RAM in a hex editor. Hex editors can only edit the ROM. However, I'm assuming what you meant was the offsets that point to the RAM, which you can do within the ROM. Whenever it says "point to new SEEN flags" or "point to new CAUGHT flags", you put in a pointer at that offset to the RAM offset that you're going to use. So let's say you want the SEEN flags to be stored at 0203D800, and the CAUGHT flags to be stored at 0203D860. To point to the SEEN flags, the bytes would be 00 D8 03 02. And to point to the CAUGHT flags, the bytes would be 60 D8 03 02.

And unfortunately I don't have time right now to check out the problems, since I have work and school almost every day, and I'm trying to get my sprite project finished in the little free time that I have. Whenever I finally have a freaking day off of both work and school, I'll check out the Castform problem. Unfortunately I have no idea when that will be.
 

LCCoolJ95

Limited Capacity
638
Posts
14
Years
Now we are going to replace well over 100 constants.
Go to offset xBB6AC. Starting at xBB6AC but ending before xC5000:
Search: __ 06 00 00
Replace: __ 0D 00 00.

What bytes do I put in for the spaces? And I totally understand about you being busy. It's finals week here at my college, and a lot of people are panicking about them :P
 
91
Posts
14
Years
  • Seen Feb 22, 2023
What bytes do I put in for the spaces? And I totally understand about you being busy. It's finals week here at my college, and a lot of people are panicking about them :P
You want to leave the blank ones as is.
 
40
Posts
9
Years
Hello,
Please, could you post an exemple of an entire code wich is modified.
Because i have an error and i don't know, where is the problem.
Thank you for this tutorial !

Edit : With the french version, i have not any problem to make the step one, But with an US version, the game froze after the screen "2005 nintendo..."
 
1,323
Posts
16
Years
  • Seen Dec 9, 2023
Karatekid552 will add this to G3HS once the bugs are completely squashed. You know, if you read the comments, you would've figured this out.
There's only one bug left (with 493 anyways, I'll try to expand to 721 sometime) which is the position memory thing I mentioned in an earlier post in this thread. Though I'm thinking maybe I'll try writing a routine that will adjust the position correctly. It might seem tedious when you could achieve the same effect just by finding the error, but I can't figure out why it happens, even though I've found the routine that controls it (I posted offsets earlier).

However, I will test out 721 soon because I suspect there might be a cry table glitch that was also encountered on FireRed when gogojjtech expanded it. It's not a problem when you're going for 493 but it could potentially be a problem if you want 649 or 721.
 
180
Posts
10
Years
  • Age 34
  • Seen Jan 10, 2017
At 0x152E98, put 00 48 00 47 [XX XX XX 08]. For XX XX XX 08, it's the offset you put the save block routine +0x1.
At 0x15284E, put 38 47.
At 0x15288C, put [YY YY YY 08]. For YY YY YY 08, it's the offset you put the save block routine +0x61.
At 0x0D9CC6, put 38 47.
At 0x0D9D04, put [YY YY YY 08].
At 0x0DA284, put 00 48 00 47 [XX XX XX 08].

Put a pointer to whichever set of flags comes first at x843BC.
Put 20 1C 00 00 at x8439A.
Put XX 22 at x843A0, where XX is the number of bytes taken by your dex flags.
Put 20 1C at x843A6.
Put YY 30 at x843A8, where YY is the number of bytes between the sets of flags. YY is probably the same as XX, but it doesn't have to be.
Put XX 22 at x843AC, where XX is the number of bytes taken by your dex flags.

Sorry if this seems like a stupid question, but I'm a bit unsure about this part.

I've decided that I want to expand my Pokedex with 40 extra entries.

Does that mean that I take (439 + 40)/8 = 59.875 = 60? (or should I Take (386 + 40)/8 = 53.25 = 54)

That would be XX XX XX 08 = 00 D8 03 08 and YY YY YY 08 = 60 D8 03 08 (or 53 D8 03 08)

Further: The number of bytes taken by my dex flags. Would that be Seen AND caught? i.e. 60 + 60 = 120 (then convert it to hex), or do I convert 60 to hex, or do I just write 60 straight up?

I guess my YY will be the same as my XX since I want the same amount of Pokemon and Pokedex entries?
 
1,323
Posts
16
Years
  • Seen Dec 9, 2023
Ok, I have FINALLY fixed the dex position glitch! My fix however, rather than finding the mistake, I just branch to a custom routine that undoes the mistake. To fix it, do these byte changes:

BBD94: 0E 4A
BBDD0: 9C 0F 00 02

Next, insert this routine into free space:
Code:
.text
.align 2
.thumb
.thumb_func
.global positionfix

main:
push {r0-r3}
ldr r0, .FirstCheck
ldrb r0, [r0]
mov r1, #0xFF
cmp r0, r1 /*compares .FirstCheck value to FF. If not, you're outside*/
bne Outside
b Inside

Inside:
ldr r0, .Counter1Inside
ldrb r0, [r0]
ldr r1, .Counter2Inside
ldrb r1, [r1]
cmp r0, r1
bne next1
b End

next1:
mov r2, #0x0
ldr r3, .FinalPosInside
strh r2, [r3]
b End

Outside:
ldr r0, .Counter1Outside
ldrb r0, [r0]
ldr r1, .Counter2Outside
ldrb r1, [r1]
cmp r0, r1
bne next2
b End

next2:
mov r2, #0x0
ldr r3, .FinalPosOutside
strh r2, [r3]
b End

End:
pop {r0-r3}
ldr r0, .NextRoutine
str r0, [r6]
pop {r4-r7}
pop {r0}
bx r0


.align
.FirstCheck: .word 0x02000D1C
.Counter1Inside: .word 0x02000F9E
.Counter2Inside: .word 0x02000FA0
.FinalPosInside: .word 0x02000F9A

.Counter1Outside: .word 0x02000D22
.Counter2Outside: .word 0x02000D24
.FinalPosOutside: .word 0x02000D1E

.NextRoutine: .word 0x080C1D39

And then make these byte changes:
C1808: 12 01
C1814: 00 48 00 47
C1818: XX XX XX 08 (offset of the routine +1)

This makes sure that the position is remembered if you're NOT switching dex modes. If you ARE switching dex modes (like from National to Hoenn, or vice-versa), then it will reset to Bulbasaur/Treecko (slot 0), which is intended as vanilla RSE behaves like this too.

(for those of you that didn't know, the problem I was having was that it was always resetting to Bulbasaur/Treecko even if I wasn't switching dex modes. But that has now been fixed)

I would like to say that we now have a perfect Emerald Pokédex expansion, but first I'm going to try out expanding to 721 to address any potential bugs that don't happen with just 493.
 
Last edited:

LCCoolJ95

Limited Capacity
638
Posts
14
Years
Well, I went through the whole tutorial, adding in all of the 4th gen Pokémon (and Sylveon), and I have some good news and bad news. I can explain it through a picture:
GoodandBad_zpse420bff4.png


I did a Word document, side by side with your tutorial, and I think there is one more offset you forgot to add in. The offset is not in the Gen 3 Hacking Suite ini, but it is in Pokémon Game Editor's, which I used to edit the names and order of all the Pokémon.

PokemonFrontSprites=&H301418
 
1,323
Posts
16
Years
  • Seen Dec 9, 2023
Well, I went through the whole tutorial, adding in all of the 4th gen Pokémon (and Sylveon), and I have some good news and bad news. I can explain it through a picture:
GoodandBad_zpse420bff4.png


I did a Word document, side by side with your tutorial, and I think there is one more offset you forgot to add in. The offset is not in the Gen 3 Hacking Suite ini, but it is in Pokémon Game Editor's, which I used to edit the names and order of all the Pokémon.

PokemonFrontSprites=&H301418
The reason why it's not in the Gen 3 Hacking Suit ini is because that table that PGE calls "PokemonFrontSprites" is unused by the game, as those are the single-frame Ruby/Sapphire sprites (you can confirm this by looking at Snorlax's sprite in the RS table and then Snorlax's sprite in the "PokemonAnimations" table. Snorlax actually received an entirely new front sprite in Emerald.) The table at x30A18C is the REAL front sprite table (it should have two frames per mon), and is the correct offset that both G3HS and Wichu's Tools lists as Emerald's front sprite table.
 
Status
Not open for further replies.
Back
Top