• 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?".
  • 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.

Code: Mega Evolutions and Primal Reversion

1,309
Posts
12
Years
  • Age 31
  • Seen Nov 24, 2023
Hey everyone, tried my hand at inserting this tonight. I found the actual insertion process suspiciously easy, and I know for a fact it's been inserted correctly as I have this:

KaUl46s.png


Although when I pressed Start nothing happens. I edited Venusaur to M-Evolve into Victreebel for testing purposes; changing every stat but name to match Venusaur's exactly. I also placed "-" as Victreebel's first move, and edited Victreebel to M-Evolve back to Venusaur with 0 as the unknown byte as suggested.

xDV5DKj.png
1GexUqH.png


I disabled the keystone check and set the variables in the config file, as seen here:

6I3VN4D.png

31azwjH.png


I also tried putting the disable check in after "make" and got the same result.

I know other people had similar errors so I just wanted to see if anyone had any insight into this as I've peeled through this thread and tried every suggestion possible. Thanks!

EDIT: Got it working, thank you Touched!
 
Last edited:

pokefreak890

The One that will make everything great
853
Posts
9
Years
  • Age 26
  • Seen May 18, 2023
Does anyone know how to do primal reversion and wish evolution if so can anyone teach me I only know how to do standard mega evolution I really need this
 
534
Posts
11
Years
  • Age 26
  • Seen Jul 24, 2023
Does anyone know how to do primal reversion and wish evolution if so can anyone teach me I only know how to do standard mega evolution I really need this
In FireRed, only Mega Evolutions are supported. Primal Reversion isn't supported as of yet and Touched currently busy doing stuff so we can't expect it soon. I'm not sure about Wish Evolution but I think it's also not supported as of yet.

However, in Emerald, (I think it was Kleenexfeu who did it) Primal Reversion is supported but again I'm not sure of Wish Evolution.

PS: Sorry, I'm not so sure about my facts, too lazy to dig up posts. :D
 

PokéMew1

Pokémon Fuchsia
484
Posts
10
Years
In FireRed, only Mega Evolutions are supported. Primal Reversion isn't supported as of yet and Touched currently busy doing stuff so we can't expect it soon. I'm not sure about Wish Evolution but I think it's also not supported as of yet.

However, in Emerald, (I think it was Kleenexfeu who did it) Primal Reversion is supported but again I'm not sure of Wish Evolution.

PS: Sorry, I'm not so sure about my facts, too lazy to dig up posts. :D

Wish is in fact supported in kleenexfeu's version in Emerald. :)
 

deidara9216

deidara9216
20
Posts
8
Years
kleenexfeu

brother've seen your post and recently the system can create mega evolutions for gba in fire red.
I do not understand your post to emerald ....
could you help me please
 
12
Posts
7
Years
  • Age 25
  • Seen Oct 29, 2023
Guys, I need help. I think that I make this successfully, cause I got the test.gba. But in game, I can't megaevo. I did the change in .ini of the G3HS but nothing. I have the patch of MrDS and another of 923 Pokémon. What should I do? Thanks in advance
The ini for G3T is down, anyone can pass me that?
 

Exodrake

The Manliest Chick that Ever Manlied
163
Posts
10
Years
  • Age 30
  • Seen Nov 30, 2016
Wish evolution works in the FireRed version, Primal doesn't though. To Wish evolve, you set the first of the two "Unknown bytes" in the Evolution section of G3T to 2 instead of leaving it at 0. The "nothing required" argument becomes the move ID rather than an item.
 
1
Posts
7
Years
  • Age 25
  • Seen Feb 3, 2017
Someone has Pokemon editor.ini G3T took him looking for days, please if someone has me what could happen?
 

Bulbadon

Might or might not come back
106
Posts
9
Years
  • Age 26
  • Seen Aug 26, 2016
This is great Touched! Surprising but I got it to work.
 

Froosty

The_Learner
535
Posts
9
Years
For Emerald see this post by kleenexfeu.

A while back, some hacker posted a thread here on the same topic - however they refused to release the source and instead used the thread to advertise their hack/brag. This isn't that. As far as I'm concerned Mega Evolution should function exactly like Gen 6 or it shouldn't be implemented at all. Despite this, Mega Evolution remains a popular "feature" in many hacks - hackers resort to using true evolutions instead of implementing them properly.

So before this becomes tl;dr, here is a video sample. Thanks to SphericalIce for letting me use the video from his hack, Pokémon Gaia.



This code works by hacking the existing evolution table. I added a custom evolution type (0xFE) that allows you to do Mega Evolutions. The variants (Wishing, standard Mega Evolution and Primals) are controlled by a unused halfword at the end of each evolution entry. The level argument is either an item (Mega Stone/Orb) or a move depending on this variant. Because I'm using the evolution table, it should be really easy to modify existing tools to edit these Megas.

I've also made it possible to use any item index as the Mega Accessory (it displays the Standard Mega evolution message) for aesthetic purposes.

This code is open source and available on my GitHub. I will port to Emerald when it's completed.

Right now, Mega Evolution is triggered by pressing Start when selecting an attack, which is reflected in the button. The button image is pretty simple to change, however the alternate palettes (for enabled and unusable) are determined by the code.

There are still a few bugs, and it doesn't work with link battles, so stay tuned for updates.

Documentation:

Configuration:

See the file src/config.h when doing the insertion step. There are a number of variable indices and item indices you can change there.

Code:
#define KEYSTONE_PLAYER_VAR 0x4001 /* Variable that holds item index for player keystone */
#define KEYSTONE_OPPONENT_VAR 0x4002 /* Same as above but for partner */
#define KEYSTONE_DEFAULT 0x161    /* Default Key Stone item index */
Where it says "#define XXX 0xSOMEHEXNUMBER" Change ONLY 0xSOMEHEXNUMBER and leave the rest the same so that the code can find your changes. KEYSTONE_PLAYER_VAR is the variable used to store the item index for the player's keystone and KEYSTONE_OPPONENT_VAR is the same, but for the opponent (see Usage below). If, for some reason, you set the variable for KEYSTONE_OPPONENT_VAR to 0, then the message for mega evolution will default to using whatever item index whatever you have in KEYSTONE_DEFAULT. By default this is configured to "Gold Teeth" so you'll probably want to change it (despite their awesome power). These variables help you with tiny story-telling details that are probably insignificant, but I judged them to be important in my perfectionism.

The remaining configuration options are for controlling the colours that are changed in the Mega Evolution healthbox addition in it's various states. You can change the sprite just by replacing the file in the "assets" folder. You then will probably need to change the colours here (and the number of colours you ignore) in these options. The code changes parts of the palette to a lighter variant or desaturates them entirely, so you need to set these correctly lest your sprite look funny. If you have changed your HP box at all, this might be necessary to change. I will add options for changing the relative X and Y position of this sprite if it becomes an issue.

Inserting (window users): See this post

Usage:

Mega evolutions are made using the evolution table data. It is preferable to hex edit these until tool support is adequate (see this guide for how to do this with G3T). Megas have evolution type 0xFE, so that they remain separate from regular evolution types. The unknown hword in this structure should stay 0 for Mega Evolution. Types 1 and 2 are reserved for Primal Reversion and Rayquaza's (move based) Mega Evolution. The target species is the species you want to Mega Evolve into. This Pokemon should have the same Dex number as the original. Try not to change much. You should keep the gender ratio, name, base HP, level curve and learnset the same to prevent strange things from happening. The argument for the mega evolution is the item index of your Mega Stone or Primal Orb. In type 2's case it is the move index.

Next, you need to make the species revert back to their original state. You need to add another evolution table entry, this time to the Pokemon's Mega Form. This should be identical to the one above, except the target species is the non-mega form, and the item index/argument is 0. I did it this way for speed reasons at the cost of making the configuration more complicated - searching through all the evolution data takes too long and makes the game lag.

Lastly, you'll need the item. In config.h, you should have put two free variables you'll use for this hack. The first is for the keystone item index for the player, the second is for the enemy trainer. For the player, simply set this to the index of your mega bracelet/anklet/whatever. You can do this via a script when you award the player their keystone. The code will then check whether you have this item and disabled Mega Evolution if you do not. The enemy trainer is the same, except this won't perform checks. It only changes the item used in the message (like certain characters in ORAS and XY). If you wish to disable Mega Evolution for the player at whatever time, either remove their bracelet item, or set the variable to 0.

Closing notes:

Please submit any issues, bugs and feature requests (or rather, improvements; I don't want large feature requests. Keep it to new configuration settings and such) on GitHub. You'll need an account there, but it helps me track these bugs and mark them as solved. It also allows me to follow up on them better than in this thread. It also is easier for other people to look up issues there.

Its so amazing to have reversible mega evolution just like in the real games but I do have one more question,
I feel like adding new evolution methods like gender evolution, specific map evolution, move learn evolution and many more,
For that i have to repoint the evolution table,
will there be any problem if I repoint the evolution method table ???
pls reply!!!
~anyone
 

Lance32497

LanceKoijer of Pokemon_Addicts
792
Posts
9
Years
Its so amazing to have reversible mega evolution just like in the real games but I do have one more question,
I feel like adding new evolution methods like gender evolution, specific map evolution, move learn evolution and many more,
For that i have to repoint the evolution table,
will there be any problem if I repoint the evolution method table ???
pls reply!!!
~anyone

There will be no problems, you just have to add the 255th Evolution Method which is The Mega Evolution method.
 
14
Posts
7
Years
  • Age 29
  • Seen Sep 4, 2016
I got this error can you help me? im using Windows 8 and i tried it in Windows 10 same error
 

Attachments

  • mak.PNG
    mak.PNG
    42.7 KB · Views: 15
14
Posts
7
Years
  • Age 29
  • Seen Sep 4, 2016
Here's my devkitARM folder and my devkitARM Bin path.
 

Attachments

  • arm.PNG
    arm.PNG
    34.9 KB · Views: 8
  • path.PNG
    path.PNG
    34.7 KB · Views: 9
Back
Top