![]() |
[FR] Expanding the Pokedex
In this thread, I will explain how to expand the pokedex. You will need the following:
-A GBA emulator (or flashcart if you're crazy) -An FR 1.0 English ROM -JPAN's save block hack -A hex editor -A solid understanding of hacking concepts. I won't be teaching you how to use a hex editor, or how to repoint things. If you're qualified to do this, odds are all you really need is the offsets, which is pretty much all this post is. Step 1: Get free RAM for the dex flags Spoiler:
Step 2: Repoint goddamn everything Spoiler:
Step 3: Dealing with dex entries Spoiler:
Step 4: Misc. repointing Spoiler:
|
Tested and works on another ROM, great. Thanks for the help Doesnt, really :D
Just that cries above 512 refuse to load up. It's a limit by the pointer to the cry conversion table. |
Just putting this out there, I am going to add this entire thing to my hacking suite. I was planning to release this month, but with this new development, I may need to push back the release date. I hope nobody minds.:D
|
Quote:
Well it's great to see awesome developments in hacking while I was gone. Would definitely try this out later to see if it works. |
Fantastic work Doesn't!
Good to see you've made the tutorial :) Undeniably useful entry into the hacking world. |
Nice! Will this be still okay with hacks that already worked on?
|
Quote:
|
God dammit Doesn't! Now I have to restart my hack..again, now that this tutorial has been made!
But seriously, great stuff right here. Great contributions to the hacking community. I expect hacks with expanded dexs in a few months.... |
Quote:
|
I'm having real trouble understanding this step:
Spoiler:
0x4CA is 1226 or 613 bytes. Isn't there only 412 dex entries? I have simply added to the repointed table from entry no.387 (83 01) and gone up accordingly (84 01 85 01 86 01 87 01 88 01 etc..) Is this correct? |
Okay, I'm actually not sure about this so..
So, I followed the tut up to the repointing of Names,Data and Movesets. As I was testing, I discovered that after I had caught and seen some Pokemon, then started a new game and got the Pokedex again, the data from the last save still existed. The Save-block didn't reset after starting a new game. So the only solution I can see is to delete the actual .sav file, or JPAN's hack has to be altered. Or, the solution is actually in a later part of the tutorial. |
Aaaah. My FireRed version.. I need to restart all over again D: Good work anyways.
|
Quote:
Quote:
Quote:
|
Quote:
That said, when you put it in the ROM you should take care to leave the next 28 entries blank unless you want to deal with the Egg and secondary Unown slots. Quote:
|
Quote:
|
So it turns out the dex actually doesn't get wiped until after Oak finishes his rant at the start of the game. There's a few solutions to this problem- the laziest one would be to just make a level script in the first room that uses writebytetooffset to clear out the dex flags, but we can also just repurpose existing code instead by doing the following:
(note that this requires your Seen and Caught flags to be within xFF bytes of each other) Put a pointer to whichever set of flags comes first at x549D0. Put 02 1C 20 1C 00 00 at x549b0. Put XX 22 at x549b6, where XX is the number of bytes taken by your dex flags. Put 20 1C at x549bc. Put YY 30 at x549be, 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 x549c2, where XX is the number of bytes taken by your dex flags. |
Okay, more stuff coming from me.
So, I did the changes that would reset the save block, but when I edited the bytes, lots of...strange things started happening. When I press "Start", my player's name is invisible, whenever I talk to anything, I get a bunch of blank text and gibberish, when I initiate the Oak script, the text blanks out halfway through the text and I get more gibberish. And I know that this is the changes, because if I reset those changes to the hex, everything goes back to normal. Just in case anyone can figure out what is wrong with my save block, here's some basic info: SEEN FLAG: 0203C000, CAUGHT FLAG: 0203C04B XX: either 4B or 96 YY: either 4B or 96 > (your wording was a tiny bit confusing to understand so I'm not sure which one it is) |
I typo'd the value at x549B0- it's supposed to be 20 1C, not 02 1C. Testing seems to indicate it's what's causing your problems. Sorry about that.
|
Thank you for this tutorial.... Finally, the flags views / captured ^^
|
This is amazing. Nice tutorial! ^^
If I ever start on my own hack, I'll definitely try this out. :D |
I am coding this into my program right now. I have finished step 2, but when I went to go test, OAK's intro kept crashing. I went through my code and found that the issue was caused by filling the old palette table for sprites with FF. There is a pointer at 0x130fa4 that points to an index 232 bytes in on the table. You only need to change this pointer if you fill the old table with FF.
|
Quote:
Also I found the Item animation table is at 0x45FD54 instead, and the tutor compatibility is at 0x459B7E. No rush as I'm sure people will find it anyway! :) EDIT: Sorry KK552, it was referencing the nidoranF palette, so this means when you fill your Front sprites you need to repoint the Nidoran sprite right before the palette which is at 0x130FA0 :) |
Hmm... I've tried this countless of times, but it seems that I keep repointing something wrong. And I've even gotten help from GoGo (thanks) but for some reason it just doesn't want to work! It would be great if someone could make a patch so that there are 493 slots, thanks. c:
|
Quote:
BTW, my newest program supports this. So a patch won't be needed. I'm planning a release in a few days. |
Quote:
Ah, sweet! I can't wait to test it out, been hearing a lot about it :3 |
I know you said you wouldn't explain the hex editing basics but can you post a link to some where i could learn hex editing, also how do you install JPAN's hack?
|
Quote:
And JPAN's hacked engine is as easy as applying the patch then using the tool to customize. |
How do i know what numbers to type and where to type them, also i downloaded goldfinger but what hex editor would you recommend?
Thanks |
Quote:
|
Sorry for being annoying but how do i patch the hack onto fire red?
oh, and thank you for all the help. |
Quote:
|
so i only need to patch it?
You were doing the 649 patch right, how do i download it to try it out? |
Quote:
To patch the hacked engine onto FireRed, download a patching tool like LunarIPS or SmartIPS, then use them to apply the patch to the rom. (the method of applying the patch using a program like that might vary, I'm not sure really.) Or download JPAN's hack applier tool and use it to apply all the hacks (or whatever ones you want to apply) onto a rom. I hope that helps. ^^ |
Quote:
|
Good tutorial but how to you install the save_block_recycle hack to fire red?
I did hex work before and programming but i don't get it. Im using Hex Workshop as a hex editor. EDIT: Ok i read the above posts but i cant find JPAN's hack applier tool and Lunar and smart IPS need a ips file to work! EDIT AGAIN: Ok i found JPAN's applier tool but when i apply the patches my maps are messed up!! Is there An other way of doing this? And sorry that im kind of annoying right now. |
Quote:
|
Quote:
A link is better for those who want to download it ;D |
Jpan's save block hack for the expanded seen/caught flags doesn't break GBA flashcart compatibility right?
Oh, and congrats Doesn't! I'm very happy to see that the expanded pokedex will be a reality. :) |
Quote:
|
Very nice tutorial. Might give it a try someday when I work up the courage! LOL
I'm surprised someone hasn't created a tool for this yet though, that does all this for us, as well as a tool fort adding extra Pokémon and types to the games so we don't have to go through and fiddle with all the hex code manually ourselves. Would be nice to have a tool where we can just import an image for the new type, define a name, type weaknesses and strengths, and everything else a type needs, and then the tool to auto-find free space in the rom and add the newly made type(s) in. Same for adding Pokémon and expanding the Pokédex. Or would such tools be too difficult to make? Don't pay any attention to me LOL I'm just dreaming aloud {XD} |
Quote:
|
Quote:
I do like the idea of expanding types in my tool also. Only, if I am going to do it, I need a clean way to do it on RSE without breaking contests. |
What a gem of a program that is :)
I like the fact that the program searches for free space, so one doesn't have to do so manually. |
Can i add fairy type after useing your III GEN tool to add more pokemon?
|
Quote:
|
So, I think we should stop discussing my tool on this thread. This thread is for this tutorial, which my tool directly followed, so that was the only reason I brought it up. Now we should get back on topic. Okay guys?
|
I'm not really looking to expand the total amount of Pokémon in the game in general, though, but rather to raise the number of entries in the Kanto Pokédex to something above 151.
Is there a tool that does this? |
Quote:
|
Just curious... Anyone who has expanded these entries have a broken 'Trader ADvanced'? I would like to edit this trades but since the expansion, all my back ups have this tool broken.
|
Quote:
|
Quote:
|
Quote:
|
Oh well, I ran into quite a few problems, first of all I'm trying to port this to emerald, so I guess that's just one reason why I have so many issues, anyways I thought you might be able to help me out(Since I can't directly contact the autor :T)
I repointed everything until I reached the Pokédex and allocated enough memory, I also relocated some globalVars which the dex is apparently using which would otherwise conflict with the new pkmn data, now after deoxys I have a few strange random entries, those are mainly unknowns(I mean entry 0); Those go up to 412, and then my entries start. I also don't know how exactly the ordering table works(Seriously, this thing confuses me); Here are the revelant entries of my list, I tried a few things so this might be far from correct, maybe you can help me out: 66 01 (Last entry in normal Dex) BE 05 BF 05 C0 05 C1 05 C2 05 C3 05 C4 05 C5 05 C6 05 C7 05 C8 05 C9 05 CA 05 CB 05 CC 05 CD 05 CE 05 CF 05 D0 05 D1 05 D2 05 D3 05 D4 05 D5 05 D6 05 D7 05 D8 05 D9 05(With those I tried to skip the strange thingies in my dex) B9 01 BA 01 BB 01 BC 01 BD 01 BE 01 BF 01 C0 01 C1 01 (My new entries beginning with 441d) I don't know whats wrong, maybe its just that emerald has a completely different structure, that's what I noticed when reallocating the memory at least. Thanks in advance! ~SBird |
Quote:
|
Can you make an version of this Tutorial for Pokemon RSE?
|
Quote:
It just enough to find the different offsets. After the question is whether one can easily adapt the JPAN Save Block on Emerald because there the RAMs these two versions are not very similar. Tomorrow, if I have time, maybe I will find offset the Emerald and the "JPAN Save Block Emerald". EDIT : Oh, and I've forget the small changes by ASM. |
Quote:
It will require some extreme research, since RS and Em are in NO way the same |
I'm just curious, would porting this to Emerald be easier or harder, assuming you did the same amount of research? The pokedex for Firered was different after all, with habitats and everything, whereas Emerald was just a straight list of Pokemon.
|
Quote:
Then you'd have to research the dex, because its loading and storing is most likely 100% different from Fire Red's. Ruby would just take years because it's so unorganized. |
I just want to add that this took months to accomplish even with years of research to start on. So take that and go into an almost completely unresearched rom (in this area at least) and it will take a while, a long while.
|
Quote:
|
Quote:
|
In fact, I've never worked on Ruby or Sapphire, but I was convinced that the construction of the game had great common with Emerald. Excuse me x).
|
Okay okay okay, I state this again: I did most of the research for emerald, I am also willing to post the data for it, actually I already posted my ported version of JPANs Save Block Recycle Hack somewhere in RD, for the german version of emerald I guess, it can be ported easily. I also repointed all of the required tables, for emerald you have to do some additional work, which would be: The second sprite table, containing all of the animated sprites(I don't know if the other one is even used, since there is only one pointer to it it could very well be deadcode); And the sprite animation table(The movements pokémon do when they are summoned) You can find the information in a common editors ini file or research them yourself. Also, there are several versions of malloc and free, whereas we are only interested in malloc. In emerald they use a version of it which instantly cleans up the memory space it provides you. It is locaded at: 0x08000b4c, I guess this is global for all of the roms, since those header adresses are compiled instantly. There is also an ldr instruction which is allocating the memory for emerald: 0x080BB65A (BPED, german), however afterwards follow a few routines which load global pokédex variables in a form of "ldr malloced_base + 0x6XX" and if you have too many Pokémon you will overwrite those and run into severe problems. Therefore you have to relocate them, as for me I wrote a quick tool to do that, just search for 4-aligned words in an area which I guess contains all of the routines and adding a static value to them. That for the memory in emerald...
There is also a very similar limiting thingie in emerald, a simple bhi instruction you can just bypass with 0x0000; It was posted for BPEE somewhere already, for BPED its 0x0806D430. Now for the interesting part, I have no clue what to do about the amount of pokémon that is loaded into the dex, there is something at 0x080BC94A, which loads a global variable onto the stack, using mov and lsl, if you do change that it will load more pokémon, you also have to change some statics like in Firered, but I don't know exactly which ones and as I said above between Deoxys and 412d there is weird data loaded into my dex... Thats the problem I am facing currently, concerning emerald, the rest can be done "fairly" easily. Did someone look at my national order table and can tell me if it's correct or how it has to look like? I am kind of sure this is not the problem, but anyways, it is somehow strange, you know. ~SBird Edit: The save block thingie: http://www.pokecommunity.com/showthread.php?t=306202 You can probably easily port it to BPEE, but you want to use different adresses, I recommend 0x0203d000 ff; Also if we discuss on emerald for longer(which I would be interested in, should'nt we go to RD? Just asking. |
Quote:
If you guys do manage to pull this off, I promise that I will code it. |
Quote:
Aside from that typo, you'd have to test the JPAN save block hack on real hardware. I have a DSTWO, so maybe I can try it out for you. |
Quote:
When we say real hardware, specifically it is using a BIOS file, not actually hard, pushable buttons.:P |
Quote:
|
Quote:
I believe Jambo51 once said that Emerald's Pokédex is just as messed up as Ruby/Sapphire's, in the sense that it doesn't use the malloc system and that the pointers are hard coded and near-impossible to find. Jambo51 has tried expanding Ruby's Pokédex and he has stated that it is pretty much impossible because of how messy the coding is. Not trying to be a party-pooper, as I would love to hack Ruby/Emerald as I have in the past, simply because I just like it more. |
@Chaos Rush: Party hard:
Spoiler:
Emerald does use malloc, the thing is just that the global variables are linked in the form of "BASE_ADRESS + X" meaning you have to find A LOT of those and some are hard-hard-coded (or something^^) meaning that the compiler did not export the exact adress but only a mov-lsl instruction, which is good for saving space and bad for romhackers. So yeah, it is possible, it is just some work but I am not willing to give up (by now) ~SBird |
Quote:
|
@Karatekid: Thats about what I did, what I did not so far is checking if those were the right ones, probably I am replacing a bit too much at the moment hehe... Also there are some I can't find just that way, because the offsets are even enough for the compiler to insert them via. mov/lsl. I guess I found all of them, because my dex is now working just fine, and I'll let you guys know if it really worked after some testing. If someone wants to do the same thing here is what I did so far:
-Repoint the national order table and moved the 25 slots between jotho and hoeen backwards, filling in 00 00 after the hoeen dex and creating the order for my new mons. -Allocate 0x2000 bytes for the pokédex(You can probably do less) -Kill the limiter which loads the dex data -Add 0x700 to every 0x000006XX word I could find in the area that I think is the pokédex routines. -Add 1 to each lsl rd, rm, #X instruction that I found out is responsible for the dex's global variables. I checked those with a debugger, so they are definitely it and I don't think there are more, since the dex is working just fine now., As ofr the 6XX stuff I wrote a quick program to do it, as karatekid already said. This was definitely easier, but I don't know if the stuff I changed really only affects the dex, and nothing else. I definitely chose a big area(0xbB6dc - 0xf0000) So yeah, to conclude: Emerald is a lot harder, but it's not impossible! ~SBird |
Quote:
Also, I would make a list of changes (I'm sure you already did) and go through them slowly. You never want to replace too much. Check the surrounding areas for anything Pokedex related and then keep working. There shouldn't be more than about 10 changes (even that is a stretch) so yeah. Edit: I just had a great idea! Keep a public Google doc and link to it here, so that we can follow your progress and then help you. don't allow the world to edit, just comment. |
Hate to bump but here are some glitches I have noticed...
When you received an extended mon from a trade (eg Arceus for Giratina) then when you receive Giratina it has Arceus' (what's the plural form? haha) palette. Also when I catch a wild Buizel, ONLY on the screen it displays say Ratatta, it then registers Buizel in the Pokedex and Ratatta does not get registered. It really doesn't bother me... just wondering if others experience this? |
Quote:
|
Quote:
When I messed around with habitat data myself before your tool came out, I noticed that no matter what Pokemon I caught, it'd display the first page of the first habitat. I think that's why it's showing Rattata, because Rattata'd be the first pokemon in the grassland. My worry is that there's some sort of byte somewhere in the midst of the habitat data that when expanded, repointed or rearranged leads to catching problems. (This was actually one of the glitches that got me started on ASM, I just haven't looked into it since.) |
Even if nobody trades with each other, it's going to be an important issue for ingame trades, and should be fixed if you leave in the possibility for the player to trade at all.
|
Is it possible to port this to another ROM, say, Ruby?
Also, can you please post the methods you used to obtain your offsets (like the offset containing the amount of memory assigned for the Pokédex, I certainly haven't found that in any INIs) so that others can try porting this to other ROMs? |
Quote:
|
But why do not take an courage and start changing system from messy code to Maloc system. For example exported from Emerald.
|
Quote:
No, it is not that easy. That would be removing and porting about 1000 lines of code or more in raw ASM to another game in a way where it might not even work. It would be easier to write a completely new Pokedex in C and insert it. |
Quote:
The truth is, I've been busy with school, karate, family, and I have been trying to learn how to program in my free time because...I'm going to try and port this, over to Emerald...well, not really port, but give Emerald its own version. SBird has it working for a German Emerald ROM, so why can't it work for an English Emerald ROM? So, I've been learning how to ASM program and a little bit of C++. @Ksiazek Bartlomiej, I'm not trying to flame you or anything, I'm just saying, you should really look into ASM programming. I looked at it for a brief few minutes. It looks hard at first, but it's pretty simple if you get a handle on it |
Quote:
|
This could be a huge bug if other are getting this, but Eggs won't hatch when given to the player.
|
It turns out there are two pointers to x254795 in the ROM, which is the 18th byte of the first entry of the base stat table. This is what's causing the eggs to not hatch- they're actually working fine, they just have a nonsensically high number of cycles needed to hatch. I'll add this to the OP real quick. (existing rock eggs won't be fixed because cycle count is determined at egg gen)
|
Quote:
|
It's the 18th byte, or byte #17 if you start counting from zero. Sorry about that.
|
Quote:
|
Quote:
This is the routine that handles converting the internal ID into the cry ID, taken from knizz' disassembly and commented by me: Code:
Editing this routine to remove the hardcoded cry for the limbo slots is easy: write 00 00 00 00 00 00 00 00 00 00 (that's ten bytes) to x4330C and 00 00 00 00 (four) to x43318, then repoint the table at x4539D4 and expand it - it's now a table with one word for every ID. (You can test to make sure that it worked without repointing the table - you'll know it worked if the title screen makes Blaziken's cry.) |
Yeah well I have a question about this, if anyone could answer it then great.
I made a thread about it in the beginner's lounge, so here it is. http://www.pokecommunity.com/showthread.php?t=325967 or Spoiler:
|
I'm new to this, how do I use the JPAN block changer?
|
Quote:
|
Got 1 more question: what value do I make the SEEN/CAUGHT pointers?
|
I'm unsure if I should post this in G3HS' thread, but I myself have tried to go backwards from what the tool has done and nothing appears to be amiss.
The extended Pokémon in my ROM have broken altitudes, basically. If I change the value to be > 0, the shadow displays, but the sprite stays where it is. If I set it to 0, the shadow disappears, so that is working. However, regardless of the value, the sprites remain "stuck" to the ground. I've tried re-repointing the altitude table, the 03 E0 byte changes on the OP have been done successfully, and it's obviously registering that there is an altitude value, it just isn't using it. http://i.imgur.com/hn7STuM.png I've also tried editing the altitude using Advanced Series and simply using a hex editor, so the value is definitely changing. I feel like I'm missing a limiting byte or something, but I can't seem to find what it is exactly. This only happens to the extended Pokémon in my ROM: with Chimecho, it's fine, but with Turtwig, it doesn't work. |
Try putting 06 E0 at x74788.
|
Quote:
|
Quote:
|
my english is not good, and I can not understand the steps. you can make a video tutorial for me? thanks
|
Doesnt himself told me this so I'm just going to post it here so I don't have to save it somewhere:
For FireRed, to fix cries on expanded mons that use a cry index of higher than 0x200, put 01 1C 11 E0 at x720CA. |
Quote:
|
| All times are GMT -8. The time now is 8:12 PM. |
![]()
© 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.
Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.