The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > ROM Hacking > Tools, Tutorials & Resources
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

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
  #1    
Old November 9th, 2012, 12:36 PM
-Cygnus-'s Avatar
-Cygnus-
It's an odyssey
 
Join Date: Feb 2011
Gender: Male
Nature: Mild
Hey everyone:

I just wanted to write up a quick tutorial for those of you interested in fooling around with gen II ROMs. I recently started Silver again on my phone, and ran into a shiny Graveler, but was disappointed that I couldn't evolve him! So instead of downloading some tool to trade him over to another game, I did what any responsible gamer would do... I changed the game! Here's what I've learned:

You will need:
  • Pokemon Gold/Silver ROM
  • An emulator
  • A hex editor
  • Basic understanding of hex/decimal conversions
  • To be comfortable around long strings of hex digits!

Now... open up the ROM in your hex editor, and jump to the offset 0x000429B3. From here until 0x00043E56 (an area 5,284 bytes long) is where every Pokemon's move and evolution data is located. It seems like a lot, but it follows a very simple and easy-to-understand pattern. Let's start at the beginning, with Bulbasaur:

Code:
01 10 02 00 01 21 04 2D ... 00
The first few bytes represent the Pokemon's evolutionary data. The first byte (01) signals what kind of evolution the Pokemon will have. 01 is code for standard, level-up evolution, so the remaining bytes until the 00 (the end of the evo data) tell the game what the conditions for the Pokemon's evolution are. In the case of a standard evolution, the second byte (10) tells the game what level the Pokemon evolves at, and the third (02) is the species that the Pokemon will evolve into. 16 in hexadecimal is 10, so Bulbasaur will evolve into Ivysaur (Pokemon index # 2) at level 16! The game then reaches the 00 byte, telling it that the Pokemon has no more evolutions.

If that was a little confusing, don't worry- moves are much easier to understand. The next bytes up until the final 00 (signifying the end of the moves and the end of that Pokemon's move/evo data) should be looked at 2 at a time. The first byte represents the level the Pokemon learns a move, and the second byte represents what move will be learned. So, for the four bytes after the evo data, we see that Bulbasaur learns move number 21, which is tackle, at level 01, and move number 2D, Growl, at level 04! The ellipsis just represents the remainder of Bulbasaur's moves, following the same format, until the 00 at the end of its data.

The Pokemon go in order from here until the end of this section, but it should be noted that they are NOT designated by their index number before their data. You kind of have to figure out based on move and evo data where each Pokemon starts and ends (or use the pointers in the section before).





Standard evolution is designated by the byte 01, so let's see the other evolution codes:
Spoiler:

00 = no evolution
00 ...
end

01 = standard level up
01 10 02 00 ...
code, level, species, end

02 = item evolution (17 = thunder, 18 = water, 16 = fire, 08 = moon, A9 = sun)
02 17 87 00 ...
code, item #, species, end

03 = trade
03 FF 5E 00 ...
code, item (FF is none), species, end

04 = happiness (01 = anytime, 02 = day, 03 = night)
04 01 19 00 ...
code, time of day, species, end

05 = stat (01 = atk > def, 02 = def > atk, 03 def = atk)
05 14 03 ED 00 ...
code, level, condition, species, end



There are several examples of each code in the ROM except condition number 05, which applies only to Tyrogue. The 00 code is most common, as it signifies there is no evolution data, thus the movelist begins immediately thereafter. Let's look at one more example:

Exeggcute and Exeggutor's Evo Data and Moves:

0 x 0004322F , 0 x 00043252
02 22 67 00 01 8C 01 5F 07 73 0D 49 13 5D 19 4E 1F 4D 25 4F 2B 4C 00 00 01 8C 01 5F 01 5D 13 17 1F 79 00


The red is the evolutionary data, and the blue is the move data. As we can see, Exeggcute evolves via item evolution (02), using a leaf stone (item 22), into Exeggutor (species 67). As for its moves, at level 1 (01), Exeggcute learns Barrage (8C) and Hypnosis (5F). At level 7 (07) it learns Reflect (73), level 14 (0D) Leech Seed (49) and so on... The move data signifies its end with an empty byte (00), and preps the game for the next Pokemon's data. Exeggutor is a final form pokemon, and as such, it's doesn't evolve. The 00 byte simply signals the end of the evo data and the start of the move data, which we can see is similar to Exeggcute's.





I hope that everyone learned something from this, and thanks for reading! Even if you're not planning on doing a full-scale ROM hack, it's nice and interesting to know how the game works. Who knows, it may even come in handy one day when you catch a shiny Onix, but want a shiny Steelix

* Thanks to Coolboyman's Gold ROM map for locations!
__________________
Spinning, whirling, still descending
Like a spiral sea unending

Last edited by -Cygnus-; November 16th, 2012 at 11:04 AM.
Reply With Quote
  #2    
Old November 13th, 2012, 11:13 PM
miksy91's Avatar
miksy91
A GB/C Rom Hacker since 2010
 
Join Date: Oct 2008
Location: A small country in the North
Gender: Male
Nature: Relaxed
Tutorials such as this have been created already but this one seems the most beginner-friendly by far. Well done!

You might want to add in the end that there is a pointer table which "evo/moves" data is followed with and originally, the pointer table points to them in an order that Bulbasaur is the first in the list, immediately followed by Ivysaur, then Venusaur, ..., until Celebi's data is reached and blank space in that rom bank begins.
Basically, the datas wouldn't have to be that way but are located in a simple way indeed.
__________________
My Rom Hack



Hacks I support





Learn how to hack GB/C games:

Check my GameBoy/Color hacking videos in Youtube
-The video set uses Pokemon Silver (U) rom for demonstrations
Reply With Quote
  #3    
Old November 15th, 2012, 01:52 PM
itari's Avatar
itari
悪魔の妹
Community Supporter
 
Join Date: Mar 2010
Location: 紅魔館
Age: 17
Gender: Male
Nature: Relaxed
Very nice tutorial.
It is very beginner-friendly, and easy to understand.

Too bad nobody will really care about it, though.
__________________
Pokémon Something Version

SubscriptAdvanced SongType Effectiveness EditorTilemap CreatorPython IPS Patcher
Reply With Quote
  #4    
Old November 16th, 2012, 11:02 AM
-Cygnus-'s Avatar
-Cygnus-
It's an odyssey
 
Join Date: Feb 2011
Gender: Male
Nature: Mild
Thanks for the support, guys.

@misky: Good idea. I hope it doesn't make it confusing, but I'll certainly draft up a little endnote to put in there.
__________________
Spinning, whirling, still descending
Like a spiral sea unending
Reply With Quote
  #5    
Old February 3rd, 2013, 08:54 AM
xutrik
Unhatched Egg
 
Join Date: Feb 2013
Gender: Male
nice tutorial i do this few monts ago ,GREAT MAN
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
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 11:39 PM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 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 - 2014 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.