Alright, gang... learning from Ralf himself on how to hack, I think it's finally time I teach you the art of Evolution hex editing. For today's example, we're going to make a Metapod evolve as a Butterfree at Lv. 6, learn how to make it evolve into a Scyther at Lv. 10 instead of Butterfry. There are actually three parts to my lesson, and there are two ways to get this done, in order to access the game's evolutionary tables...
Code: Select all
Pokemon ID * 0x0124 + 0xB42B68 + 0xA6 =
Pokemon ID * 0x0124 + 0xB42C0E =
For this example, we will use the second calculation. However, it does not matter which one you pick; the result should still be the same. Now, this is how we access Metapod's evolutionary table...
Lesson #1: Making Metapod evolve into Butterfree earlier.
Code: Select all
0xB * 0x0124 + 0x02B42C0E + 0x2 = 0x02B4389C
Now, this line of numbers, 04 00 00 0A 00 0C tells the game what level, what Stone, what condition, whether or not happiness is needed, and what the Pokemon evolves into. These are from lines 0xB4389A - 0xB4389E... but let me strongly emphasize that on 0xB4389E and 0xB4389F, for now,
DO NOT EDIT THIS LINE. We will touch on this later, but for now,
DO. NOT. TOUCH. THIS LINE. I'll explain why when it becomes relevant. Understood? Good, let's move on. This warning also applies to lines 0xB4389A and 0xB4389B, and again, I will discuss why when it is relevant.
In order to make it a code, all we have to do is edit the required level... which is on Line 0xB4389C, about +2 spaces from 0xB4389A, Now, we want Metapod to evolve sooner than it can, right? Well, it works like this... 0xB4389C becomes 02B4389C... now, we want Metapod to evolve at Lv. 6.
Code: Select all
Metapod evolves into Butterfree at Lv. 6 [Ichiyanagi2]
02B4389C 00000006
From this, we can assume that Metapod will evolve into Butterfree at Lv. 6, four levels earlier than it normally would. Now, that's the end of the first lesson.
Lesson #2: Making Metapod evolve into a Scyther at Lv. 10.
Remember those two lines I told you to avoid and emphasized that you should do so back in Lesson 1? 0xB4389E and 0xB4389F? Well, now I can finally tell you why: those two lines tell the game what Metapod evolves into after meeting the requirements. So, now we want Metapod to evolve into Scyther, correct? Let me explain how to do this...
0xB4389E is for Pokemon in the 01 section. Scyther's hex is not located within the 100's section, so we leave this line alone. However, at 0xB4389F , we need to change that 0C into 7B. This is how that would look like in code format... replace that "x" with a 2.
Code: Select all
Metapod evolves into Scyther at Lv. 10 [Ichiyanagi2]
02B4389E 0000007B
Now, when Metapod evolves at Lv. 10, it should become a Scyther. Now, onto the final lesson.
Lesson #3: Inserting new ways to evolve Metapod into Butterfree and editing the old one into new ones.
There's actually two parts to this lesson: the first part is editing the current way Metapod evolves into Butterfree rather than evolving into Butterfree at Lv. 10 and the second part is adding another evolutionary method altogether. For the first example, let's say we want a Metapod that evolves into Butterfree via Leaf Stone. 02B4389A and 02B4389C are all involved in this Method. For what 0xB4389A does, it tells us what requirement is needed for Metapod to evolve into Butterfree, and as you know, 0xB4389C is what item or level is needed for Metapod to evolve if applicable.
Before we make the code, let's understand what these evolution methods are...
Evolutionary requirements (If they are in cerulean + bold, they are useless in Colosseum/XD/FireRed/Leafgreen along with a reason why):
- 00: No evolution method.
(A Pokemon who has this cannot evolve into anything. A lot of Pokemon use it.)
01: Evolve via high/max Happiness.
(This requirement is exactly what it says on the tin: you need to heighten/max out happiness for the Pokemon in question to evolve. Pokemon like Togepi and Golbat use this byte.)
02/03: Evolve via high/max happiness at day or night
(These requirements are similar to 01, but they evolve via a time system with high/max happiness. However, they are useless in games that do not employ the time system.)
04: Level
(This requirement allows a Pokemon to evolve whenever they reach a certain level.)
05: Trade
(This requirement allows a Pokemon to evolve whenever they are traded from one trainer to another. Pokemon like Graveler or Machoke use this byte.)
06: Trade with Item
(Like in 05, the Pokemon has to be traded, but this alone is not enough; you need the Pokemon to hold a certain item to have it evolved after it is traded over, e.g. Seadra with a Dragon Scale, Onix with a Metal Coat.)
07: Item usage
(This requirement allows a Pokemon to evolve after a certain item has been used on it, e.g. Poliwhirl into Poliwrath after using a Water Stone.)
08: Atk > Def
(When a Pokemon's Attack stat is greater than its' Defense stat, and has met the required level if any, the Pokemon will evolve, e.g. Tyrogue into Hitmonlee.)
09: Atk = Def
(When a Pokemon's Attack and Defense stats are balanced, and again evolving at a level if applied, it will evolve, e.g. Tyrogue into Hitmontop)
0A: Atk < Def
(When a Pokemon's Defense stat is greater than Attack, and once the required level is met, the Pokemon will evolve, e.g. Tyrogue into Hitmonchan)
0B: Personality Value < 5
(If a Pokemon's personality value is calculated to be < 5, then it will evolve or evolve into one form, e.g. Wurmple into Silcoon if PV < 5.)
0C: Personality Value ≥ 5
(The opposite of 0B, if a Pokemon's personality value is ≥ 5, then it will evolve or evolve into one form, e.g. Wurmple into Cascoon if PV ≥ 5)
0D & 0E: Allow Pokemon Creation and Create Extra Pokemon
(If a Pokemon has evolved, then it will allow 000E a new Pokemon to be created in the sixth slot as long as you have an empty Poke Ball in your bag, e.g. Nincada evolves into Ninjask, but leaves behind a Shedinja after evolving.)
0F: Max Beauty.
(Allows the Pokemon to evolve when maximum Beauty has been reached. However, this method is useless in games that does not employ the Beauty stat.)
10: Evolve via Max happiness and with a certain Item/Key Item in the bag. [Pokemon XD only]
(With an item in the bag and when the Pokemon has obtained max happiness, it will evolve upon leveling up. This is the byte that replaces bytes 02 & 03 for Eevee evolving into Espeon and Umbreon since no day/night system exists.)
Now, that we understand how 02B4389A works, what method it employs dependent on the hex in the slot, let's make that Leaf Stone code...
Code: Select all
Metapod evolves into Butterfree via Leaf Stone [Ichiyanagi2]
02B4389A 00000700
02B4389C 00000062
After we apply this code to the game, no longer should Metapod evolve into Butterfree at Lv. 10. You should now need a Leaf Stone to make it happen; level being utterly irrelevant.
Now, let's have it evolve into Scyther via Leaf Stone. This is where you're going to need the third line, in this case 02B4389E...
Code: Select all
Metapod evolves into Scyther via Leaf Stone [Ichiyanagi2]
02B4389A 00000700
02B4389C 00000062
02B4389E 0000007B
Just like before, you need to have and use a Leaf Stone in order to evolve Metapod into Scyther, and like before, level doesn't matter. Now, let's add an entirely new way that Metapod can evolve... now, let's say we want Metapod to evolve into Butterfree via using the Leaf Stone or evolve it the way it's been programmed: at Lv. 10... you need to move 6 spaces away, and from B438A0 - B438A6, there are 00's here. Now, it's absolutely important you edit line B438A6, otherwise the evolution will not work...
Code: Select all
Metapod evolves into Butterfree via Lv. 10 or with a Leaf Stone [Ichiyanagi2]
02B4389A 00000400
02B4389C 0000000A
02B4389E 0000000C
02B438A0 00000700
02B438A2 00000062
02B438A4 0000000C
With this, we have added a new way for Metapod to evolve, along with the old way of evolution.
That concludes my tutorial in Evolution Table editing. There are 5 slots for 6 bytes, that is 5 * 6 = 30/1E, so do not go beyond 30.