PDA

View Full Version : [Tutorial] Pokemon Gold/Silver: Editing Moves/Evo Data

-Cygnus-
November 9th, 2012, 12:36 PM
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:

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:

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 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!

miksy91
November 13th, 2012, 11:13 PM
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.

November 15th, 2012, 1:52 PM
Very nice tutorial.
It is very beginner-friendly, and easy to understand.

Too bad nobody will really care about it, though.

-Cygnus-
November 16th, 2012, 11:02 AM
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.

xutrik
February 3rd, 2013, 8:54 AM
nice tutorial i do this few monts ago ,GREAT MAN