Go Back   The PokéCommunity Forums > ROM Hacking > Tools, Tutorials & Resources
Reload this Page [Tutorial] [Emerald] Expanding the Pokédex

Notices
For all updates, view the main page.

Tools, Tutorials & Resources Various tools to help you develop your hacks can be found here.
New threads in this forum are to be approved by a moderator before they are displayed.



Reply
 
Thread Tools
  #26    
Old May 6th, 2014 (07:45 AM).
Edwearth's Avatar
Edwearth Edwearth is offline
 
Join Date: May 2014
Location: Paris
Gender: Male
Posts: 38
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 !
Reply With Quote
  #27    
Old May 6th, 2014 (10:48 PM).
ShyRayq's Avatar
ShyRayq ShyRayq is offline
Unprofessional Unprofessional
 
Join Date: Aug 2007
Gender: Male
Nature: Adamant
Posts: 885
Quote originally posted by Edwearth:
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?
__________________
3DS Friend Code: 5069-3944-3902
IGN: Peter, (Pokemon Y, Pokemon OR)
Friend Safari: (Fighting) Throh, Meditite, Breloom
Live Pokedex (Y) Completed as of 02/03/14 (718), 10/11/14 (719)
Live Pokedex (OR) Completed as of 25/12/14 (719)
Big thanks especially to DestinedJagold, Xerneas_X, Elements1 and ~RNC~

PM me if you want to trade, or add my FC.
Reply With Quote
  #28    
Old May 10th, 2014 (06:56 PM). Edited May 11th, 2014 by LCCoolJ95.
LCCoolJ95's Avatar
LCCoolJ95 LCCoolJ95 is offline
Limited Capacity
 
Join Date: May 2009
Location: The World That Never Was
Age: 20
Gender: Male
Nature: Naive
Posts: 263
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?
__________________
"The greatest obstacle in life is Yourself. Overcome it, and you will achieve the greatest accomplishment of all." -Art Beins, 1982

Pokémon Emerald 650 (Resource Patch): http://www.pokecommunity.com/showthread.php?t=346694
Pokémon Theta Emerald: http://www.pokecommunity.com/showthread.php?t=349258
Reply With Quote
  #29    
Old May 11th, 2014 (09:05 PM).
Chaos Rush's Avatar
Chaos Rush Chaos Rush is offline
im sexy and i know it
 
Join Date: May 2007
Location: Taylor Swift
Gender: Male
Nature: Adamant
Posts: 1,282
Quote originally posted by LCCoolJ95:
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.
__________________
Reply With Quote
  #30    
Old May 13th, 2014 (09:01 AM).
LCCoolJ95's Avatar
LCCoolJ95 LCCoolJ95 is offline
Limited Capacity
 
Join Date: May 2009
Location: The World That Never Was
Age: 20
Gender: Male
Nature: Naive
Posts: 263
Quote originally posted by Chaos Rush:
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
__________________
"The greatest obstacle in life is Yourself. Overcome it, and you will achieve the greatest accomplishment of all." -Art Beins, 1982

Pokémon Emerald 650 (Resource Patch): http://www.pokecommunity.com/showthread.php?t=346694
Pokémon Theta Emerald: http://www.pokecommunity.com/showthread.php?t=349258
Reply With Quote
  #31    
Old May 13th, 2014 (01:23 PM).
SBird SBird is offline
 
Join Date: Aug 2009
Gender: Male
Posts: 62
Quote originally posted by LCCoolJ95:
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
You want to leave the blank ones as is.
Reply With Quote
  #32    
Old May 20th, 2014 (01:26 PM).
Edwearth's Avatar
Edwearth Edwearth is offline
 
Join Date: May 2014
Location: Paris
Gender: Male
Posts: 38
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..."
Reply With Quote
  #33    
Old May 20th, 2014 (02:33 PM).
Chaos Rush's Avatar
Chaos Rush Chaos Rush is offline
im sexy and i know it
 
Join Date: May 2007
Location: Taylor Swift
Gender: Male
Nature: Adamant
Posts: 1,282
Alright, I've finally fixed the Castform problem. Make these byte changes:
x42730: 81 01
x5DF10: 81 01
x6F100: 81 01
xA5EA4: 81 01
__________________
Reply With Quote
  #34    
Old May 22nd, 2014 (12:11 PM).
AtecainCorp.'s Avatar
AtecainCorp. AtecainCorp. is offline
Rejishan awake...
 
Join Date: Jun 2008
Location: Takoabe Town (Region Thonsu)
Age: 22
Gender: Male
Nature: Hardy
Posts: 667
Someone can port Expanding Emerald Pokedex to one tool? It was more easier for hackers than write an source code.
__________________
POKEMON RUBY RENEV - http://www.pokecommunity.com/showthread.php?t=341964
Reply With Quote
  #35    
Old May 22nd, 2014 (12:45 PM).
HidoranBlaze's Avatar
HidoranBlaze HidoranBlaze is offline
 
Join Date: Apr 2013
Age: 18
Gender: Male
Posts: 250
Quote originally posted by Ksiazek Bartlomiej:
Someone can port Expanding Emerald Pokedex to one tool? It was more easier for hackers than write an source code.
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.
Reply With Quote
  #36    
Old May 22nd, 2014 (08:50 PM).
Chaos Rush's Avatar
Chaos Rush Chaos Rush is offline
im sexy and i know it
 
Join Date: May 2007
Location: Taylor Swift
Gender: Male
Nature: Adamant
Posts: 1,282
Quote originally posted by HidoranBlaze:
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.
__________________
Reply With Quote
  #37    
Old May 23rd, 2014 (09:47 PM).
mamamama mamamama is offline
 
Join Date: Feb 2014
Posts: 163
Quote originally posted by Chaos Rush:
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?
Reply With Quote
  #38    
Old May 24th, 2014 (11:34 AM). Edited May 24th, 2014 by Chaos Rush.
Chaos Rush's Avatar
Chaos Rush Chaos Rush is offline
im sexy and i know it
 
Join Date: May 2007
Location: Taylor Swift
Gender: Male
Nature: Adamant
Posts: 1,282
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.
__________________
Reply With Quote
  #39    
Old May 25th, 2014 (02:00 PM).
LCCoolJ95's Avatar
LCCoolJ95 LCCoolJ95 is offline
Limited Capacity
 
Join Date: May 2009
Location: The World That Never Was
Age: 20
Gender: Male
Nature: Naive
Posts: 263
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:


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 greatest obstacle in life is Yourself. Overcome it, and you will achieve the greatest accomplishment of all." -Art Beins, 1982

Pokémon Emerald 650 (Resource Patch): http://www.pokecommunity.com/showthread.php?t=346694
Pokémon Theta Emerald: http://www.pokecommunity.com/showthread.php?t=349258
Reply With Quote
  #40    
Old May 25th, 2014 (06:37 PM).
Chaos Rush's Avatar
Chaos Rush Chaos Rush is offline
im sexy and i know it
 
Join Date: May 2007
Location: Taylor Swift
Gender: Male
Nature: Adamant
Posts: 1,282
Quote originally posted by LCCoolJ95:
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:


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.
__________________
Reply With Quote
  #41    
Old May 25th, 2014 (06:47 PM).
HidoranBlaze's Avatar
HidoranBlaze HidoranBlaze is offline
 
Join Date: Apr 2013
Age: 18
Gender: Male
Posts: 250
Quote originally posted by LCCoolJ95:
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:


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
I think the real issue is that Wichu's Sprite Editor assumes that 00 bytes are free space for Emerald: I actually confirmed this just now by putting the start offset as 0xDE4018. The 00 bytes were overwritten instead of the FF bytes. That probably screwed up your rom.
Reply With Quote
  #42    
Old May 26th, 2014 (07:14 AM).
LCCoolJ95's Avatar
LCCoolJ95 LCCoolJ95 is offline
Limited Capacity
 
Join Date: May 2009
Location: The World That Never Was
Age: 20
Gender: Male
Nature: Naive
Posts: 263
Quote originally posted by Chaos Rush:
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.
Oh wow, really? I just checked that out. It's a small difference looking at the sprites, but they are different.

Quote originally posted by HidoranBlaze:
I think the real issue is that Wichu's Sprite Editor assumes that 00 bytes are free space for Emerald: I actually confirmed this just now by putting the start offset as 0xDE4018. The 00 bytes were overwritten instead of the FF bytes. That probably screwed up your rom.
Ahh, okay.

Well, in all honesty, I just did this as a test, since this was my first time doing it. I'm just excited to see that it actually worked out. Not to the highest degree, but it worked. So...what happens now?
__________________
"The greatest obstacle in life is Yourself. Overcome it, and you will achieve the greatest accomplishment of all." -Art Beins, 1982

Pokémon Emerald 650 (Resource Patch): http://www.pokecommunity.com/showthread.php?t=346694
Pokémon Theta Emerald: http://www.pokecommunity.com/showthread.php?t=349258
Reply With Quote
  #43    
Old May 26th, 2014 (12:29 PM).
Salamence™'s Avatar
Salamence™ Salamence™ is offline
Gen 3♥
 
Join Date: Apr 2013
Location: On earth
Gender: Male
Nature: Calm
Posts: 113
Thank you chaos now i dont need the Expand tool that krk552 made :D
__________________
ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ
Reply With Quote
  #44    
Old May 27th, 2014 (05:35 AM).
Edwearth's Avatar
Edwearth Edwearth is offline
 
Join Date: May 2014
Location: Paris
Gender: Male
Posts: 38
Could you post a patch please ?
Reply With Quote
  #45    
Old May 28th, 2014 (07:43 AM).
Salamence™'s Avatar
Salamence™ Salamence™ is offline
Gen 3♥
 
Join Date: Apr 2013
Location: On earth
Gender: Male
Nature: Calm
Posts: 113
Quote originally posted by Edwearth:
Could you post a patch please ?
you dont need a patch
when you can do it by yourself....
__________________
ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ
Reply With Quote
  #46    
Old May 28th, 2014 (01:15 PM).
Edwearth's Avatar
Edwearth Edwearth is offline
 
Join Date: May 2014
Location: Paris
Gender: Male
Posts: 38
Quote:
when you can do it by yourself....
I have too many problems to make it. So i want to make a comparison. I think with the exemple, i can understand.
Reply With Quote
  #47    
Old May 28th, 2014 (02:01 PM).
Chaos Rush's Avatar
Chaos Rush Chaos Rush is offline
im sexy and i know it
 
Join Date: May 2007
Location: Taylor Swift
Gender: Male
Nature: Adamant
Posts: 1,282
I just want to say that I can confirm everything in the tutorial is correct and all you need, as I'm working on a 721 ROM base and got the Pokédex working solely from the information provided in this tutorial (proof at romhack.me). Also karatekid552 will eventually send me a test version of his tool with Emerald Pokédex expansion implemented, and will become official once it's been tested thoroughly.
__________________
Reply With Quote
  #48    
Old May 28th, 2014 (03:45 PM).
mamamama mamamama is offline
 
Join Date: Feb 2014
Posts: 163
So, I would just like to double confirm something before I move on and start to add sprites/movesets etc.

I have successfully manged to get all this done. I now have 40 extra slots after Chimeco and repointed every single table. Each table contains the amount of bytes written in the tutorial + (40 x needed bytes depending on table) at the end of each table.

I have made all this assuming that the amount of dex entries should be 387 + 40 = 427.

What about those Unown/Egg slots? Was I supposed to account for those when I repointed each table, that is The old table + the weird slots + my new extra slots making the total 68 ([439 - 411] + 40).

When I edit my mons in the Hacking Suite, should I write that I have 427 mons or 479 in the ini (and thus skip 412 - 439). If I changed sprite and edited some stats on 412, have I ruined the game and need to start over from my last backup or can I fix it?
Reply With Quote
  #49    
Old May 28th, 2014 (05:54 PM).
Chaos Rush's Avatar
Chaos Rush Chaos Rush is offline
im sexy and i know it
 
Join Date: May 2007
Location: Taylor Swift
Gender: Male
Nature: Adamant
Posts: 1,282
Quote originally posted by mamamama:
So, I would just like to double confirm something before I move on and start to add sprites/movesets etc.

I have successfully manged to get all this done. I now have 40 extra slots after Chimeco and repointed every single table. Each table contains the amount of bytes written in the tutorial + (40 x needed bytes depending on table) at the end of each table.

I have made all this assuming that the amount of dex entries should be 387 + 40 = 427.

What about those Unown/Egg slots? Was I supposed to account for those when I repointed each table, that is The old table + the weird slots + my new extra slots making the total 68 ([439 - 411] + 40).

When I edit my mons in the Hacking Suite, should I write that I have 427 mons or 479 in the ini (and thus skip 412 - 439). If I changed sprite and edited some stats on 412, have I ruined the game and need to start over from my last backup or can I fix it?
In the Gen III games, there are 439 Pokémon slots, and 386 dex entries (387 if you count 0). Meaning that if you are adding Pokémon, the first one you add should be slot 440. If the first Pokémon you added is slot 412, then you did something wrong. HOWEVER, the base stat table, the moveset table, and the Pokémon names table only goes up to 411 (Chimecho), so you have to account for the Unown slots when expanding those. The sprite/palette tables go up to 439.

The dex slots alone, however, are separate from the index numbers. So in your case, you should have 479 index number slots, and 427 dex slots. You should put 479 in the ini.

If you edited slot 412, then that is a problem, because that's the Egg slot (or Unown A? I forgot, but it's one of those).
__________________
Reply With Quote
  #50    
Old June 18th, 2014 (04:11 PM).
Chaos Rush's Avatar
Chaos Rush Chaos Rush is offline
im sexy and i know it
 
Join Date: May 2007
Location: Taylor Swift
Gender: Male
Nature: Adamant
Posts: 1,282
This is minor, but for those of you that know about the cry table and expanded mon, any Pokémon that uses a cry ID of 0x200 or higher won't play. To fix it, simply put 01 1C 11 E0 at xA35A2.

Credit to DoesntKnowHowToPlay for the FireRed offset, which I used to find the Emerald offset.
__________________
Reply With Quote
Reply
Quick Reply

Sponsored Links
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are UTC -8. The time now is 03:21 PM.