This is a tutorial on how to add new moves to Pokemon Fire Red without replacing old ones, and a start on creating new move effects. This info was founded by Jambo51, and the original thread can be found here:
Due to it being a tad confusing to some (because it was never written to be a tutorial in the first place), I thought I would make it easier to follow because this is huge, and I feel like many hacks could benefit from this. This is for Fire Red BPRE 1.0 (aka FR US 1.0) by the way. To know if you have a BPRE ROM, load it up and watch the title screen. If the "Presents" after the Gamefreak symbol doesn't show up, you have BPRE. I hope this makes it easier for people to understand how to do it.
1. FIre Red BPRE 1.0 ROM (aka FR US 1.0)
2. A Hex Editor (I'll be using Hex Workshop).
3. Pokemon Game Editor by Gamer2020. (Download it here: http://www.pokecommunity.com/showthread.php?t=265635).
4. As Jambo excellently puts it, *PATIENCE*.
PART ONE - ADDING NEW MOVES WITHOUT REPLACING EXISTING ONE
This is the address of the original move data, which we are going to be moving to a different location.
Free Space = FF's. Basically, anything from 0x780000 - 0xFFFFFF is free space.
IMPORTANT: Paste OVER the FF's. So go to Edit > Select Block > 4260, and then paste there. DO NOT PASTE WITHOUT HIGHLIGHTING THE FF'S FIRST.
WRITE DOWN THIS ADDRESS!!! So in my case, I'd write down 0x900000 = Move data.
This means, basically, that anything that is directed to the old location will be sent to the new location. So, in my case, 0x900000 is the new location. I want to first go to Edit > Find .
That is what will show up. Since the old table was located at 0x250C04, any pointer to that data will look like this:
So we want to search for that string of bytes in the ROM.
And then replace EVERY one with our new pointer, in my case, 0x900000, which becomes:
*Quick lesson on pointers.*
1. First look at your offset. Example offset: 0x594039
2. Break it into sets of two's: 59 40 39
3. Take the last byte and put it first: 39 59 40
-Remember, the two numbers together is one byte, so don't rearrange the byte itself, just the order.
4. Take the last byte and put it between the two other bytes: 39 40 59
5. Add 08 to the end: 39 40 59 08
Another example real quick:
0xA9EBB0 becomes B0 EB A9 08
Basically you're just reversing the bytes and adding 08.
*End of quick lesson*
So once again, we're replacing all of the pointers to 0x250C04 to 900000. Just keep on searching for that string and replacing them until there are no more left to be replaced.
Seriously, there are A LOT, so BE PATIENT.
There are ALSO pointers in the ROM to 0x250C08...for PP data. So, we once again have to replace all of those pointers with your new pointer + 4. So, 0x900000 + 4 is 0x900004.
So the pointers to 0x250C08 will look like this: 08 0C 25 08
And the replacement pointer of 0x900004 looks like this: 04 00 90 08
Now replace all of those! There are a lot of these too, so be patient.
Now do Edit > Select Block > 1884 and copy that data.
This is the data for attack names.
Any pointer to 0x247094 will look like 94 70 24 08
So that's what we'll search.
Once again, there's more than one!
I'll be replacing mine with 00 18 90 08.
Now do Edit > Select Block > 2041, and copy that data.
This is the animation data. The new moves wouldn't work without some sort of animation to go along with them...
Yep, you guessed it, we have to change the pointer to that data to the one of our new one. I'm pretty sure there is only one, but check just to be safe. So I will change it to 0x90336C.
So my pointer will look like this: 6C 33 90 08.
A note, each move will have an animation. As of now, each move will inherit the animations of the first however many attacks you added, so new attack number 1 (#335) will have pound's animation, etc...
Or you can open up Pokemon Game Editor, go to "Help", and click "Edit roms.ini".
The only things we need to change are these three things:
We want to change those to our new offsets. Here is what mine will look like (and yours too, if you followed the tutorial).
Go to 0xD75Fc and overwrite whatever is there with:
00 00 00 00 00 00
PART 2 - CREATING NEW MOVE EFFECTS
This is the move effect table. Right now it only goes up to 213, but by rewriting it we can make it support up to 255 (256, since 0 counts) pointers.
Step Two and a Half (hehe)
We want to add a new effect, so what we are going to to is overwrite the last pointer (5F 86 1D 08) with a new pointer. Normally you would make your move effect first, and then search for free space to put it, and then make your new pointer, but for the sake of this tutorial we are going to say that my new move will be located at 0x920000.
Just a briefing, we can't (yet) create COMPLETELY new move effects, but we can combine and edit any of the existing ones available. With much testing and experimenting, you can create almost all of the moves from Gen 1V and V. I managed to create a working U-Turn/Volt Tackle even from editing Baton Pass's script (look at the end of this tutorial for move effects already created).
For this tutorial, I am going to make the move Hammer Arm.
Hammer Arm's effect is simple - After using it, your speed gets lowered by one. Hmmm...
Let's think for a second. What other moves have effects that can help us create this one...in reality, there are MANY. Let's go with another move that lowers your stats...
There are many, but let's go with Psycho Boost (after using Psycho Boost, your special attack is lowered by two.
Go to the location of your new move effect table. (If you followed this tutorial, it's at 0x910000). To find where Psycho Boost's pointer is, we need to first find what effect number it uses.
Chaos Rush posted a list of them for us in the other thread. It saves everyone A LOT of trouble, so I'll post it here.
According to this list, Psycho Boost uses effect number 204 (Same effect as Overheat). Now multiply 204*4, which is 816.
Edit > Select Block > 816.
Scroll to the end of your selected bytes. The pointer RIGHT AFTER the end of the selected blocks is the one we're looking for. This is because '0' is also a move effect. So the pointer of Psycho Boost's effect is 1B 84 1D 08, or address 0x1D841B.
Go to address 0x1D841B
Addresses 0x1D841B - 0x1D8425
As of right now, the user of this move will have their special attack lowered two stages. But we want the user's speed to be lowered one stage! In this case, all we need to change is a single byte.
To note, most moves end with the pointers 00 69 1D 08 (0x1D6900) or 4E 69 1D 08 (0x1D694E).
If your attack does damage, it'll use the first. If it doesn't, it'll use the second.
Now, the byte we need to change is the one I bolded:
That byte (FB) is soley responsible for the special attack drop. Now, how do we turn it into a speed drop?
Here is a list of what you can do by changing this byte. These are the ones that work 100% of the time. Meaning, these effects will ALWAYS happen. There are more (I didn't test from 00-C0) but I'm sure they are the same effects, just with less of a chance of happening. I know 01 has a 10% chance of putting an opponent to sleep, 03 has a 10% chance of burning an opponent, etc...
Anyway, we want one that ALWAYS lowers speed. So if you look, D8 ALWAYS lowers the users speed by one level. So our new move code is:
Yay! We now have a working Hammer Arm!
So all we have to do is put this code where the we made the pointer for earliar in the move effect table (0x920000 in my case).
Now, in Pokemon Game Editor, simply change the move effect of any move to 214 and it will use this effect!
But what if we want to add multiple effects?
For example, Flare Blitz?
Jambo51 made a way to do so.
DON'T MOVE ON UNLESS YOU UNDERSTAND EVERYTHING ELSE!
Flare Blitz not only causes recoil, but also has a chance to burn the opponent
For these kinds of moves that require multiple effects, a different code is required.
If your attack does damage (in this case it will), start out with this code:
This is our current code for Flare Blitz. All it does right now is cause damage.
Now, we need to add the recoil effect!
Remember how before we found Psycho Boost's effect location? Well in this case, we need to find an existing effect for recoil. Flare Blitz deals 1/3 recoil damage...hmmm...Double Edge does too!
Double Edge's effect (according to Chaos Rush's list) is number 198. So 198*4 is 792. So starting at the top of your new effect table;
Edit > Select Block > 792. The pointer after the highlighted area is the correct one. In this case, it's 3A 83 1D 08, or 0x1D833A.
Go to that location! However, before we go, let's see if we can find where the next closest pointer is to that location, so we know where double edge's effect ends. Right after it is the pointer to 0x1D8345, so we know that the last byte of Double Edge's effect is at 0x1D8344. Make sense? :)
This is what the code for double edge's effect is:
You might be saying "Hmm...that looks exactly like the Hammer Arm code we just made, just with the byte set at E6!" That is exactly right. And if you look, E6 means it ALWAYS does 1/3 recoil damage. This makes sense now!
Now we add that onto the other code from before. We don't need the pointer at the end, however; we'll make our own later at the end of our custom move. So we can gedt rid of the 28 00 69 1D 08 (28 means "goto" in this case...we don't need that either).
Flare Blitz's current code should look like this:
Now, we simply add a "15" after it. 15 is used to execute the effect, in this case executing the recoil damage.
Now our code looks like this:
We need the chance to burn now! Now here's the goodnews: this is much easier to do. Changing our special byte to 03 makes it so there's a 10% chance to burn. SO, we can just take the recoil code, and change that byte that we all desperately love to 03.
We can now add that code onto our current Flare Blitz one. Once again, we'll remove the 28 00 69 1D 08, and add a 15 at the end.
Here is what it should look like as of now:
And lastly, once you have finished your move, you add a goto command (28) and have it goto address 0x1D6947, or 47 69 1D 08.
So our final code for Flare Blitz is this:
Now you have one fully functional Flare Blitz!
A note: All effects, like per se a chance to flinch and burn, must share the same chance of happening! (Limitation of game's code). FURTHERMORE, do not make it so there's a chance of two status allignments happening at the same time: it will not work!
Now, for more complicated moves, other moves need to be dissected and experimented with to be found. The Hammer Arm code is my own, while the Flare Blitz code is Jambo's. Here are a few more. If you have successfully made a move effect, please let me know and I'll update it to this post.
Wake-Up Slap - Made by Me (Itman)
Hammer Arm - Made by me (Itman)
Flare Blitz - Made by Jambo51
Quiver Dance -Made by pawell6
Coil - Made by Garuga17
Close Combat - Made by pawell6
Note: this guide does not cover assigning different animations other than the inherited ones. I will add it soon once I figure out how to do it. ;)
EDIT: Take a look at this thread to make custom animations, by Chaos Rush: http://www.pokecommunity.com/showthread.php?t=281520
EDIT2: Everyone do this too. Update PGE's ini file (Open up PGE, goto Help > Update > ROM ini file). Then, go to where we were changing the pointers for the attack data and such, and there should be a new pointer at the bottom that says "AttackAnimationPointer". Change that to your new location for the attack animations (the one originally at 0x1C68F4, in my examples I placed it at 0x90336C).