• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Forum moderator applications are now open! Click here for details.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Custom Evolution Methods

The Law

Critical, but well meaning
16
Posts
5
Years
  • Age 29
  • Seen Nov 15, 2023
In this tutorial we'll be looking into making custom evolution methods. Some of these are from Gen IV and onwards, but I will also show you a custom evolution method I made myself.

Every method will use the following files.
include>pokemon.h
src>pokemon.c
src>data>pokemon>evolution.h


Table of Contents:
-Level with certain gender
-Level up with move
-Level up at certain location
-Level with held item at certain time of day
-Level up with another Pokémon in party
-Item as a certain gender
*More to come*

Bugs:
-If you find any bugs leave a comment on this thread, or contact me on discord @TheLaw#9999
 
Last edited:

The Law

Critical, but well meaning
16
Posts
5
Years
  • Age 29
  • Seen Nov 15, 2023
Level with certain gender

Step 1: defining our evolution method
Navigate to line 395 in include>pokemon.h
You should see the following:
l4vMyv4.png


Line 410 & 411 was added by me.
This is where you will be adding your define for your evolution method.
The name does not matter, but to keep things tidy and organized we will name it EVO_LEVEL_MALE & EVO_LEVEL_FEMALE

Code for copy pasting:
#define EVO_LEVEL_MALE 0x0010 // Pokémon levels up with a specific gender
#define EVO_LEVEL_FEMALE 0x0011 // Pokémon levels up with a specific gender

Do note that the text after // is a comment, and is not necessary. Our compiler won't use this, and it's only there for your sake really.

The hex value at the back is important too, it just counts up by one though so if you are familiar with hex this isn't an issue. If you aren't, every evolution method you add needs to have the following values:
  1. 0x0010
  2. 0x0011
  3. 0x0012
  4. 0x0013
  5. 0x0014
  6. 0x0015
  7. 0x0016
  8. 0x0017
  9. 0x0018
  10. 0x0019
  11. 0x001a
  12. 0x001b
  13. 0x001c
  14. 0x001d
  15. 0x001e
  16. 0x001f
If you still need more evolution methods. Start from the top of the list, and replace 1 with 2.

Step 2: call on the right data
Navigate to src>pokemon.c we need to go far down to line 5729 where we find this:
ysMOaby.png

We add a u8 gender = GetMonGender(mon); here. This it to check what gender our mon has.

Further down we add the specific condition for this evolution method. Make a new line after 5809 and paste the following code:

case EVO_LEVEL_MALE:
if (gEvolutionTable[species].param <= level && (gender) == 0)
targetSpecies = gEvolutionTable[species].targetSpecies;
break;
case EVO_LEVEL_FEMALE:
if (gEvolutionTable[species].param <= level && (gender) == 254)
targetSpecies = gEvolutionTable[species].targetSpecies;
break;

zRBHlZi.png


This tells the game that we want it to check for the pokemons gender and level. If the level and gender matches, it will trigger the evolution.

Step 3: Apply the method to a Pokémon
Our last stop is src>data>pokemon>evolution.h

In here we find a list of all pokemon that evolve and what method they use to evolve with as well what the condtion is. From level to items.

The last step in our journey to apply an evolution method is simply choosing a Pokémon and changing it evolution method. In this case I will Charmeleon:

The code looks like this for our dear Charmeleon:
[SPECIES_CHARMELEON] = {{EVO_LEVEL, 36, SPECIES_CHARIZARD}},

and to apply our new method we simply change it to this:
[SPECIES_CHARMELEON] = {{EVO_LEVEL_MALE, 36, SPECIES_CHARIZARD}},

Now our Charmeleon will evolve at level 36, if it is a male. The level can always be changed to something else.
 

The Law

Critical, but well meaning
16
Posts
5
Years
  • Age 29
  • Seen Nov 15, 2023
Level with move

Step 1: defining our evolution method
Navigate to line 395 in include>pokemon.h
You should see the following:
kaIKMFh.png


Line 410 was added by me.
This is where you will be adding your define for your evolution method.
The name does not matter, but to keep things tidy and organized we will name it EVO_MOVE

Code for copy pasting:
#define EVO_MOVE 0x0011 // Pokémon levels up while knowing the specified move

Do note that the text after // is a comment, and is not necessary. Our compiler won't use this, and it's only there for your sake really.

The hex value at the back is important too, it just counts up by one though so if you are familiar with hex this isn't an issue. If you aren't, every evolution method you add needs to have the following values:
  1. 0x0010
  2. 0x0011
  3. 0x0012
  4. 0x0013
  5. 0x0014
  6. 0x0015
  7. 0x0016
  8. 0x0017
  9. 0x0018
  10. 0x0019
  11. 0x001a
  12. 0x001b
  13. 0x001c
  14. 0x001d
  15. 0x001e
  16. 0x001f
If you still need more evolution methods. Start from the top of the list, and replace 1 with 2.

Step 2: Setting conditions
Navigate to src>pokemon.c we need to go far down to line 5812.

We now add the specific condition for this evolution method.

case EVO_MOVE:
if (MonKnowsMove(&gPlayerParty, gEvolutionTable[species].param) == TRUE)
targetSpecies = gEvolutionTable[species].targetSpecies;
break;

The game now checks if we have a certain move, and if it meets the condition we set.

Step 3: Apply the method to a Pokémon
Our last stop is src>data>pokemon>evolution.h

In here we find a list of all pokemon that evolve and what method they use to evolve with as well what the condtion is. From level to items.

The last step in our journey to apply an evolution method is simply choosing a Pokémon and changing it evolution method. In this case I will Charmeleon:

The code looks like this for our dear Charmeleon:
[SPECIES_CHARMELEON] = {{EVO_LEVEL, 36, SPECIES_CHARIZARD}},

and to apply our new method we simply change it to this:
[SPECIES_CHARMELEON] = {{EVO_MOVE, MOVE_FLAMETHROWER, SPECIES_CHARIZARD}},

Now our Charmeleon will evolve if it knows the move Flamethrower. The move can be changed to any other move in the game.
 
Last edited:

The Law

Critical, but well meaning
16
Posts
5
Years
  • Age 29
  • Seen Nov 15, 2023
Level up at certain location

Step 1: defining our evolution method

At the top add the following lines of code:
#define EVO_MAP_GROUP(map) (map >> 8) //Code to add
#define EVO_MAP_NUM(map) (map & 0xFF) //Code to add

It should now look something like this:
6ZxWPT0.png


Now navigate to line 395 in include>pokemon.h
You should see the following:
bNKFHcq.png


Line 410 was added by me.
This is where you will be adding your define for your evolution method.
The name does not matter, but to keep things tidy and organized we will name it EVO_MAP

Code for copy pasting:
#define EVO_MAP 0x0011 // Pokémon levels up in a specific map

Do note that the text after // is a comment, and is not necessary. Our compiler won't use this, and it's only there for your sake really.

The hex value at the back is important too, it just counts up by one though so if you are familiar with hex this isn't an issue. If you aren't, every evolution method you add needs to have the following values:
  1. 0x0010
  2. 0x0011
  3. 0x0012
  4. 0x0013
  5. 0x0014
  6. 0x0015
  7. 0x0016
  8. 0x0017
  9. 0x0018
  10. 0x0019
  11. 0x001a
  12. 0x001b
  13. 0x001c
  14. 0x001d
  15. 0x001e
  16. 0x001f
If you still need more evolution methods. Start from the top of the list, and replace 1 with 2.

Step 2: Setting conditions
Navigate to src>pokemon.c At the top add the following to the list of #include:
#include "constants/maps.h"

This is to ensure we can call upon the maps and define them.

We now add the specific condition for this evolution method.

case EVO_MAP:
if (EVO_MAP_GROUP(gEvolutionTable[species].param) == mapGroup && EVO_MAP_NUM(gEvolutionTable[species].param) == mapNum)
targetSpecies = gEvolutionTable[species].targetSpecies;
break;

Add this at line 5814. It should looks like this:
P3YdrPT.png


Lastly, we need to call on the parameters for the map. So go to line 5730 and add these 2 lines:

u8 mapGroup = gSaveBlock1Ptr->location.mapGroup;
u8 mapNum = gSaveBlock1Ptr->location.mapNum;

And end up with this:
qgneECc.png


Step 3: Apply the method to a Pokémon
Our last stop is src>data>pokemon>evolution.h

In here we find a list of all pokemon that evolve and what method they use to evolve with as well what the condtion is. From level to items.

The last step in our journey to apply an evolution method is simply choosing a Pokémon and changing it evolution method. In this case I will Charmeleon:

The code looks like this for our dear Charmeleon:
[SPECIES_CHARMELEON] = {{EVO_LEVEL, 36, SPECIES_CHARIZARD}},

and to apply our new method we simply change it to this:
[SPECIES_CHARMELEON] = {{EVO_MAP, MAP_ROUTE101 SPECIES_CHARIZARD}},

Now our Charmeleon will evolve if it levels up on route 101. The location can be changed to any you want. For a list of maps to use go to include>constants>maps.h
 

The Law

Critical, but well meaning
16
Posts
5
Years
  • Age 29
  • Seen Nov 15, 2023
Level with held item at certain time of day

OBS!!! If evolution is cancelled, the held item is still consumed.

Step 1: defining our evolution method
Now navigate to line 395 in include>pokemon.h
You should see the following:
c80pYeD.png


Line 410 & 411 was added by me.
This is where you will be adding your define for your evolution method.
The name does not matter, but to keep things tidy and organized we will name it EVO_HELD_ITEM_DAY & EVO_HELD_ITEM_NIGHT

Code for copy pasting:
#define EVO_HELD_ITEM_DAY 0x0011 // Pokémon levels up during the day while holding the specified item
#define EVO_HELD_ITEM_NIGHT 0x0012 // Pokémon levels up during the night while holding the specified item

Do note that the text after // is a comment, and is not necessary. Our compiler won't use this, and it's only there for your sake really.

The hex value at the back is important too, it just counts up by one though so if you are familiar with hex this isn't an issue. If you aren't, every evolution method you add needs to have the following values:
  1. 0x0010
  2. 0x0011
  3. 0x0012
  4. 0x0013
  5. 0x0014
  6. 0x0015
  7. 0x0016
  8. 0x0017
  9. 0x0018
  10. 0x0019
  11. 0x001a
  12. 0x001b
  13. 0x001c
  14. 0x001d
  15. 0x001e
  16. 0x001f
If you still need more evolution methods. Start from the top of the list, and replace 1 with 2.

Step 2: Setting conditions
Navigate to src>pokemon.c

We now add the specific condition for this evolution method.

All parameters are already available to us from the start so go ahead and add the code:

case EVO_HELD_ITEM_DAY:
RtcCalcLocalTime();
if (gLocalTime.hours >= 0 && gLocalTime.hours < 12 && gEvolutionTable[species].param == heldItem)
{
heldItem = 0;
SetMonData(mon, MON_DATA_HELD_ITEM, &heldItem);
targetSpecies = gEvolutionTable[species].targetSpecies;
}
break;
case EVO_HELD_ITEM_NIGHT:
RtcCalcLocalTime();
if (gLocalTime.hours >= 12 && gLocalTime.hours < 24 && gEvolutionTable[species].param == heldItem)
{
heldItem = 0;
SetMonData(mon, MON_DATA_HELD_ITEM, &heldItem);
targetSpecies = gEvolutionTable[species].targetSpecies;
}
break;

Add this at line 5814. It should looks like this:
fsMmMYi.png


Step 3: Apply the method to a Pokémon
Our last stop is src>data>pokemon>evolution.h

In here we find a list of all pokemon that evolve and what method they use to evolve with as well what the condtion is. From level to items.

The last step in our journey to apply an evolution method is simply choosing a Pokémon and changing it evolution method. In this case I will Charmeleon:

The code looks like this for our dear Charmeleon:
[SPECIES_CHARMELEON] = {{EVO_LEVEL, 36, SPECIES_CHARIZARD}},

and to apply our new method we simply change it to this:
[SPECIES_CHARMELEON] = {{EVO_HELD_ITEM_DAY, ITEM_FIRE_STONE, SPECIES_CHARIZARD}},

Now our Charmeleon will evolve if it levels up during the day holding a firestone. It can be changed to night, and another item can be used.
 
Last edited:

The Law

Critical, but well meaning
16
Posts
5
Years
  • Age 29
  • Seen Nov 15, 2023
Level up with another Pokémon in party

Step 1: defining our evolution method
Now navigate to line 395 in include>pokemon.h
You should see the following:
AzWJqP0.png


Line 410 was added by me.
This is where you will be adding your define for your evolution method.
The name does not matter, but to keep things tidy and organized we will name it EVO_SPECIES

Code for copy pasting:
#define EVO_SPECIES 0x0011 // Pokémon levels up while a specific Pokémon is in the party.

Do note that the text after // is a comment, and is not necessary. Our compiler won't use this, and it's only there for your sake really.

The hex value at the back is important too, it just counts up by one though so if you are familiar with hex this isn't an issue. If you aren't, every evolution method you add needs to have the following values:
  1. 0x0010
  2. 0x0011
  3. 0x0012
  4. 0x0013
  5. 0x0014
  6. 0x0015
  7. 0x0016
  8. 0x0017
  9. 0x0018
  10. 0x0019
  11. 0x001a
  12. 0x001b
  13. 0x001c
  14. 0x001d
  15. 0x001e
  16. 0x001f
If you still need more evolution methods. Start from the top of the list, and replace 1 with 2.

Step 2: Setting conditions
Navigate to src>pokemon.c

We now add the specific condition for this evolution method.

First we need to add an int j;
fefKz98.png

You can add it right below int i;

Then insert this:

case EVO_SPECIES:
for (j = 0; j < PARTY_SIZE; j++)
{
u16 checkSpecies = GetMonData(&gPlayerParty[j], MON_DATA_SPECIES, NULL);
if (checkSpecies == gEvolutionTable[species].param)
targetSpecies = gEvolutionTable[species].targetSpecies;
}
break;

Add this at line 5814. It should looks like this:
82ph527.png


Step 3: Apply the method to a Pokémon
Our last stop is src>data>pokemon>evolution.h

In here we find a list of all pokemon that evolve and what method they use to evolve with as well what the condtion is. From level to items.

The last step in our journey to apply an evolution method is simply choosing a Pokémon and changing it evolution method. In this case I will Charmeleon:

The code looks like this for our dear Charmeleon:
[SPECIES_CHARMELEON] = {{EVO_LEVEL, 36, SPECIES_CHARIZARD}},

and to apply our new method we simply change it to this:
[SPECIES_CHARMELEON] = {{EVO_SPECIES, SPECIES_CHARMANDER, SPECIES_CHARIZARD}},

Now our Charmeleon will evolve if it levels up with a Charmander in the party. The specific mon can be changed.
 
Last edited:

The Law

Critical, but well meaning
16
Posts
5
Years
  • Age 29
  • Seen Nov 15, 2023
Item as a certain gender

Step 1: defining our evolution method
Now navigate to line 395 in include>pokemon.h
You should see the following:
vFFWGrg.png


Line 410 and 411 were added by me.
This is where you will be adding your define for your evolution method.
The name does not matter, but to keep things tidy and organized we will name it EVO_SPECIES

Code for copy pasting:
#define EVO_ITEM_MALE 0x0011 // Specified item is used on male Pokémon
#define EVO_ITEM_FEMALE 0x0012 // Specified item is used on female Pokémon

Do note that the text after // is a comment, and is not necessary. Our compiler won't use this, and it's only there for your sake really.

The hex value at the back is important too, it just counts up by one though so if you are familiar with hex this isn't an issue. If you aren't, every evolution method you add needs to have the following values:
  1. 0x0010
  2. 0x0011
  3. 0x0012
  4. 0x0013
  5. 0x0014
  6. 0x0015
  7. 0x0016
  8. 0x0017
  9. 0x0018
  10. 0x0019
  11. 0x001a
  12. 0x001b
  13. 0x001c
  14. 0x001d
  15. 0x001e
  16. 0x001f
If you still need more evolution methods. Start from the top of the list, and replace 1 with 2.

Step 2: Setting conditions
Navigate to src>pokemon.c

We now add the specific condition for this evolution method.

This time we are not adding code to the same case as before. YOu might not have noticed it, but we have been adding code to case 0. This time we have to add to case 3. Case 3 holds the evolution method for using an item. So insert the following code:

case 3:
for (i = 0; i < EVOS_PER_MON; i++)
{
if ((gEvolutionTable[species].method == EVO_ITEM
&& gEvolutionTable[species].param == evolutionItem)
|| (gEvolutionTable[species].method == EVO_ITEM_MALE
&& gEvolutionTable[species].param == evolutionItem && (gender) == MON_MALE)
|| (gEvolutionTable[species].method == EVO_ITEM_FEMALE
&& gEvolutionTable[species].param == evolutionItem && (gender) == MON_FEMALE))
{
targetSpecies = gEvolutionTable[species].targetSpecies;
break;
}
}
break;

The code should look exactly like what you have above. I have included the regular use item to evolve method in the code to make it less messy.

Step 3: Apply the method to a Pokémon
Our last stop is src>data>pokemon>evolution.h

In here we find a list of all pokemon that evolve and what method they use to evolve with as well what the condtion is. From level to items.

The last step in our journey to apply an evolution method is simply choosing a Pokémon and changing it evolution method. In this case I will Charmeleon:

The code looks like this for our dear Charmeleon:
[SPECIES_CHARMELEON] = {{EVO_LEVEL, 36, SPECIES_CHARIZARD}},

and to apply our new method we simply change it to this:
[SPECIES_CHARMELEON] = {{EVO_ITEM_MALE,ITEM_FIRE_STONE, SPECIES_CHARIZARD}},

Now our Charmeleon will evolve if it is a male and a fire stone is used on it. Do keep in mind for this evolution method, you can only use items that already work as evolutionary items such as the evolution stones. If you want to add your own custom stone, you'll have to wait to check out my guide on how to edit items.
 
Back
Top