PDA

View Full Version : [Other] Adding New Moves and Creating New Move Effects


itman
October 15th, 2012, 09:41 PM
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:

http://www.pokecommunity.com/showthread.php?t=263479

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.

What's needed:
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

Step One
Open up your ROM in a hex editor (once again, I'll be using hex workshop).

http://i1343.photobucket.com/albums/o792/Prog2/AA_zpsf5ecf31c.png


http://i1343.photobucket.com/albums/o792/Prog2/AB_zpsd91466f7.png

Step Two

Goto address 0x250C04.

This is the address of the original move data, which we are going to be moving to a different location.

http://i1343.photobucket.com/albums/o792/Prog2/BA_zps18af827b.png


http://i1343.photobucket.com/albums/o792/Prog2/BB_zps7d364218.png


http://i1343.photobucket.com/albums/o792/Prog2/BC_zps94cc20a6.png


Step Three

Edit > Select Block > 4260 Bytes. Copy.

http://i1343.photobucket.com/albums/o792/Prog2/CA_zpsca4638d4.png


http://i1343.photobucket.com/albums/o792/Prog2/CB_zps9ff92c81.png


http://i1343.photobucket.com/albums/o792/Prog2/CC_zps9d7ee67a.png


Step Four

Open up Free Space Finder and search for 4260 Bytes of Free Space. Goto that address. For this example, we'll use 0x900000.

Free Space = FF's. Basically, anything from 0x780000 - 0xFFFFFF is free space.

http://i1343.photobucket.com/albums/o792/Prog2/DA_zps268f224f.png


http://i1343.photobucket.com/albums/o792/Prog2/DB_zps3cbbdeee.png


Step Five

Paste the original move data in the new location.

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.

http://i1343.photobucket.com/albums/o792/Prog2/EA_zps9387759d.png


http://i1343.photobucket.com/albums/o792/Prog2/EB_zps47fd4003.png


http://i1343.photobucket.com/albums/o792/Prog2/EC_zpse1320087.png


http://i1343.photobucket.com/albums/o792/Prog2/ED_zps3c919136.png


http://i1343.photobucket.com/albums/o792/Prog2/EE_zps2abc394c.png

Step Six

Change all the original pointers to the original move data to your new location.

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 .

http://i1343.photobucket.com/albums/o792/Prog2/FA_zps7dbeca38.png


http://i1343.photobucket.com/albums/o792/Prog2/FB_zps7ca32c47.png

That is what will show up. Since the old table was located at 0x250C04, any pointer to that data will look like this:

04 0C 25 08

So we want to search for that string of bytes in the ROM.

http://i1343.photobucket.com/albums/o792/Prog2/FB_zps7ca32c47.png

And then replace EVERY one with our new pointer, in my case, 0x900000, which becomes:

00 00 90 08

*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.

http://i1343.photobucket.com/albums/o792/Prog2/GA_zps3bc7e737.png


http://i1343.photobucket.com/albums/o792/Prog2/HA_zpsf4c1ab23.png


http://i1343.photobucket.com/albums/o792/Prog2/HB_zps3ed17097.png


Step Seven

Edit > Find (again).

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

http://i1343.photobucket.com/albums/o792/Prog2/IA_zps76e5ca86.png


http://i1343.photobucket.com/albums/o792/Prog2/IB_zpsc0b648b6.png


http://i1343.photobucket.com/albums/o792/Prog2/IC_zps04556e78.png


http://i1343.photobucket.com/albums/o792/Prog2/ID_zpsb38913df.png

Now replace all of those! There are a lot of these too, so be patient.


Step Eight

Go back to the original move table data (0x250C04) and copy (12*number of new attacks) you want to add.
The maximum that the table can hold is 511. There are already 354 moves though. So in this example, I want to to the maximum; 511-354 is 157. So 12*157 is 1884.

Now do Edit > Select Block > 1884 and copy that data.

http://i1343.photobucket.com/albums/o792/Prog2/JA_zps5e227f9e.png


http://i1343.photobucket.com/albums/o792/Prog2/JB_zpsef917578.png


http://i1343.photobucket.com/albums/o792/Prog2/JC_zps9f0bf1cc.png


Step Nine

Return to where you put your new move data from before (in my case 0x900000). Go to the end of the data (where the FF's begin again). Once again; Edit > Select Block > 1884. And then paste.

http://i1343.photobucket.com/albums/o792/Prog2/KA_zps0d092718.png


http://i1343.photobucket.com/albums/o792/Prog2/KB_zpse95c0400.png


http://i1343.photobucket.com/albums/o792/Prog2/KC_zps83cad92a.png


http://i1343.photobucket.com/albums/o792/Prog2/KD_zpsa68e7556.png


http://i1343.photobucket.com/albums/o792/Prog2/KE_zps4690fd76.png


http://i1343.photobucket.com/albums/o792/Prog2/KF_zpse02db0ff.png


Step Ten

Goto address 0x247094. Edit > Select Block > 4615.
Copy that data.

This is the data for attack names.

http://i1343.photobucket.com/albums/o792/Prog2/LA_zps787d52b3.png


http://i1343.photobucket.com/albums/o792/Prog2/LB_zpsa0bfb58a.png


http://i1343.photobucket.com/albums/o792/Prog2/LC_zps19073fc0.png


http://i1343.photobucket.com/albums/o792/Prog2/LD_zps817fe459.png


http://i1343.photobucket.com/albums/o792/Prog2/LE_zps7319af15.png


Step Eleven

Open up Free Space Finder and search for 4615 bytes of free space. To make things easier, you can put this data right after the move data. Write down the offset you inserted this at! In my case, I'm pasting it at 0x901800.

http://i1343.photobucket.com/albums/o792/Prog2/MA_zps6941b962.png


http://i1343.photobucket.com/albums/o792/Prog2/MB_zpsd955af9a.png


http://i1343.photobucket.com/albums/o792/Prog2/MC_zps494ba329.png


http://i1343.photobucket.com/albums/o792/Prog2/MD_zps211ee8ce.png


Step Twelve

Much like before, we need to change all of the pointers associated with the old location and direct them to our new location. Edit > Find.

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.

http://i1343.photobucket.com/albums/o792/Prog2/NA_zps04a9e58c.png


http://i1343.photobucket.com/albums/o792/Prog2/NB_zps7332c347.png


http://i1343.photobucket.com/albums/o792/Prog2/NC_zps2faeb7b1.png


http://i1343.photobucket.com/albums/o792/Prog2/ND_zps3b89efea.png


Step Thirteen

Go back to 0x247094 and copy (13*number of new attacks) bytes. We'll add this onto the end of the other table just like we did with the move data. Once again, we want the table to support up to 511 moves, so 157*13 is 2041.

Now do Edit > Select Block > 2041, and copy that data.

http://i1343.photobucket.com/albums/o792/Prog2/OA_zps8559c34b.png


http://i1343.photobucket.com/albums/o792/Prog2/OB_zps24d5b562.png


http://i1343.photobucket.com/albums/o792/Prog2/OC_zpsdb9106a7.png


http://i1343.photobucket.com/albums/o792/Prog2/OD_zpsb814fbde.png


Step Fourteen

Return back to your new location for the attack names data (mine was 0x901800) and go to the end of the data. Once at the bottom, once again, Edit > Select Block > 2401 and paste.


http://i1343.photobucket.com/albums/o792/Prog2/PA_zps2a82cbba.png


http://i1343.photobucket.com/albums/o792/Prog2/PB_zpsfcf289b8.png


http://i1343.photobucket.com/albums/o792/Prog2/PC_zps1e874dd9.png


http://i1343.photobucket.com/albums/o792/Prog2/PD_zps7fbafd03.png


Step Fifteen

Goto 0x1C68F4. Edit > Select Block > 1420. Copy.

This is the animation data. The new moves wouldn't work without some sort of animation to go along with them...

http://i1343.photobucket.com/albums/o792/Prog2/QA_zps36a48b2c.png


http://i1343.photobucket.com/albums/o792/Prog2/QB_zps1b021435.png


http://i1343.photobucket.com/albums/o792/Prog2/QC_zpse3e8312c.png


Step Sixteen

Open up Free Space Finder and search for 1420 bytes. (Or if you know you have room, paste this data right after the new attack names data). Edit > Select Block > 1420 and paste the data. MAKE SURE the offset you paste the data on ends with a 0, 4, 8, or C, OR IT WILL NOT WORK. So the offset I'm pasting mine it is 0x90336C.

http://i1343.photobucket.com/albums/o792/Prog2/RA_zps6eb65e7b.png


http://i1343.photobucket.com/albums/o792/Prog2/RB_zps3ae6ac7c.png


http://i1343.photobucket.com/albums/o792/Prog2/RC_zps52d8b008.png


http://i1343.photobucket.com/albums/o792/Prog2/RD_zps8329e17f.png


Step Seventeen

Edit > Find > F4 68 1C 08

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.

http://i1343.photobucket.com/albums/o792/Prog2/SA_zps152e363a.png


http://i1343.photobucket.com/albums/o792/Prog2/SB_zpsdf3ad824.png


http://i1343.photobucket.com/albums/o792/Prog2/SC_zps3d5bb002.png


http://i1343.photobucket.com/albums/o792/Prog2/SD_zpsdcee1a69.png


Step Eighteen

Go back to 0x1C68F4 and copy (4*number of new attacks) bytes. 157*4 is 628. So Edit > Select Block > 628. Copy.

http://i1343.photobucket.com/albums/o792/Prog2/TA_zps7b147e85.png


http://i1343.photobucket.com/albums/o792/Prog2/TB_zpsc6d9cb41.png


http://i1343.photobucket.com/albums/o792/Prog2/TC_zps0eca73f5.png


Step Nineteen

Once again, you can open Free Space Finder and search for 628 free blocks, or to make things easier once again, just post this directly underneath the third set of data that you just placed (the animation data).

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

http://i1343.photobucket.com/albums/o792/Prog2/TD_zpsbfddea3f.png


http://i1343.photobucket.com/albums/o792/Prog2/TE_zpscd6dd85d.png


http://i1343.photobucket.com/albums/o792/Prog2/TF_zps8fb7742a.png


http://i1343.photobucket.com/albums/o792/Prog2/TG_zps54fe20e5.png


Step Twenty

Open up Pokemon Game Editor's INI (Should be in a folder that says "ini" that came with the program).

Or you can open up Pokemon Game Editor, go to "Help", and click "Edit roms.ini".

http://i1343.photobucket.com/albums/o792/Prog2/UA_zps53dd0f5d.png


Step Twenty-One

Change the offsets so it knows where the new location of your attack data and such is.

The only things we need to change are these three things:

NumberOfAttacks=354
AttackData=&H250C04
AttackNames=&H247094

We want to change those to our new offsets. Here is what mine will look like (and yours too, if you followed the tutorial).

NumberOfAttacks=511
AttackData=&H900000
AttackNames=&H901800

http://i1343.photobucket.com/albums/o792/Prog2/VB_zps2f8f3cec.png


http://i1343.photobucket.com/albums/o792/Prog2/VC_zps13a9de67.png


http://i1343.photobucket.com/albums/o792/Prog2/VD_zpsb847b48f.png


http://i1343.photobucket.com/albums/o792/Prog2/VE_zps3ebf9290.png


http://i1343.photobucket.com/albums/o792/Prog2/VF_zps60ff8460.png


http://i1343.photobucket.com/albums/o792/Prog2/VG_zpsdacf5d43.png


Step Twenty-Two

Lastly, there is one limiter in the ROM. If it is not disabled, instead of saying "Bulbasaur used VenoShock!", it will say "Bulbasaur used a POISON move!".

Go to 0xD75Fc and overwrite whatever is there with:

00 00 00 00 00 00

http://i1343.photobucket.com/albums/o792/Prog2/WA_zps5569074d.png


http://i1343.photobucket.com/albums/o792/Prog2/WB_zpsf6a297b5.png


From Here...

You can now easily edit these moves in Pokemon Game Editor's built in Attack Editor. To put these moves into existing movesets, use Pokemon Game Editor's built in Pokemon Editor.



PART 2 - CREATING NEW MOVE EFFECTS

Step One

Open up your ROM in your hex editor and go to
address 0x1D65A8. Edit > Select Block > 856. Copy.

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.


http://i1343.photobucket.com/albums/o792/Prog2/AA_zps1e8860d3.png


http://i1343.photobucket.com/albums/o792/Prog2/AB_zps905bb8db.png


http://i1343.photobucket.com/albums/o792/Prog2/AC_zps1da2d5b5.png


Step Two

Open up Free Space Finder and search for 856 bytes of free space. Go to that location (I'll use 0x910000 in my example). Edit > Select Block > 856. Paste.


http://i1343.photobucket.com/albums/o792/Prog2/BA_zpsf21e9ed5.png


http://i1343.photobucket.com/albums/o792/Prog2/BB_zpscdb36a62.png


http://i1343.photobucket.com/albums/o792/Prog2/BC_zps6e5b0b60.png


http://i1343.photobucket.com/albums/o792/Prog2/BD_zps2220e3cf.png


Step Two and a Half (hehe)

Edit > Find > A8 65 1D 08 (again, changing the pointers from the original table to our new table). I would be changing them to 00 00 91 08 (By now, I hope everyone understands how pointers work!). Replace them all.

http://i1343.photobucket.com/albums/o792/Prog2/CA_zps8d3dc0d9.png


http://i1343.photobucket.com/albums/o792/Prog2/CB_zps9f25f7d7.png


http://i1343.photobucket.com/albums/o792/Prog2/CC_zps7557e106.png


Step Three

Go to the end of your new move effects table. The last pointer, which is 5F 86 1D 08 is actually marking the end of the table. So the pointer before that (which is FB 85 1D 08) is actually the last effect in the table (#213).

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.

http://i1343.photobucket.com/albums/o792/Prog2/DA_zps558e6cca.png


http://i1343.photobucket.com/albums/o792/Prog2/DB_zps5e8bb2b8.png


http://i1343.photobucket.com/albums/o792/Prog2/DC_zpsfb69eb16.png


http://i1343.photobucket.com/albums/o792/Prog2/DD_zps9e9dd75a.png


Step Four

Here is where we actually make new move effects.

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.

0 = no added effect
1 = puts target to sleep
2 = posion the target
3 = abosrbs half the damage inflicted (Absorb, Mega Drain, etc.)
4 = burn the target
5 = freeze the target
6 = paralyze the target
7 = Selfdestruct, Explosion
8 = takes 1/2 of damage inflicted on sleeping foe (Dream Eater)
9 = Mirror Move
10 = raises user's Attack
11 = raises user's Defense
12 = raises user's Speed
13 = raises user's Special Attack
14 = raises user's Special Defense
16 = raises user's evasion
17 = never misses
18 = lowers opponent's Attack
19 = lowers opponent's Defense
20 = lowers opponent's Speed
21 = lowers opponent's Special Attack
22 = lowers opponent's Special Defense
23 = lowers opponent's Accuracy
24 = lowers opponent's evasion
25 = Haze (there's many effects associated exclusively with this move)
26 = Bide
27 = Thrash/Petal Dance/Outrage
28 = Whirlwind/Roar effect
29 = happens 2-5 times
30 = Conversion
31 = may cause flinching
32 = Recover 1/2 of maximum HP
33 = badly poisons foe
34 = Pay Day
35 = Light Screen
36 = may freeze, paralyze, or burn
37 = Rest
38 = 1-hit KO
39 = takes 2 turns + high critical hit ratio (Razor Wind)
40 = always cuts half of foe's current HP
41 = always do 40 HP damage (Dragon Rage)
42 = Bind/Fire Spin/Clamp/Whirlpool effect
43 = high critical hit ratio
44 = hits twice (Double Kick)
45 = if miss, then user receives 1/8 of damage it would have dealt (Jump Kick)
46 = stops stat changes (Mist)
47 = raises user's critical-hit ratio
48 = recoil damage, 1/4 of damage (Take Down)
49 = Confuse target
50 = sharply raises users Attack
51 = sharply raises users Defense
52 = sharply raises users Speed
53 = sharply raises users Special Attack
54 = sharply raises users Special Defense
57 = Transform
58 = sharply reduces foe's Attack
59 = sharply reduces foe's Defense
60 = sharply reduces foe's Speed
61 = sharply reduces foe's Special Attack
62 = sharply reduces fow's Special Defense
65 = Reflect
66 = poisons the target (again, for some reason)
67 = paralyzes the target (again, for some reason)
68 = lower opponent's Attack
69 = lower opponent's Defense
70 = lower opponent's Speed
71 = lower opponent's Special Attack
72 = lower opponent's Special Defense
73 = lower opponent's accuracy
75 = takes 2 turns, may cause opponent to flinch
76 = may Confuse target
77 = hits twice, may poison opponent (Twineedle)
78 = never misses, but attacks second
79 = Substitute
80 = immobile next turn (Hyper Beam)
81 = raises user's Attack every time is hit (Rage)
82 = Mimic
83 = Metronome
84 = steals opponent HP every turn (Leech Seed)
85 = Splash
86 = Disable
87 = damage is equal to user's level (Seismic Toss/Night Shade)
88 = amount of damage done varies (Psywave)
89 = Counter
90 = Encore
91 = Pain Split
92 = can only use this attack if user is asleep (Snore)
93 = Conversion 2
94 = next move after will not miss (Mind Reader)
95 = Sketch
97 = Sleep Talk
98 = Destiny Bond
99 = inflicts more damage if user has less HP (Flail, Reversal)
100 = Spite (cuts opponent's PP)
101 = False Swipe (will never make opponent faint)
102 = heals all status problems
103 = always attacks first
104 = attacks 3 times, gets stronger each time (Triple Kick)
105 = steal foe's held item
106 = prevents foe from fleeing/switching
107 = inflicts 1/4 damage on sleeping foe (Nightmare)
108 = raises user's evasion, receives double damage from Stomp
109 = Curse
111 = Protect/Detect
112 = Spikes
113 = Foresight
114 = Perish Song
115 = Sandstorm
116 = Endure
117 = Rollout/Ice Ball
118 = Swagger
119 = Fury Cutter
120 = Attract
121 = higher attack power if Pokemon happiness is higher
122 = Present
123 = higher attack power if Pokemon happiness is lower
124 = prevents all status problems from user
125 = thaw out if frozen, may burn target (Flame Wheel/Sacred Fire)
126 = Magnitude
127 = Baton Pass
128 = Pursuit
129 = Rapid Spin (removes Fire Spin, Whirlpool, etc.)
130 = always do 20 HP damage (SonicBoom)
132 = Morning Sun
133 = Synthesis
134 = Moonlight
135 = Hidden Power
136 = Rain Dance
137 = Sunny Day
138 = 10% chance of raising user's Defense (Steel Wing)
139 = may raise user's Attack (Metal Claw)
140 = may raise user's Attack, Defense, Speed, Special Attack, and Special Defense
142 = maximizes Attack, HP is cut in half (Belly Drum)
143 = Psych Up
144 = Mirror Coat (special version of Counter)
145 = takes 2 turns, raises user's Defense (Skull Bash)
146 = may flinch opponent, double the damage if opponent uses Fly or Bounce
147 = does double the damage if opponent is using Dig
148 = Future Sight
149 = does double the damage is opponent is using Fly or Bounce
150 = may cause flinching + attack power is doubled if opponent used Minimize
151 = takes 2 turns, unless Sunny Day is in effect. Only 1/2 the damage if Rain Dance, Sandstorm, or Hail
152 = Thunder (there's many effects associated exclusively with this move)
153 = Teleport
154 = Beat Up
155 = takes 2 turns
156 = raises user's Defense, power of Rollout and Ice Ball is now doubled
157 = Softboiled/Milk Drink (Recover, but usable out of battle)
158 = Attacks first, causes flinching (Fake Out)
159 = Prevents sleep, attacks for 2-5 turns (Uproar)
160 = Stockpile
161 = Spit Up
162 = Swallow
164 = Hail
165 = Torment
166 = Confuses foe, but raises foe's Special Attack
167 = Burns the foe, but doesn't affect Fire types
168 = Memento
169 = Boosts Attack when burned, paralyzed, or poisoned
170 = takes 2 turns, but if hit user flinches (Focus Punch)
171 = Stronger against paralyzed foes, but heals the paralysis (SmellingSalt)
172 = Makes foes attack only the user (Follow Me)
173 = Nature Power
174 = Next electric move used is now stronger (Charge)
175 = Taunt
176 = Helping Hand
177 = Trades held items with foe
178 = copies opponent's special ability
179 = Wish
180 = attacks randomly with one of partner's moves (Assist)
181 = Ingrain
182 = lowers user's Attack and Defense
183 = Magic Coat
184 = Recycle
185 = double the damage if user was hurt by opponent in the same turn
186 = destroyes Light Screen and Reflect (Brick Break)
187 = Yawn
188 = opponent loses held item (Knock Off)
189 = Endeavor
190 = the higher user's HP, the more damage
191 = user swaps abilities with opponenet (Skill Swap)
192 = Imprison
193 = Refresh
194 = Grudge
195 = Snatch
196 = more damage on heavier foes (Low Kick)
197 = Secret Power
198 = recoil damage, 1/3 of damage (Double-Edge)
199 = confuses all Pokemon on the scene (Teeter Dance)
200 = high critical hit ratio + may cause burn (Blaze Kick)
201 = Mud Sport
202 = damage + badly poison target
203 = type and power depends on weather (Weather Ball)
204 = sharply lowers Special Attack after use (Overheat)
205 = lower's opponent's Attack and Defense (Tickle)
206 = raises user's Defense and Special Defense (Cosmic Power)
207 = can hit an opponent using Fly or Bounce (Sky Uppercut)
208 = raises user's Attack and Defense (Bulk Up)
209 = high critical hit ratio + poison
210 = Water Sport
211 = raises user's Special Attack and Special Defense (Calm Mind)
212 = raises user's Attack and Speed (Dragon Dance)
213 = Camouflage

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

http://i1343.photobucket.com/albums/o792/Prog2/EA_zpsf131f914.png


http://i1343.photobucket.com/albums/o792/Prog2/EB_zpsfc993947.png


http://i1343.photobucket.com/albums/o792/Prog2/EC_zps54a29945.png


http://i1343.photobucket.com/albums/o792/Prog2/ED_zpsbaac6e43.png


http://i1343.photobucket.com/albums/o792/Prog2/EE_zps859af293.png


Step Five

Now you are at the move effect for Psycho Boost. To know where the data ends, you need to navigate back to the pointer for Psycho Boost (where we just were before) and see the next closest pointer. I can see that another move effect has a pointer to 0x1D8426, so I know that Psycho Boost's effect is from addresses 0x1D841B to 0x1D8425.

http://i1343.photobucket.com/albums/o792/Prog2/EF_zps393216c9.png


Step Six

This is the data for Psycho Boost.

Addresses 0x1D841B - 0x1D8425

2E 85 3E 02 02 FB 28 00 69 1D 08

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:

2E 85 3E 02 02 FB 28 00 69 1D 08

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


C1: Puts yourself to sleep.
C2: Poisons yourself.
C3: Burns yourself.
C4: Freezes yourself.
C5: Paralyzes yourself.
C6: Badly poisons yourself.
C7: Confuses yourself.
C9: Freezes opponent.
CA: Uproar's effect.
CB: Payday's effect.
CD: Sand Tomb's effect.
CE: 1/4 Recoil damage.
CF: Raises users attack one level.
D0: Raises users defense one level.
D1: Raises users speed one level.
D2: Raises users special attack one level.
D3: Raises users special defense one level.
D4: Raises users accuracy one level.
D5: Raises users evasion one level.
D6: Lowers users attack one level.
D7: Lowers users defense one level.
D8: Lowers users speed one level.
D9: Lowers users special attack one level.
DA: Lowers users special defense level.
DB: Lowers users accuracy level.
DC: Lowers users evasion one level.
DD: Takes a turn to recover (Hyper Beam, etc...)
DF: Thief's effect
E2: Users stats all raise one level (Except Accuracy and Evasion).
E5: Users attack and defense lower one level.
E6: 1/3 Recoil.
E7: Users attack raises two levels.
E8: Users defense raises two levels.
E9: Users speed raises two levels.
EA: Users special attack raises two levels.
EB: Users special defense raises two levels.
EC: Users accuracy raises two levels.
ED: Users evasion raises two levels.
EE: Users attack lowers two levels.
EF: Users defense lowers two levels.
F0: Users speed lowers two levels.
F1: Users special attack lowers two levels.
F2: Users special defense lowers two levels.
F3: Users accuracy lowers two levels.
F4: Users evasion lowers two levels.
F5: Outrage's effect.
F6: Knock Off's effect.
FB: Users special attack lowers two levels.

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:

2E 85 3E 02 02 D8 28 00 69 1D 08

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).

http://i1343.photobucket.com/albums/o792/Prog2/FA_zps6ff78a22.png


http://i1343.photobucket.com/albums/o792/Prog2/FB_zps231a3406.png

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!

I'll use his example from his thread.

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:

00 01 5E 69 1D 08 00 00 02 03 04 05 06 07 09 0A 0E 5C 00 3A 0B 00 0C 00 0D 12 40 00 0F 12 40 00

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:

2E 85 3E 02 02 E6 28 00 69 1D 08

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:

00 01 5E 69 1D 08 00 00 02 03 04 05 06 07 09 0A 0E 5C 00 3A 0B 00 0C 00 0D 12 40 00 0F 12 40 00 2E 85 3E 02 02 E6

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:

00 01 5E 69 1D 08 00 00 02 03 04 05 06 07 09 0A 0E 5C 00 3A 0B 00 0C 00 0D 12 40 00 0F 12 40 00 2E 85 3E 02 02 E6 15

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.

2E 85 3E 02 02 03 28 00 69 1D 08

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:

00 01 5E 69 1D 08 00 00 02 03 04 05 06 07 09 0A 0E 5C 00 3A 0B 00 0C 00 0D 12 40 00 0F 12 40 00 2E 85 3E 02 02 E6 152E 85 3E 02 02 03 15

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:

00 01 5E 69 1D 08 00 00 02 03 04 05 06 07 09 0A 0E 5C 00 3A 0B 00 0C 00 0D 12 40 00 0F 12 40 00 2E 85 3E 02 02 E6 15 2E 85 3E 02 02 03 15 28 47 69 1D 08

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.

U-Turn/Volt Tackle - Made by Me (Itman)

00 01 5E 69 1D 08 00 00 02 03 04 05 06 07 09 0A 0E 5C 00 3A 0B 00 0C 00 0D 12 40 00 0F 12 40 00 4F 81 47 69 1D 08 50 01 F2 7D 1D 08 E2 01 3A 51 01 02 58 01 4C 01 4D 01 73 01 10 03 00 4E 01 01 3A 52 01 28 4E 69 1D 08 28 47 69 1D 08


Wake-Up Slap - Made by Me (Itman)

1D 00 00 00 00 01 00 69 1D 08 2E 85 3E 02 02 A3 1C 00 07 00 00 00 77 04 90 08 28 00 69 1D 08 2E D2 3F 02 02 02 28 00 69 1D 08


Hammer Arm - Made by me (Itman)

2E 85 3E 02 02 D8 28 00 69 1D 08


Flare Blitz - Made by Jambo51

00 01 5E 69 1D 08 00 00 02 03 04 05 06 07 09 0A 0E 5C 00 3A 0B 00 0C 00 0D 12 40 00 0F 12 40 00 2E 85 3E 02 02 E6 15 2E 85 3E 02 02 03 15 28 47 69 1D 08

Quiver Dance -Made by pawell6

00 02 03 1D 00 00 00 00 01 F2 7D 1D 08 1C 00 07 00 00 00 B0 69 1D 08 84 CC 69 1D 08 1C 00 FF 00 00 00 F2 7D 1D 08 01 F2 7D 1D 08 00 00 1F 00 20 00 39 8B 1D 08 09 0A 2E 85 3E 02 02 52 15 2E 85 3E 02 02 53 15 2E 85 3E 02 02 51 15 28 47 69 1D 08

Coil - Made by Garuga17

00 02 03 1D 00 00 00 00 01 F2 7D 1D 08 1C 00 07 00 00 00 B0 69 1D 08 84 CC 69 1D 08 1C 00 FF 00 00 00 F2 7D 1D 08 01 F2 7D 1D 08 00 00 1F 00 20 00 39 8B 1D 08 09 0A 2E 85 3E 02 02 CF 15 2E 85 3E 02 02 D0 15 2E 85 3E 02 02 D4 15 28 47 69 1D 08

Close Combat - Made by pawell6

00 01 5E 69 1D 08 00 00 02 03 04 05 06 07 09 0A 0E 5C 00 3A 0B 00 0C 00 0D 12 40 00 0F 12 40 00 2E 85 3E 02 02 D7 15 2E 85 3E 02 02 DA 15 28 47 69 1D 08

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).

timson733333
October 16th, 2012, 03:24 PM
WHOA

whoawhoawhoawhoawhoa

This is amazing. I love how you adapted Jambo's tutorial into an easy, picture-followable tutorial. And adding the effects - I don't have time to do it right now but this will be VERY VERY VERY useful in the future. Thank you! :)

but I base most of my experiments on Ruby and all of this is for FireRed

/ragemovetofirered

Chaos Rush
October 16th, 2012, 03:31 PM
In case anyone is wondering about attack animations, here is what I've documented on it:
http://www.pokecommunity.com/showthread.php?t=281520

Hopefully with itman's tutorial, we'll finally start seeing more hacks with Gen IV/V/custom moves. I linked to my thread so people won't make new moves using existing animations, because custom animations are cool :P

TheOrangePichu
October 16th, 2012, 04:06 PM
Funny, I was just thinking of this the other day. Finally, now with Jambo's patch, Rush's Pokemon Sprites, and now the ability to insert new moves, we can finally have 4th and 5th gen Pokemon and there moves in Pokemon Fire Red! Now if only we could add new abilities...

FirEmerald
October 16th, 2012, 04:39 PM
Did you know that someone made a repointer for pokemon GBA games that would simplify this process?

Jambo51
October 17th, 2012, 04:43 AM
Excellent tutorial, sir. Although, I did notice you forgot to change the animations pointer in PGE's ini, which could lead to bugs down the line. :P

Funny, I was just thinking of this the other day. Finally, now with Jambo's patch, Rush's Pokemon Sprites, and now the ability to insert new moves, we can finally have 4th and 5th gen Pokemon and there moves in Pokemon Fire Red! Now if only we could add new abilities...

We CAN add abilities (as I have done in my 649 Patch Project). Unfortunately, however, the vast majority can only be inserted at an ASM level, making it largely inaccessible to most hackers. Some can be inserted at the Battle Scripting level though, such as adding the Multitype clause to Transform.

timson733333
October 20th, 2012, 04:59 PM
Step 14 should say "2041", not "2401." Just a little note.

LCCoolJ95
October 20th, 2012, 05:54 PM
I tried doing this for Ruby, but you lost me at Step 15. Where is the Attack Animation offset?

timson733333
October 20th, 2012, 06:04 PM
I tried doing this for Ruby, but you lost me at Step 15. Where is the Attack Animation offset?

It's not in roms.ini. You have to find it yourself. Same thing happened to me, so I moved to FireRed :/

Also, when we select, is 4260 bytes in hex or in decimal?

DoesntKnowHowToPlay
October 21st, 2012, 06:21 AM
This looks like it will be very helpful for people to start learning, but I'd like to point out that that Hammer Arm script will not pierce Clear Body like in the vanilla games- you have to do a little more work. (This is actually quite important as one of the most well-known users of Hammer Arm is Metagross.)

Using JPAN's old thread on Battle Scripts, I was able to piece together one that does:

Edit: This script is old and will fail on misses/hitting immunities, look on page 4 for a better one

00 01 5E 69 1D 08 00 00 02 03 04 05 06 07 09 0A 0E 5C 00 3A 0B 00 0C 00 0D 12 40 00 0F 12 40 00 20 01 00 03 00 47 69 1D 08 2E DF 3F 02 02 00 48 01 08 09 2E DE 3F 02 02 93 89 C1 ED 84 1D 08 13 7C E5 3F 08 12 40 00 28 47 69 1D 08

And the decompiled logic for those wondering what I'm doing:


HAMMER ARM- (after damage)
20 - Jump if stat modifier
- 01 (user)
- 00 stat equal to
- 03 speed
- 00 (-6)
- 47 69 1D 08
2E - set byte
- DF 3F 02 02
- 00
48 - Display stat mod animation
- 01
- 08
- 09
2E - set byte
- DE 3F 02 02
- 93
89 - change stats
- C1 (user, can't fail)
- ED 84 1D 08 (does this matter?)
13 - print from table
- 7C E5 3F 08
12 - wait for text
- 40 00
28 - jump
- 47 69 1D 08

Also, a bit of cautionary advice- if any of the effects you're inserting are important enough that you want the AI to use them in battle, make sure they replace appropriate effects. For example, there was a Japanese hack that replaced Nightmare's somewhat useless effect with one similar to Relic Song (10% chance to inflict Sleep), which is fun for the player, but was useless for the AI because it would only use the attack if either it was their only option or the foe was already asleep. I currently have no idea how the AI treats effects in unused slots, so be careful with those.

LCCoolJ95
October 21st, 2012, 11:18 AM
It's not in roms.ini. You have to find it yourself. Same thing happened to me, so I moved to FireRed :/

Also, when we select, is 4260 bytes in hex or in decimal?
I tried using a technique that incorporated using Fire Red's hex values. I was going to copy the beginning of the hex values and find them in the Ruby rom. It didn't work. Though, I found the first two hex values of the animations from Fire Red and in Ruby. The rest didn't match up though...

Chaos Rush
October 25th, 2012, 08:57 PM
I tried using a technique that incorporated using Fire Red's hex values. I was going to copy the beginning of the hex values and find them in the Ruby rom. It didn't work. Though, I found the first two hex values of the animations from Fire Red and in Ruby. The rest didn't match up though...
Pointers are going to be different between ROMs. The Attack Animation offset is a table, and a table in terms of ROM hacking, is a collection of pointers that the game refers to. So obviously tables will be completely different, but they will be in the same format. In order to find the Attack Animation Table in Ruby, what you should do is this:

1. Go to the offset of the table in a FireRed ROM
2. Go to the offset that the first pointer lists in the table
3. NOW search for that hex data in a Ruby ROM
4. Look at the offset that the search took you in the Ruby ROM, then convert it to a pointer
5. Search for your new pointer in the Ruby ROM
6. You should now be at the Animation Table for Ruby

Yogi1881
October 27th, 2012, 06:29 PM
Would this apply to Hm's as well?
And would this allow you to give tms an Hm's effect (i.e. Tm Dig actually Digging with the same effects of Dive)

Chaos Rush
October 28th, 2012, 12:01 AM
@itman: Your Wake-Up Slap script doesn't work. If the opponent is not asleep, it works fine. But if the opponent is asleep, the game freezes.

itman
October 28th, 2012, 08:19 AM
@itman: Your Wake-Up Slap script doesn't work. If the opponent is not asleep, it works fine. But if the opponent is asleep, the game freezes.

I just tested it and it worked for me. All I did was edit smellingsalt's effect to check for sleep and then wake them up. So all I changed was two bytes.

LCCoolJ95
November 9th, 2012, 05:59 PM
I've successfully added 125 or more moves to the game. The question is, how come every time I try to use that move in game, the move does crap? Seriously, I tried using Blue Flare, but the game just reset itself, and when I tried using Bolt Strike, the game froze. And, when I tried to check out the description in the Summary window of either move, a bunch of random symbols and numbers appeared, freezing the game. Can someone please help me with this? I'm trying to make a Black 2/White 2 demake for Ruby, and I need the extra moves to work. :/

Maybe it's because there is no animation data...where is the tutorial for that?

dreamengine
November 11th, 2012, 12:26 PM
Does anyone else have errors with PGE when trying to edit the newer versions of Psywave, Focus Energy, and Reflect? It's weird, but yeah...

Also, when using the moves WITHOUT removing the limiter it says Bulbasaur used a NORMAL move when trying to use a move I added. When I got rid of the limiter it made it so that even the trainer I'm battling's pokemon moves say that. For example it'd be like Bulbasaur used a normal move. Foe Charmander used a normal move. help? lol

On to trying move effects =.= I fail

EDIT: Where did the the offset 0x1D6947 come from for the flare blitz part?

timson733333
November 11th, 2012, 05:29 PM
Also, when using the moves WITHOUT removing the limiter it says Bulbasaur used a NORMAL move when trying to use a move I added. When I got rid of the limiter it made it so that even the trainer I'm battling's pokemon moves say that. For example it'd be like Bulbasaur used a normal move. Foe Charmander used a normal move. help? lol

At 0xD75FC, you are supposed to overwrite the bytes with 00 00 00 00 00 00. Not 00 00 00 00 00 00 00 00. Overwriting the last two will make every move say "X used a <TYPE> move!" This is another error in the guide that should be fixed.

itman
November 11th, 2012, 08:56 PM
At 0xD75FC, you are supposed to overwrite the bytes with 00 00 00 00 00 00. Not 00 00 00 00 00 00 00 00. Overwriting the last two will make every move say "X used a <TYPE> move!" This is another error in the guide that should be fixed.

*Fixed. ;) Thanks for letting me know, I didn't even realize I put too many 00's lol.

dreamengine
November 12th, 2012, 08:52 AM
At 0xD75FC, you are supposed to overwrite the bytes with 00 00 00 00 00 00. Not 00 00 00 00 00 00 00 00. Overwriting the last two will make every move say "X used a <TYPE> move!" This is another error in the guide that should be fixed.

:D thank youu. I was thinking that I probably screwed up somewhere. After all I am very bad at this.

SchokoInc
November 23rd, 2012, 03:54 AM
Thanks for the amazing tutorial it worked perfectly for me :)
Still i have one major problem that prevents me from fully using and editing my moves :(
As the GameEditor doesn't work for me i use several other editors like YAPE (which also lets me fix the pointers and allowed me to add my new moves to my pokemon even if they are now just named Pound or Karate Chop) but i haven't found a move editor yet that let's me change the .ini to repoint the move table and makes it editable :(
When i opened up the .ini for A-tack the offsets shown for names/data are

[Nameoffset]
offset=2388129

[Dataoffset]
offset=2427908

which is quite confusing and changing them to my new offsets scrambles everything up :(
(YAPE had the correct offsets for moves in the .ini and changing went perfectly so there is nothing wrong with the rom itself)

EDIT: While not fixing the problem itself i solved the problem by overwriting the ORIGINAL move data instead of the newly created ones :)

Jambo51
November 24th, 2012, 03:20 AM
EDIT: Where did the the offset 0x1D6947 come from for the flare blitz part?

It's part of the main Battle Script Attack Handler, all moves branch back to it at some stage. In this case, it's the relevant part needed to execute the remaining effects and faints and such.

Thanks for the amazing tutorial it worked perfectly for me :)
Still i have one major problem that prevents me from fully using and editing my moves :(
As the GameEditor doesn't work for me i use several other editors like YAPE (which also lets me fix the pointers and allowed me to add my new moves to my pokemon even if they are now just named Pound or Karate Chop) but i haven't found a move editor yet that let's me change the .ini to repoint the move table and makes it editable :(
When i opened up the .ini for A-tack the offsets shown for names/data are

[Nameoffset]
offset=2388129

[Dataoffset]
offset=2427908

which is quite confusing and changing them to my new offsets scrambles everything up :(
(YAPE had the correct offsets for moves in the .ini and changing went perfectly so there is nothing wrong with the rom itself)

EDIT: While not fixing the problem itself i solved the problem by overwriting the ORIGINAL move data instead of the newly created ones :)

You can't use any editor apart from PGE for the new moves or for applying them. No older editor supports them properly. YAPE especially, is a bad choice of editor for this new move stuff!

Kyain
November 24th, 2012, 05:39 AM
The tutorial works perfectly, I'm just having a problem with repointing animations on one of the new moves. I saw Chaos Rush's post on Roost, and I decided to put it in my game. For the animation pointer, I just copied FeatherDance's animation pointer. After I finish the introduction scene, and it sends me to the hero's room in Pallet Town, the game either:
1) VBA displays a BIOS error(?!)
2) It becomes completely silent and black. I can't continue in the game.

I think this has to do with the fact also that all the animation pointers are not 'normal' pointers...

dreamengine
November 25th, 2012, 12:41 PM
I'm trying to make the effects for Thunder fang, ice fang, and fire fang, but when I do I feel like the effect rates are really low. The flinch works fine almost too much because it seems like it's every other move, but the paralyze, freeze, and burn almost never happen. I'm not quite sure what to do because there's no effect that make paralyze freeze and burn happen 100% of the time. Here is my code for thunder fang.

Thunder Fang
01 5E 69 1D 08 00 00 02 03 04 05 06 07 09 0A 0E 5C 00 3A 0B 00 0C 00 0D 12 40 00 0F 12 40 00 2E 85 3E 02 02 08 15 2E 85 3E 02 02 05 15 28 47 69 1D 08

PokemonMasters
December 19th, 2012, 11:17 PM
For some reason, whenever I apply the hacked engine before I do this, it doesnt work.

Jambo51
December 20th, 2012, 06:16 AM
I'm trying to make the effects for Thunder fang, ice fang, and fire fang, but when I do I feel like the effect rates are really low. The flinch works fine almost too much because it seems like it's every other move, but the paralyze, freeze, and burn almost never happen. I'm not quite sure what to do because there's no effect that make paralyze freeze and burn happen 100% of the time. Here is my code for thunder fang.

Thunder Fang
01 5E 69 1D 08 00 00 02 03 04 05 06 07 09 0A 0E 5C 00 3A 0B 00 0C 00 0D 12 40 00 0F 12 40 00 2E 85 3E 02 02 08 15 2E 85 3E 02 02 05 15 28 47 69 1D 08

Firstly, the fang moves don't have 100% chance to burn/freeze/paralyze, they have the same chance as the flinch.

Secondly, to make an effect have 100% chance of hitting the target, you need to change the 0x15 that's tagged onto the end of the effect to a 0x16 instead.

This makes it ignore the chance, and give the status, as long as the status can be given.

Hope this helps!

dreamengine
December 25th, 2012, 12:43 AM
Firstly, the fang moves don't have 100% chance to burn/freeze/paralyze, they have the same chance as the flinch.

Secondly, to make an effect have 100% chance of hitting the target, you need to change the 0x15 that's tagged onto the end of the effect to a 0x16 instead.

This makes it ignore the chance, and give the status, as long as the status can be given.

Hope this helps!

It's been awhile since I made that so I don't even remember what I did. However I know that I was trying to make the effects 100% because I thought I could change that chance with PGE. Don't ask me why lol.

What was hard was I didn't know the hex value for flinch to be 10 nor did I know the paralysis or freeze value for 10%

PokemonMasters
December 25th, 2012, 03:06 AM
Ok so Does this happen to anyone else?
When I update the roms .ini and it says the roms .ini has been updated it doesn't show the new moves.
But when it says unexpected error occured then it exits then I go back on, it shows the moves.

dreamengine
December 25th, 2012, 10:13 PM
Ok so Does this happen to anyone else?
When I update the roms .ini and it says the roms .ini has been updated it doesn't show the new moves.
But when it says unexpected error occured then it exits then I go back on, it shows the moves.

Make sure you don't have your rom opened up in a hex editor

I hate to double post but I felt this is somewhat important. Here's my record of the all the effects between 00-C0. I unfortunately don't know how to figure out the the effect percentage, but if I figure it out I will edit :)

01 - sleep target
02 - poison target
03 - paralyze target
04 - freeze target
05 - paralyze target
06 - poison target
07 - confuse target
08 - flinch target
09 - freeze - target
0a - N/A
0b - N/A
0c - N/A
0d - N/A
0e - recoil
0f - raise target’s attack
10 - raise target’s defense
11 - raise target’s speed
12 - raise target’s sp. attack
13 - raise target’s sp. defense
14 - raise target’s accuracy
15 - raise target’s evasion
16 - lowers target’s attack
17 - lowers target’s defense
18 - lowers target’s speed
19 - lowers target’s sp. attack
1a - lowers target’s sp. defense
1b - lowers target’s accuracy
1c - lowers target’s evasion (makes user miss)
1d - recharge
1e - N/A
1f - N/A
20 - N/A
21 - N/A
22 - raise all of users stats except accuracy and evasion
23 - N/A
24 - N/A
25 - N/A
26 - recoil
27 - sharply raise target’s attack
28 - sharply raise target’s defense
29 - sharply raise target’s speed
2a - sharply raise target’s sp. attack
2b - sharply raise target’s sp. defense
2c - sharply raise target’s accuracy
2d - sharply raise target’s evasion
2e - sharply lower target’s attack
2f - sharply lower target’s defense
30 - sharply lower target’s speed
31 - sharply lower target’s sp. attack
32 - sharply lower target’s sp. defense
33 - sharply lower target’s accuracy
34 - sharply lower target’s evasion
35 - confuses target
36 - N/A
37 - N/A
38 - N/A
39 - N/A
3a - N/A
3b - lowers user sp. attack
3c - N/A
3d - N/A
3e - N/A
3f - N/A
40 - N/A
41 - puts user to sleep (no animation)
43 - burns user (no animation)
44 - freezes user (no animation)
45 - paralyzes user (no animation)
46 - N/A
47 - confuses user (no animation)
48 - N/A
49 - burns/freezes/paralyzes target
4a - uproar’s effect
4b - pay day’s effect
4c - N/A
4d - N/A
4e - recoil
4f - raise user’s attack
50 - raise user’s defense
51 - raise user’s speed
52 - raise user’s sp. attack
53 - raise user’s sp. defense
54 - raise user’s accuracy
55 - raise user’s evasion
56 - lowers user’s attack
57 - lowers user's defense
58 - lowers user’s speed
59 - lowers user’s sp. attack
5a - lowers user’s sp. defense
5b - lowers user’s accuracy
5c - lowers user’s evasion
5d - recharge
5e - N/A
5f - N/A
60 - N/A
61 - N/A
62 - raises all of user’s stats but accuracy and evasion
63 - N/A
64 - N/A
65 - lowers user’s attack and defense
66 - recoil
67 - sharply raises user's attack
68 - sharply raise user's defense
69 - sharply raise user's speed
6a - sharply raise user's sp. attack
6b - sharply raise user's sp. defense
6c - sharply raise user's accuracy
6d - sharply raise user's evasion
6e - sharply lower user's attack
6f - sharply lower user's defense
70 - sharply lower user's speed
71 - sharply lower user's sp. attack
72 - sharply lower user's sp. defense
73 - sharply lower user's accuracy
74 - sharply lower user's evasion
75 - N/A
76 - N/A
77 - N/A
78 - N/A
79 - N/A
7a - N/A
7b - harshly lowers user’s sp attack (only happens 3 times)
81 - puts target to sleep
82 - poisons target
83 - burns target
84 - freezes target
85 - paralyzes target
86 - poisons target
87 - confuses target
88 - target flinches
89 - burn/paralyze/freeze target
8a - N/A
8b - N/A
8c - N/A
8d - N/A
8e - recoil
8f - raise target’s attack
90 - raise target’s defense
91 - raise target’s speed
92 - raise target’s sp. attack
93 - raise target’s sp. defense
94 - raise target’s accuracy
95 - raise target’s evasion
96 - lowers target’s attack
97 - lowers target’s defense
98 - lowers target’s speed
99 - lowers target’s sp. attack
9a - lowers target’s sp. defense
9b - lowers target’s accuracy
9c - lowers target’s evasion
9d - recharge
9e - N/A
9f - N/A
a0 - N/A
a1 - N/A
a2 - raises all stats but accuracy and evasion
a3 - N/A
a4 - N/A
a5 - lowers user’s attack and defense
a6 - recoil
a7 - raise target’s attack
a8 - raise target’s defense
a9 - raise target’s speed
aa - raise target’s sp. attack
ab - raise target’s sp. defense
ac - raise target’s accuracy
ad - raise target’s evasion
ae - lowers target’s attack
af - lowers target’s defense
b0 - lowers target’s speed
b1 - lowers target’s sp. attack
b2 - lowers target’s sp. defense
b3 - lowers target’s accuracy
b4 - lowers target’s evasion
b5 - confuse target
b6 - N/A
b7 - N/A
b8 - N/A
b9 - N/A
ba - N/A
bb - sharply lowers user’s sp. attack
bc - N/A
bd - N/A
be - N/A
bf - N/A

Pedroizt
December 30th, 2012, 10:47 AM
Well, I managed to create one move called "Iced Shell" based in Gray magic in Fairy Tail, but have a little problem: each effect (Freeze + Selfdestruct) causes a little damage in opponent. If anyone knows how to fix, i would be grateful.

00 01 5E 69 1D 08 00 00 02 03 04 05 06 07 09 0A 0E 5C 00 3A 0B 00 0C 00 0D 12 40 00 0F 12 40 00 2E 85 3E 02 02 84 15 00 02 03 78 79 3A 29 05 CC 3D 02 02 01 91 6A 1D 08 41 E7 6A 1D 08 28 93 6A 1D 08 09 0A 25 04 05 06 07 01 CC 6A 1D 08 00 00 0E 5C 00 3A 0B 00 0C 00 0D 12 40 00 0F 12 40 00 19 00 00 00 00 00 00 2E D8 3F 02 02 00 49 02 10 7A 93 6A 1D 08 19 01 00 00 00 00 00 3D 0E 0F 12 40 00 2E D8 3F 02 02 00 49 02 10 7A 93 6A 1D 08 19 01 00 00 00 00 00 3D 36 CC 3D 02 02 01 09 0A 33 CC 3D 02 02 01 3C 15 28 4E 69 1D 08

pawell6
January 7th, 2013, 03:12 PM
Is there any easy way to change descriptions of new attacks in PGE? I know I can change description pointers to old ones, but i don't know how to make a new description.

Garuga17
January 16th, 2013, 06:05 PM
Is it possible to create a move with 3 stats-upper? Like quiver-dance, or coil?

pawell6
January 26th, 2013, 03:08 PM
I don't know if this is something new, but I figured out code for quiver dance:
00 02 03 1D 00 00 00 00 01 F2 7D 1D 08 1C 00 07 00 00 00 B0 69 1D 08 84 CC 69 1D 08 1C 00 FF 00 00 00 F2 7D 1D 08 01 F2 7D 1D 08 00 00 1F 00 20 00 39 8B 1D 08 09 0A 2E 85 3E 02 02 52 15 2E 85 3E 02 02 53 15 2E 85 3E 02 02 51 15 28 47 69 1D 08

Garuga17
January 26th, 2013, 10:43 PM
I don't know if this is something new, but I figured out code for quiver dance:
00 02 03 1D 00 00 00 00 01 F2 7D 1D 08 1C 00 07 00 00 00 B0 69 1D 08 84 CC 69 1D 08 1C 00 FF 00 00 00 F2 7D 1D 08 01 F2 7D 1D 08 00 00 1F 00 20 00 39 8B 1D 08 09 0A 2E 85 3E 02 02 52 15 2E 85 3E 02 02 53 15 2E 85 3E 02 02 51 15 28 47 69 1D 08


Wow! dude is this really works? just exactly what i need! thx a lot :D

EDIT: Oh wait, it didnt work, it do nothing(the game is not freeze btw)

pawell6
January 27th, 2013, 09:20 AM
Wow! dude is this really works? just exactly what i need! thx a lot :D

EDIT: Oh wait, it didnt work, it do nothing(the game is not freeze btw)

Strange, I checked it once more and it seems to be working for me. Just make sure you put the effect in expanded table of effects.

If you removed last poniter (5F 86 1D 08) in the step 3, you can try this: in PGE set move effect to lower number (e.g. if you set it to 214, make it 213). Hope it'll help.

Garuga17
January 27th, 2013, 09:30 PM
Strange, I checked it once more and it seems to be working for me. Just make sure you put the effect in expanded table of effects.

If you removed last poniter (5F 86 1D 08) in the step 3, you can try this: in PGE set move effect to lower number (e.g. if you set it to 214, make it 213). Hope it'll help.

Ah yes! It works!! Thx a lot for making this code dude, i spent hours to make it (i know, i'm suck lol) :D

Hope itman will post this at the first page, cause this code is works.

itman
January 28th, 2013, 08:56 PM
Ah yes! It works!! Thx a lot for making this code dude, i spent hours to make it (i know, i'm suck lol) :D

Hope itman will post this at the first page, cause this code is works.

Put it on first page. :)
I'm so glad everyone is helping expand on this. I finally have time again to hack, so hopefully I'll be able to find some more. :)

pawell6
January 29th, 2013, 09:19 AM
Here's a code for close combat:
00 01 5E 69 1D 08 00 00 02 03 04 05 06 07 09 0A 0E 5C 00 3A 0B 00 0C 00 0D 12 40 00 0F 12 40 00 2E 85 3E 02 02 D7 15 2E 85 3E 02 02 DA 15 28 47 69 1D 08

BTW the code for quiver dance was made by me. Could you fix it on the first page? :(

Garuga17
January 30th, 2013, 02:53 AM
Put it on first page. :)
I'm so glad everyone is helping expand on this. I finally have time again to hack, so hopefully I'll be able to find some more. :)


Thx for putting it on the first page, btw the quiver dance code is made by pawell6, not me :3

Btw, in case everyone need it, here is the code for coil:

00 02 03 1D 00 00 00 00 01 F2 7D 1D 08 1C 00 07 00 00 00 B0 69 1D 08 84 CC 69 1D 08 1C 00 FF 00 00 00 F2 7D 1D 08 01 F2 7D 1D 08 00 00 1F 00 20 00 39 8B 1D 08 09 0A 2E 85 3E 02 02 CF 15 2E 85 3E 02 02 D0 15 2E 85 3E 02 02 D4 15 28 47 69 1D 08

All i do was just editting pawell6 Q. dance code, all thx to him :D

NB: In order for the both Q.dance and Coil effect to works, make sure in PGE attack editor, you set the accuracy to '100', base power to '0', target to 'user', and just for safety reason, effct accuracy to '100'

pawell6
January 30th, 2013, 10:04 AM
NB: In order for the both Q.dance and Coil effect to works, make sure in PGE attack editor, you set the accuracy to '100', base power to '0', target to 'user', and just for safety reason, effct accuracy to '100'

You're completely right. After some research I found out that you can modify this code to ignore the chance of effect in PGE. The modified code is:

00 02 03 1D 00 00 00 00 01 F2 7D 1D 08 1C 00 07 00 00 00 B0 69 1D 08 84 CC 69 1D 08 1C 00 FF 00 00 00 F2 7D 1D 08 01 F2 7D 1D 08 00 00 1F 00 20 00 39 8B 1D 08 09 0A 2E 85 3E 02 02 52 16 2E 85 3E 02 02 53 16 2E 85 3E 02 02 51 16 28 47 69 1D 08

The bolded bytes were previously 15. 16 ignores chance of effects and it will always raise sp. atk, sp. def and speed even if chance is set to 0 in PGE. Thx for pointing this out. Certainly the first code will work correctly if chance is set to 100.

Edit: Jambo51 have already found out about effect of 16 (see post #26) so basically it's his idea.

Tomi01
January 31st, 2013, 03:21 AM
I edited the bold numbers, but the move missed with 0 (never miss) accuracy if I used Quiver Dance, so it worked like before. I tried to do this with Coil, but the game frozen. Both moves work fine with their "original" codes. Any idea?

pawell6
January 31st, 2013, 02:47 PM
I edited the bold numbers, but the move missed with 0 (never miss) accuracy if I used Quiver Dance, so it worked like before. I tried to do this with Coil, but the game frozen. Both moves work fine with their "original" codes. Any idea?

QDance works fine in the form I posted it. I checked coil posted by Garuga17. Indeed the game froze. So then I change 3 bytes for effects and it worked fine (accuracy and effect accuracy set to 0 in PGE for both moves):
00 02 03 1D 00 00 00 00 01 F2 7D 1D 08 1C 00 07 00 00 00 B0 69 1D 08 84 CC 69 1D 08 1C 00 FF 00 00 00 F2 7D 1D 08 01 F2 7D 1D 08 00 00 1F 00 20 00 39 8B 1D 08 09 0A 2E 85 3E 02 02 4F 16 2E 85 3E 02 02 50 16 2E 85 3E 02 02 54 16 28 47 69 1D 08

Apparently not all effects from Chaos Rush's list work well with modified version. For safety you can use the first method. Hope it'll help :)

itman
January 31st, 2013, 11:16 PM
Here's a code for close combat:
00 01 5E 69 1D 08 00 00 02 03 04 05 06 07 09 0A 0E 5C 00 3A 0B 00 0C 00 0D 12 40 00 0F 12 40 00 2E 85 3E 02 02 D7 15 2E 85 3E 02 02 DA 15 28 47 69 1D 08

BTW the code for quiver dance was made by me. Could you fix it on the first page? :(

I AM SO SORRY! I fixed it. :) And added your Close Combat, and Garuga's Coil (I've been using Coil Arbok lately in NU...makes my day seeing that made haha). I'm glad this is being worked on! I tested those three codes by the way and they work perfectly; you guys did a great job.

dreamengine
January 31st, 2013, 11:32 PM
1D 00 00 00 00 01 00 69 1D 08 2E 85 3E 02 02[S-HIGHLIGHT] A3[/S-HIGHLIGHT] 1C 00 [S-HIGHLIGHT]07[/S-HIGHLIGHT] 00 00 00 77 04 90 08 28 00 69 1D 08 2E D2 3F 02 02 02 28 00 69 1D 08

itman can you check your code for wake up slap again? I'm pretty sure it doesn't work as chaos rush stated oh so long ago. One of the pointers is wrong (the one bolded) and should be 8D 80 1D 08. The 07 is correct and checks for sleep which is good. The A3 unfortunately doesn't wake the target. It simply does nothing, however I'm pretty sure that's the byte that needs to change to wake a the user. What the byte is, I'm unsure.

tajaros
February 1st, 2013, 08:48 PM
I don't now why but when I do this the pointers in PGE for animations are meesed up...

EDIT: Nevermind it seems it was only my Windows 8 laptop saying that when I transferred my file to my XP laptop everything looks fine...

xutrik
February 3rd, 2013, 08:36 AM
i try to do this few monts ago and i have always trouble when i lunch this

MrDollSteak
February 6th, 2013, 11:50 PM
Absolutely fantastic tutorial, it's so easy to follow and allows for some real high level hacking.
I had one problem though, probably from copy an offset wrong by 1 byte, because all the new
moves are missing the first letter. So growl becomes rowl. For example. Also there is one move
(and only one) that seems to cause the program to crash. I'll try redoing the tutorial again to see if it was just the way in which I did it the first time!
But honestly, really amazing, especially combined with Chaos_Rush's custom animations.

EDIT: After refollowing the tutorial I no longer have a problem with the New names. However the new moves which
take the names of Defense Curl, Psywave, Focus Energy and Reflect cause the application to crash. Has this happened to anyone else?
It says unhandled exception, yada yada. But then 'Argument 'RecordNumber' is not a valid value'
So this must mean there's a problem in the hex for the move data right? If anyone knows how to fix this please let me know!

pawell6
February 7th, 2013, 07:18 PM
Absolutely fantastic tutorial, it's so easy to follow and allows for some real high level hacking.
I had one problem though, probably from copy an offset wrong by 1 byte, because all the new
moves are missing the first letter. So growl becomes rowl. For example. Also there is one move
(and only one) that seems to cause the program to crash. I'll try redoing the tutorial again to see if it was just the way in which I did it the first time!
But honestly, really amazing, especially combined with Chaos_Rush's custom animations.

EDIT: After refollowing the tutorial I no longer have a problem with the New names. However the new moves which
take the names of Defense Curl, Psywave, Focus Energy and Reflect cause the application to crash. Has this happened to anyone else?
It says unhandled exception, yada yada. But then 'Argument 'RecordNumber' is not a valid value'
So this must mean there's a problem in the hex for the move data right? If anyone knows how to fix this please let me know!

I had similar problem (at least with psywave). To fix it:
1. Make back up of your rom and ini file.
2. Open your rom wirh hex editor and go to offset: 0x4886E8.
3. Select block: 4*354=1416 bytes and copy (description attack table).
4. Use FSF, find 1416 bytes or find your own location (write down that location), select block 1416 and paste. (I pasted my at 0x950000).
5. Repointing: Go to the begining of file, Edit->Replace...->Find box: E8864808, Replace box: 00009508 (or pointer to your location from step 4) with direction down. Replace all.
6. Go to 0x950000 select block : 4*157=628 bytes, copy.
7. Go to end of new table (0x950000, first FF), select block 628 and paste.
8. Save and exit.
9. Open your ini file in notebook and go to AttackDescriptionTable for BPRE and change its value from &H4886E8 to &H950000.

I hope it'll fix the problem. :)

takeKopter
February 18th, 2013, 06:30 PM
first of all i have to say that this is a GREAT tutorial. before i read this one, i have zero knowledge about hex, now i can create my own moves.

here i have two custom moves. the only reason why i created them is because i was annoyed that two very good ability is not created yet in gen III, which are known as "Snow Warning" and "Imposter". and we all know how difficult it is to edit/create an ability, so why don't we just make moves that mimicking their effect? so i created them just for fun, here they are:

The first one is Carbon Copy. It is meant to help Ditto a lot. I created this move as a replacement for Imposter.
00 02 03 9B 09 0A 13 B4 E5 3F 08 12 40 00 15 2E 85 3E 02 02 08 15 28 4E 69 1D 08Basically it is just Transform + flinched effect, and add priority 5 = works like Imposter, right?. To make this move work, just edit ind PGE attack editor and give the "priority" 5 and "effect accuracy" 100. sadly, Inner Focus is still unaffected :( , but it is still much better than Transform, right? :D
EDIT: for type, use Dark not Normal, because it has no resistance. i don't remember if transform works for ghost type (because it is normal), just in case.
second one is Cold Call. I created this move as a replacement for Snow Warning.
00 02 03 C8 15 2E 85 3E 02 02 08 15 28 14 7A 1D 08just like Carbon Copy, it is just Hail + flinched + top priority. it still cause the hail only 5 turns, but you are still able to use it again and again. for the animation, just imagine it like Roar/Growl + Ice background (like Sheer cold/Icy wind background) or whatever crossed to your mind.those moves work for me, but you can try it and just tell if there is problem.


@itman: yes you did make a great tutorial, but replacing those pointer (like step 12) is such a pain in the feebass. you said like "just find them and replace them one by one" and there are like 200+ pointers. actually you can just use "edit>replace" or simply press ctrl+H, it saves you time.

DoesntKnowHowToPlay
February 18th, 2013, 09:39 PM
it is just Hail + flinched + top priority. it still cause the hail only 5 turns, but you are still able to use it again and again. for the animation, just imagine it like Roar/Growl + Ice background (like Sheer cold/Icy wind background) or whatever crossed to your mind.

Abomasnow used Cold Call! Foe Ninetales flinched! Foe Ninetales is hurt by hail!
Abomasnow used Cold Call! Foe Ninetales flinched! Foe Ninetales is hurt by hail!
Abomasnow used Cold Call! Foe Ninetales flinched! Foe Ninetales is hurt by hail!
Abomasnow used Cold Call! Foe Ninetales flinched! Foe Ninetales is hurt by hail!
Abomasnow used Cold Call! Foe Ninetales flinched! Foe Ninetales is hurt by hail!
...
Foe Ninetales fainted!

takeKopter
February 19th, 2013, 04:38 AM
Abomasnow used Cold Call! Foe Ninetales flinched! Foe Ninetales is hurt by hail!
Abomasnow used Cold Call! Foe Ninetales flinched! Foe Ninetales is hurt by hail!
Abomasnow used Cold Call! Foe Ninetales flinched! Foe Ninetales is hurt by hail!
Abomasnow used Cold Call! Foe Ninetales flinched! Foe Ninetales is hurt by hail!
Abomasnow used Cold Call! Foe Ninetales flinched! Foe Ninetales is hurt by hail!
...
Foe Ninetales fainted!

oh my, i feel VERY stupid. never think about it tbh. sure it makes the moves broken, and makes you win, in a very cheap way. to use it or not to use it, that's the question


EDIT: thank you for pointing that out. i tried it, but no, that won't happen!!

because the "basic move command" i use is from Hail,
now try this: use regular Hail, or even rain dance or sunny day, and use it again when it is still in effect (before 5 turns)! what happens is the move fails, it just says "But it failed!"
so when you use Cold Call before 5 turns, the move fails, and the effect, that will make the foe flinched, even if it is still in 100 accuracy, will also fail

which means Cold Call is pretty Cool now!!! :D

and for Carbon Copy don't make it as Normal type, because of the Ghost. Dark would be better as it has no resistance and it kinda fits because Imposter or carbon copy in this case is little bit "tricky" if not "dirty".
:)

pawell6
February 21st, 2013, 11:10 AM
Here's a code for clear smog:

00 01 5E 69 1D 08 00 00 02 03 04 05 06 07 09 0A 0E 5C 00 3A 0B 00 0C 00 0D 12 40 00 0F 12 40 00 0A 8A 10 F9 00 12 40 00 28 4E 69 1D 08

MrDollSteak
February 22nd, 2013, 09:28 PM
I had similar problem (at least with psywave). To fix it:
1. Make back up of your rom and ini file.
2. Open your rom wirh hex editor and go to offset: 0x4886E8.
3. Select block: 4*354=1416 bytes and copy (description attack table).
4. Use FSF, find 1416 bytes or find your own location (write down that location), select block 1416 and paste. (I pasted my at 0x950000).
5. Repointing: Go to the begining of file, Edit->Replace...->Find box: E8864808, Replace box: 00009508 (or pointer to your location from step 4) with direction down. Replace all.
6. Go to 0x950000 select block : 4*157=628 bytes, copy.
7. Go to end of new table (0x950000, first FF), select block 628 and paste.
8. Save and exit.
9. Open your ini file in notebook and go to AttackDescriptionTable for BPRE and change its value from &H4886E8 to &H950000.

I hope it'll fix the problem. :)

Thanks so much!

That did the trick for all the moves!

pawell6
February 23rd, 2013, 02:13 AM
Thanks so much!

That did the trick for all the moves!

You're welcome :). By the way, you can easily change descriptions of moves using XSE.

MrDollSteak
February 23rd, 2013, 05:02 AM
You're welcome :). By the way, you can easily change descriptions of moves using XSE.

Hahah yeah, I didn't realise that the descriptions were the reason why it was failing, I was just going to add them later once I had the moves done.

Also just about your Quiver Dance code, do you have to set it to 100 accuracy? Because I put it to 0 accuracy like other stat-up moves like growth and swords dance, and it keeps saying quiver dance missed.

pawell6
February 23rd, 2013, 04:05 PM
Hahah yeah, I didn't realise that the descriptions were the reason why it was failing, I was just going to add them later once I had the moves done.

Also just about your Quiver Dance code, do you have to set it to 100 accuracy? Because I put it to 0 accuracy like other stat-up moves like growth and swords dance, and it keeps saying quiver dance missed.

For answer see post #40 (http://www.pokecommunity.com/showpost.php?p=7516629&postcount=40) in this thread. You can also check post #42 (http://www.pokecommunity.com/showpost.php?p=7518374&postcount=42).

MrDollSteak
February 23rd, 2013, 06:10 PM
For answer see post #40 (http://www.pokecommunity.com/showpost.php?p=7516629&postcount=40) in this thread. You can also check post #42 (http://www.pokecommunity.com/showpost.php?p=7518374&postcount=42).

Thanks again! You're my hero hahahahh

QDance works fine in the form I posted it. I checked coil posted by Garuga17. Indeed the game froze. So then I change 3 bytes for effects and it worked fine (accuracy and effect accuracy set to 0 in PGE for both moves):
00 02 03 1D 00 00 00 00 01 F2 7D 1D 08 1C 00 07 00 00 00 B0 69 1D 08 84 CC 69 1D 08 1C 00 FF 00 00 00 F2 7D 1D 08 01 F2 7D 1D 08 00 00 1F 00 20 00 39 8B 1D 08 09 0A 2E 85 3E 02 02 4F 16 2E 85 3E 02 02 50 16 2E 85 3E 02 02 54 16 28 47 69 1D 08

Apparently not all effects from Chaos Rush's list work well with modified version. For safety you can use the first method. Hope it'll help :)

Hrm actually, after using this effect accuracy set to 0 is fine, but if the accuracy is set to 0 it misses regardless. Same with the new quiver dance.

pawell6
February 24th, 2013, 02:28 AM
Hrm actually, after using this effect accuracy set to 0 is fine, but if the accuracy is set to 0 it misses regardless. Same with the new quiver dance.

Everything works fine for me. I made some screenshots to show it (ignore descriptions for now, I'll fix that later)

Jambo51
February 24th, 2013, 02:35 AM
That's because you're using the normal hit/miss calculator which is inherently wrong here. You should in face be checking the special status bits for the few special statuses which would cause this to miss!

If an attack never misses, you MUST leave out the 01 command! Instead you should be doing:

22 00 C0 00 04 00 00 F2 7D 1D 08

This checks if the target is in the middle phase of surf, dig, fly or bounce and makes the move miss if it is. Otherwise it hits without fail.

MrDollSteak
February 24th, 2013, 11:42 PM
That's because you're using the normal hit/miss calculator which is inherently wrong here. You should in face be checking the special status bits for the few special statuses which would cause this to miss!

If an attack never misses, you MUST leave out the 01 command! Instead you should be doing:

22 00 C0 00 04 00 00 F2 7D 1D 08

This checks if the target is in the middle phase of surf, dig, fly or bounce and makes the move miss if it is. Otherwise it hits without fail.

Would this mean that quiver dance and coil would miss if the target is flying or digging? And the 01 command I'm assuming finishes at the 08 that comes after it? So I would have to erase the entire 01 command and replace it with code?

Would the code for Quiver Dance look like this then?

00 02 03 1D 00 00 00 00 22 00 C0 00 04 00 00 F2 7D 1D 08 CC 69 1D 08 1C etc....
Thanks for the quick response and help!

EDIT: Just realised the target is the user, so the move won't miss if you're flying..... because you can't use two moves at the same time. I'm silly. I still don't really understand where to insert the new code, do I only remove the byte that says 01 or the whole string from 01 to the pointer?
Thanks again for the help.

takeKopter
March 5th, 2013, 05:56 PM
just wondering, can you change the TM moves with the new (created) moves??

Omega Zero
March 5th, 2013, 08:26 PM
just wondering, can you change the TM moves with the new (created) moves??

Yes, you need to download Pokemon game editor and use their team snagem item editor tool.

If your wondering how to change the trainers moves you must check the offset *when it asks you to repoint that number*

you must go there in a hex editor and find the moves and replace it with the new hex code because A-trainer won't be able to change it to the new moves itself.

MrDollSteak
March 6th, 2013, 04:19 AM
just wondering, can you change the TM moves with the new (created) moves??

You can do this very easily with a hex editor.
You need to go to the offsets 45A5A4 and 45A80C
These are the offsets for the TM data. Each TM is made up of two bytes
eg. 08 01
This is equivalent to the index number 108, which is for Focus Punch.
All you need to do is change the two bytes of the TMs that you want to
replace with the index number of your move in the form YYXX.
Eg. 19B will become 9B 01

On an unrelated note I've found fixes for Coil and Quiver Dance that use 0 effect accuracy and 0 actual accuracy

It also allowed me to create Shell Smash.

Here are the codes:

Coil
00 02 03 09 2E 85 3E 02 02 CF 15 2E 85 3E 02 02
D0 15 2E 85 3E 02 02 D4 15 28 47 69 1D 08

Quiver Dance
00 02 03 09 2E 85 3E 02 02 D2 15 2E 85 3E 02 02
D3 15 2E 85 3E 02 02 D1 15 28 47 69 1D 08

Shell Smash
00 02 03 09 2E 85 3E 02 02 E7 15 2E 85 3E 02 02
EA 15 2E 85 3E 02 02 E9 15 2E 85 3E 02 02 D7 15
2E 85 3E 02 02 DA 15 28 47 69 1D 08

Using this style of code in conjunction with Solarbeam's code I've found a way to make the Gen 5 growth,
where it raises ATK and SPATK by 1 stage in normal weather and 2 stages in Sunny Weather.

Growth
43 0D XX YY ZZ 08 43 4D XX YY ZZ 08 2A 04 1C 3F 02 02 60 00 XX2 YY2 ZZ2 08

Offset ZZYYXX

00 02 03 09 2E 85 3E 02 02 CF 15 2E 85 3E 02 02 D2 15 28 47 69 1D 08

Offset ZZ2YY2XX2

00 02 03 09 2E 85 3E 02 02 E7 15 2E 85 3E 02 02 EA 15 28 47 69 1D 08

The bytes ZZ YY XX and ZZ2 YY2 XX2 point to the execution of the code under the weather,
wherein ZZ YY XX is normal weather, and ZZ2 YY2 XX2 is Sunny Weather.
I normally place them right behind eachother for conveniences sake.
It will use ZZ YY XX in Rain and Sandstorm as well.

MrDollSteak
March 8th, 2013, 08:40 PM
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...


C1: Puts yourself to sleep.
C2: Poisons yourself.
C3: Burns yourself.
C4: Freezes yourself.
C5: Paralyzes yourself.
C6: Badly poisons yourself.
C7: Confuses yourself.
C9: Freezes opponent.
CA: Uproar's effect.
CB: Payday's effect.
CD: Sand Tomb's effect.
CE: 1/4 Recoil damage.
CF: Raises users attack one level.
D0: Raises users defense one level.
D1: Raises users speed one level.
D2: Raises users special attack one level.
D3: Raises users special defense one level.
D4: Raises users accuracy one level.
D5: Raises users evasion one level.
D6: Lowers users attack one level.
D7: Lowers users defense one level.
D8: Lowers users speed one level.
D9: Lowers users special attack one level.
DA: Lowers users special defense level.
DB: Lowers users accuracy level.
DC: Lowers users evasion one level.
DD: Takes a turn to recover (Hyper Beam, etc...)
DF: Thief's effect
E2: Users stats all raise one level (Except Accuracy and Evasion).
E5: Users attack and defense lower one level.
E6: 1/3 Recoil.
E7: Users attack raises two levels.
E8: Users defense raises two levels.
E9: Users speed raises two levels.
EA: Users special attack raises two levels.
EB: Users special defense raises two levels.
EC: Users accuracy raises two levels.
ED: Users evasion raises two levels.
EE: Users attack lowers two levels.
EF: Users defense lowers two levels.
F0: Users speed lowers two levels.
F1: Users special attack lowers two levels.
F2: Users special defense lowers two levels.
F3: Users accuracy lowers two levels.
F4: Users evasion lowers two levels.
F5: Outrage's effect.
F6: Knock Off's effect.
FB: Users special attack lowers two levels.


I've just started looking into other moves and found that below C0 they aren't the same effects. For example looking at Shadow Ball its effect is:

2E 85 3E 02 02 1A 28 00 69 1D 08

Wherein 1A lowers opponent's special defense by 1 stage. It doesn't seem to have a set percentage, you have to set it in PGE. Also looking at Psycho Boost and Overheat they have their effect set at 100 so perhaps these offsets you've listed don't have a 100% chance to happen?

Edit: Further research has revealed that offsets between 01 and 3B roughly follow the same pattern as those listed above but for the opponent. So far all the stat changers correspond as will status changers. Im not sure about recoil or outrage.

Jambo51
March 9th, 2013, 05:12 AM
Growth
43 0D XX YY ZZ 08 43 4D XX YY ZZ 08 2A 04 1C 3F 02 02 60 00 XX2 YY2 ZZ2 08

Offset ZZYYXX

00 02 03 09 2E 85 3E 02 02 CF 15 2E 85 3E 02 02 D2 15 28 47 69 1D 08

Offset ZZ2YY2XX2

00 02 03 09 2E 85 3E 02 02 E7 15 2E 85 3E 02 02 EA 15 28 47 69 1D 08

The bytes ZZ YY XX and ZZ2 YY2 XX2 point to the execution of the code under the weather,
wherein ZZ YY XX is normal weather, and ZZ2 YY2 XX2 is Sunny Weather.
I normally place them right behind eachother for conveniences sake.
It will use ZZ YY XX in Rain and Sandstorm as well.

This won't work as intended. You see, command 2A checks literal values, not bitwise checks (which is how the weather bits work). You're asking it if it's 0x4 than 0x60 (I forget what 0x4 actually is).

What you should be doing is ANDing the address with those bits. However, to my knowledge, there are no such commands in the vanilla game.

As such, your script will only work under very specific circumstances, (when the weather bits are set to 0x60) and not under all Sunny weather types. (It's possible to only have 0x20 set, or only 0x40 set).

MrDollSteak
March 9th, 2013, 05:18 AM
This won't work as intended. You see, command 2A checks literal values, not bitwise checks (which is how the weather bits work). You're asking it if it's 0x4 than 0x60 (I forget what 0x4 actually is).

What you should be doing is ANDing the address with those bits. However, to my knowledge, there are no such commands in the vanilla game.

As such, your script will only work under very specific circumstances, (when the weather bits are set to 0x60) and not under all Sunny weather types. (It's possible to only have 0x20 set, or only 0x40 set).

Don't worry, I tested it before posting and have had no problems. I got the code from Solarbeam and just changed the information contained at the pointers. I've used it under Sunny Day, Drought Sunny Day, Plain Weather, Rain, Sandstorm and Hail, on every turn, and so far it works 100%

Tomi01
March 11th, 2013, 10:42 AM
Here's a code for clear smog:

00 01 5E 69 1D 08 00 00 02 03 04 05 06 07 09 0A 0E 5C 00 3A 0B 00 0C 00 0D 12 40 00 0F 12 40 00 0A 8A 10 F9 00 12 40 00 28 4E 69 1D 08

Hi! This code doesn't work for me, if I use it with 0 (never miss) accuracy. Can somebody help me, what should I edit that this works fine, like 11bayerf1's codes?

takeKopter
March 17th, 2013, 01:46 AM
Yes, you need to download Pokemon game editor and use their team snagem item editor tool.

If your wondering how to change the trainers moves you must check the offset *when it asks you to repoint that number*

you must go there in a hex editor and find the moves and replace it with the new hex code because A-trainer won't be able to change it to the new moves itself.

You can do this very easily with a hex editor.
You need to go to the offsets 45A5A4 and 45A80C
These are the offsets for the TM data. Each TM is made up of two bytes



hey, thanks dude! :)



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

when i do this, nothing happens. it does say ".ini updated" but nothing really change, the new pointer won't show up. can i edit it manually, like, typing or something? if yes, what and where should i type?

edit: fixed it. it's not AttackAnimationPointer but AttackAnimationTable

robin22gongon
March 17th, 2013, 06:01 AM
Hey guys, for some reason, whenever I disable the limiter and play the game, it still says "BULBASAUR used a NORMAL move!" How do I disable it? I've done that step a million times still the same! Also the PP data is just a few, is that right?

pawell6
March 18th, 2013, 12:12 PM
Hey guys I was wondering if someone found code for stealth rock. I tried to find it, but I failed. Please help.

MrDollSteak
March 25th, 2013, 08:14 PM
Dragon Tail is really starting to annoy me :S

I've been trying to combine the normal attack effect with roar/whirlwind:

Here's my current code


00 01 5E 69 1D 08 00 00 02 03 04 05 06 07 09 0A
0E 5C 00 3A 0B 00 0C 00 0D 12 40 00 0F 12 40 00
1E 00 15 08 94 1D 08 21 00 00 04 00 00 00 27 8F
1D 08 01 F2 7D 1D 08 FF FF 01 60 69 1D 08 00 00
8F F2 7D 1D 08 00 01 5E 69 1D 08 28 47 69 1D 08


So far what happens is that the animation will play, the foe is damaged.
Then the animation plays again, and the foe is either sent out or the move
fails. Basically the two parts, the damage and phasing, are disassociated,
and both run of the accuracy of the move (90%) so regardless of whether
the move hits or not, there is still a chance the phase effect will miss.

From looking at the code, all the pointers seem to point to animations, and
the bytes in front of them seem to relate to conditions. For example, if its a
trainer with 1 pokemon, trainer with more, wild pokemon etc.

As such I'm finding it hard what to remove to make the effect run immediately
after the damage.

Line3007
March 28th, 2013, 12:33 PM
This looks very useful. Maybe I can use it for Emerald, too?

pawell6
April 4th, 2013, 03:37 PM
Hey guys, it's been awhile since I posted. Anyway using BSP and JPAN's thread about battle scripts I managed to find code for frost breath:

1E 00 04 00 69 1D 08 1E 00 4B 00 69 1D 08 01 5E 69 1D 08 00 00 00 02 03 2E 71 3D 02 02 02 05 06 07 09 0A 0E 5C 00 3A 0B 00 0C 00 0D 12 40 00 0F 28 47 69 1D 08

Jambo51
April 5th, 2013, 05:29 AM
Don't worry, I tested it before posting and have had no problems. I got the code from Solarbeam and just changed the information contained at the pointers. I've used it under Sunny Day, Drought Sunny Day, Plain Weather, Rain, Sandstorm and Hail, on every turn, and so far it works 100%

I did some research, and I am due you an apology for this. It turns out that 0x4 and 0x5 ARE bitwise checks.

0x4 stands for (if any bits set, jump), and 0x5 stands for (if no bits set, jump). My bad. :( (Note, I checked this against the actual ASM, so I KNOW it's right :P)

MrDollSteak
April 5th, 2013, 09:51 PM
I did some research, and I am due you an apology for this. It turns out that 0x4 and 0x5 ARE bitwise checks.

0x4 stands for (if any bits set, jump), and 0x5 stands for (if no bits set, jump). My bad. :( (Note, I checked this against the actual ASM, so I KNOW it's right :P)

No worries! It's always good to check, to be honest I don't particularly understand the reasoning behind why it worked, so it's good you've looked into it! Also feel free to use the code for the 649 patch if you would like to!

The Legacy of The Legends Creator :D
April 7th, 2013, 01:45 PM
When i look for the 00250c04 i have
00250bff
then it goes to
00250c08 is that ok?

dondon151
April 9th, 2013, 03:30 PM
I've got a question here.

I'm trying to create the effect for Hurricane, so I basically copied Thunder and replaced the 05 byte (for paralysis) with a 07 (for confusion). I then paste wrote the code to another offset, pointed one of the effect indices to that offset, and then assigned that effect to the attack slot for Hurricane (which I had already created).

The problem is that although Hurricane successfully confuses, it doesn't always hit in the rain, but I pasted the code for Thunder byte-for-byte. So I don't know what's wrong here.

I then decided to test something else: I assigned Thunder's effect to Hurricane, except this time I changed the 05 byte in Thunder to 07. Now Hurricane confuses and always hits in the rain with the effect at this offset, but not with the effect at the copied offset.

The code for Thunder is:
2E 85 3E 02 02 05 35 D0 3D 02 02 00 00 01 00 28 00 69 1D 08

Can anyone help me out?

DoesntKnowHowToPlay
April 9th, 2013, 06:25 PM
Thunder's perfect accuracy in rain is a hard-coded effect associated with the slot, not a property of the battle script- the extra junk in the script is to set the variables that make it pierce Fly/Bounce. If you want to make proper Hurricane you'll need to find the check in the accuracy calc (put a breakpoint on Thunder's effect byte and use it in rain.)

dondon151
April 9th, 2013, 06:39 PM
Well, crap. I don't know how to do that (quite yet).

Is Solarbeam skipping its charge turn in strong sunlight also hardcoded to the moveslot?

Kurapika
April 11th, 2013, 02:32 AM
Hi! I followed this great tutorial to add new moves a while ago. Now I wanted to customize the descriptions of these new moves.
I found what it looks like the original table of pointers to moves' description, and copied it somewhere else in order to extend it and re-pointed it. But it didn't work, I don't know exactly what I am missing and need some assistance please. Or if someone already knows the pointer to the real table or something please tell me. Or if you know an easier way to edit those description it might work, too.
Thanks in advance! :]

EDIT: Sorry! I just realized I forgot to update the roms.ini with the new pointer. Sorry! ^^'

Jambo51
April 11th, 2013, 04:32 AM
I've got a question here.

I'm trying to create the effect for Hurricane, so I basically copied Thunder and replaced the 05 byte (for paralysis) with a 07 (for confusion). I then paste wrote the code to another offset, pointed one of the effect indices to that offset, and then assigned that effect to the attack slot for Hurricane (which I had already created).

The problem is that although Hurricane successfully confuses, it doesn't always hit in the rain, but I pasted the code for Thunder byte-for-byte. So I don't know what's wrong here.

I then decided to test something else: I assigned Thunder's effect to Hurricane, except this time I changed the 05 byte in Thunder to 07. Now Hurricane confuses and always hits in the rain with the effect at this offset, but not with the effect at the copied offset.

The code for Thunder is:
2E 85 3E 02 02 05 35 D0 3D 02 02 00 00 01 00 28 00 69 1D 08

Can anyone help me out?

Doesn't is correct in saying it's hardcoded. However, all is not lost, as you could also set the script up to branch dependent on the Move's ID. Given that it uses the same effect ID, that could potentially work just as well.

2A 00 4A 3D 02 02 57 00 [Thunder Offset] 2E 85 3E 02 02 07 28 00 69 1D 08

Obviously, this code assumes that Hurricane doesn't pierce Fly/Bounce, but if it did, you would simply branch to the original Thunder code AFTER the setting of 0x02023E85 to 0x5. In this way, you can have variations on Thunder's effect of 100% accuracy in rain with confusion and such.

Well, crap. I don't know how to do that (quite yet).

Is Solarbeam skipping its charge turn in strong sunlight also hardcoded to the moveslot?

No, IIRC that one is built into the Battle Script. It simply checks the current weather and if it's Sunny, skips the usual waiting turn.

bradyroush
April 11th, 2013, 11:05 AM
Does anyone know the Ruby move animation table pointer?

Perri Lightfoot
April 11th, 2013, 07:57 PM
Some supplemental information to this tutorial for Ruby hackers:

Offsets:
0x1FB12C = Attack Data (0x1FB130 for PP pointers)
0x1F8320 = Attack Names
0x1C7168 = Attack Animation Table
0x1D6BBC = Move Effect Table
0x3CF594 = Contest Data. This must be repointed along with the rest of the above data (and the new moves given contest data), or else the game will freeze when attempting to display the Contest Moves tab. To repoint it using the same technique described in the tutorial; go to this offset and Select Block = 2840. Copy, and go from there. :)
0x3C09D8 = Attack Description Table. This must also be repointed, or the game will start to overwrite important data (starting with Natures). To repoint it using the same technique described in the tutorial; go to this offset and Select Block = 1416. Copy, and go from there. :)

How to give a new move Contest Data:
http://i37.photobucket.com/albums/e57/PinkParkaGirl/Image136_zps5ff9c738.png
A screenshot from Super Rising Thunder; demonstrating the contest data for new moves. Since my hack doesn't use Contests; I edited the graphics and text to display the move's type instead.

Every move in Pokemon Ruby has Contest Data. This is an eight-byte data structure that contains the information that determines how the move functions when used in a Contest setting, and is set up like this:

00 04 3C 00 00 00 00 00

This is Pound's Contest data. The first byte determines what message is displayed in the summary - for example, "A highly appealing move!" This also determines the move's appeal/jam. The second byte is the Contest Type - in this case, Tough. The next byte is a combo identifier, used to identify the first move used in a Contest Combination. In contests, Pound can be used in combination with DoubleSlap, Faint Attack and Slam to rack up additional points. The next three bytes also relate to combos - if the move can be used second in a Contest Combination, the byte for the move(s) it can be combined with would go here, up to three.
The last two bytes are padding and should always be set to 00. For more information, refer here (http://bulbapedia.bulbagarden.net/wiki/Contest_move_data_structure_in_Generation_III) and here (http://bulbapedia.bulbagarden.net/wiki/Contest_data_structure_in_Generation_III).

Now, go to where you repointed your Contest data table and skip down to the end (where the FF's begin again). If your hack doesn't bother with Contests you can put anything you want here - even 00 00 00 00 00 00 00 00 for each move if you so desired, just to keep the game from freezing. If your hack DOES use contests...I don't see why it wouldn't be possible to be able to use the new moves in combination with an old one in Contests, or to assign it a byte unused by the moves already there to have it lead a new set of Combinations. I don't think this is something anyone has experimented with yet (my hack doesn't use Contests; I use this screen in the summary to display the Physical/Special split instead), so it would require more exploration to see just where the limit is here! :)

Ruby Versions of Moves With New Effects:

If you use these in your own hack, please credit the original creators first and myself second. They are the ones who truly did the hard work; all I did was rewrite them to work on Ruby rather than Fire Red. The main differences between the codes for the two versions has to do with the pointers; and in some cases these are all you would need to change in order to port a move from one version to another. As a word of warning though, the move effect data itself between Ruby and Fire Red, while very similar, is often not exactly identical. Compare the codes for the unmodified Hammer Arm in Fire Red from the first post and the unmodified Hammer Arm for Ruby below, for example.

U-TURN/VOLT SWITCH by Itman:
http://i37.photobucket.com/albums/e57/PinkParkaGirl/Image138_zps1a80a769.pnghttp://i37.photobucket.com/albums/e57/PinkParkaGirl/image139_zpsa8fb1d40.pnghttp://i37.photobucket.com/albums/e57/PinkParkaGirl/Image140_zps92d3f2e8.png
00 01 72 6F 1D 08 00 00 02 03 04 05 06 07 09 0A 0E 5C 00 3A 0B 00 0C 00 0D 12 40 00 0F 12 40 00 4F 81 5B 6F 1D 08 50 01 D6 83 1D 08 E2 01 3A 51 01 02 58 01 4C 01 4D 01 73 01 10 03 00 4E 01 01 3A 52 01 28 62 6F 1D 08 28 5B 6F 1D 08

HAMMER ARM (no Clear Body fix) by Itman:
http://i37.photobucket.com/albums/e57/PinkParkaGirl/Image135_zps19f6477a.pnghttp://i37.photobucket.com/albums/e57/PinkParkaGirl/Image137_zps07becca2.png
2E 21 4D 02 02 D8 28 14 6F 1D 08

*new* HAMMER ARM (Clear Body fix) by DoesntKnowHowToPlay:
http://i37.photobucket.com/albums/e57/PinkParkaGirl/Image141_zpsc4caf2ef.pnghttp://i37.photobucket.com/albums/e57/PinkParkaGirl/Image142_zps3d73ee25.pnghttp://i37.photobucket.com/albums/e57/PinkParkaGirl/Image143_zpsbb17be32.png
00 01 72 6F 1D 08 00 00 02 03 04 05 06 07 09 0A 0E 5C 00 3A 0B 00 0C 00 0D 12 40 00 0F 12 40 00 29 04 68 4C 02 02 29 5B 6F 1D 08 20 01 00 03 00 5B 6F 1D 08 2E DC 60 01 02 00 48 01 08 09 2E 1E 60 01 02 93 89 C1 5B 6F 1D 08 13 70 15 40 08 12 40 00 28 5B 6F 1D 08

I will edit this post with more moves as I continue to work on this. I hope this helps all the other Ruby hackers out there! :)

DoesntKnowHowToPlay
April 11th, 2013, 09:01 PM
A while back I posted a "polished" Hammer Arm that still lowered Speed when it failed to do damage. This version fixes that issue:

00 01 5E 69 1D 08 00 00 02 03 04 05 06 07 09 0A 0E 5C 00 3A 0B 00 0C 00 0D 12 40 00 0F 12 40 00 29 04 CC 3D 02 02 29 47 69 1D 08 20 01 00 03 00 47 69 1D 08 2E DF 3F 02 02 00 48 01 08 09 2E DE 3F 02 02 93 89 C1 47 69 1D 08 13 7C E5 3F 08 12 40 00 28 47 69 1D 08

Or, if you prefer using BSP:

#org 0x96F7B0
attackcanceler
accuracycheck 0x81D695E 0x0
attackstring
ppreduce
calculatedamage
attackanimation
waitanimation
missmessage
cmd5c 0x0
waitstate
graphicalhpupdate 0x0
datahpupdate 0x0
critmessage
waitmessage 0x40
resultmessage
waitmessage 0x40
jumpifbyte 0x4 0x2023DCC 0x29 0x81D6947
jumpifstat 0x1 0x0 0x3 0x0 0x81D6947
setbyte 0x2023FDF 0x0
playstatchangeanimation 0x1 0x8 0x9
setbyte 0x2023FDE 0x93
statbuffchange 0x81 true 0x81D6947
printfromtable 0x83FE57C
waitmessage 0x40
goto 0x81D6947

For FireRed, as usual, although if you know what you're doing you can probably port it.

dreamengine
April 11th, 2013, 10:05 PM
I made these really quick, but yeah I'm pretty sure it works fine.

Flare Blitz(Ruby)
00 01 72 6F 1D 08 00 00 02 03 04 05 06 07 09 0A 0E 5C 00 3A 0B 00 0C 00 0D 12 40 00 0F 12 40 00 2E 21 4D 02 02 E6 15 2E 21 4D 02 02 03 15 28 5B 6F 1D 08

Close Combat(Ruby)
00 01 72 6F 1D 08 00 00 02 03 04 05 06 07 09 0A 0E 5C 00 3A 0B 00 0C 00 0D 12 40 00 0F 12 40 00 2E 21 4D 02 02 D7 15 2E 21 4D 02 02 DA 15 28 5B 6F 1D 08

robin22gongon
April 11th, 2013, 10:22 PM
Some supplemental information to this tutorial for Ruby hackers:

Offsets:
0x1FB12C = Attack Data (0x1FB130 for PP pointers)
0x1F8320 = Attack Names
0x1C7168 = Attack Animation Table
0x1D6BBC = Move Effect Table
0x3CF594 = Contest Data. This must be repointed along with the rest of the above data (and the new moves given contest data), or else the game will freeze when attempting to display the Contest Moves tab. To repoint it using the same technique described in the tutorial; go to this offset and Select Block = 2840. Copy, and go from there. :)
0x3C09D8 = Attack Description Table. This must also be repointed, or the game will start to overwrite important data (starting with Natures). To repoint it using the same technique described in the tutorial; go to this offset and Select Block = 1416. Copy, and go from there. :)

How to give a new move Contest Data:
http://i37.photobucket.com/albums/e57/PinkParkaGirl/Image136_zps5ff9c738.png

Every move in Pokemon Ruby has Contest Data. This is an eight-byte data structure that contains the information that determines how the move functions when used in a Contest setting, and is set up like this:

00 04 3C 00 00 00 00 00

This is Pound's Contest data. The first byte determines what message is displayed in the summary - for example, "A highly appealing move!" This also determines the move's appeal/jam. The second byte is the Contest Type - in this case, Tough. The next byte is a combo identifier, used to identify the first move used in a Contest Combination. In contests, Pound can be used in combination with DoubleSlap, Faint Attack and Slam to rack up additional points. The next three bytes also relate to combos - if the move can be used second in a Contest Combination, the byte for the move(s) it can be combined with would go here, up to three.
The last two bytes are padding and should always be set to 00. For more information, refer here (http://bulbapedia.bulbagarden.net/wiki/Contest_move_data_structure_in_Generation_III) and here (http://bulbapedia.bulbagarden.net/wiki/Contest_data_structure_in_Generation_III).

Now, go to where you repointed your Contest data table and skip down to the end (where the FF's begin again). If your hack doesn't bother with Contests you can put anything you want here - even 00 00 00 00 00 00 00 00 for each move if you so desired, just to keep the game from freezing. If your hack DOES use contests...I don't see why it wouldn't be possible to be able to use the new moves in combination with an old one in Contests, or to assign it a byte unused by the moves already there to have it lead a new set of Combinations. I don't think this is something anyone has experimented with yet (my hack doesn't use Contests; I use this screen in the summary to display the Physical/Special split instead), so it would require more exploration to see just where the limit is here! :)

Ruby Versions of Moves With New Effects:

If you use these in your own hack, please credit the original creators first and myself second. They are the ones who truly did the hard work; all I did was rewrite them to work on Ruby rather than Fire Red.

U-TURN/VOLT SWITCH by Itman:
http://i37.photobucket.com/albums/e57/PinkParkaGirl/Image138_zps1a80a769.pnghttp://i37.photobucket.com/albums/e57/PinkParkaGirl/image139_zpsa8fb1d40.pnghttp://i37.photobucket.com/albums/e57/PinkParkaGirl/Image140_zps92d3f2e8.png
00 01 72 6F 1D 08 00 00 02 03 04 05 06 07 09 0A 0E 5C 00 3A 0B 00 0C 00 0D 12 40 00 0F 12 40 00 4F 81 5B 6F 1D 08 50 01 D6 83 1D 08 E2 01 3A 51 01 02 58 01 4C 01 4D 01 73 01 10 03 00 4E 01 01 3A 52 01 28 62 6F 1D 08 28 5B 6F 1D 08

HAMMER ARM by Itman:
http://i37.photobucket.com/albums/e57/PinkParkaGirl/Image135_zps19f6477a.pnghttp://i37.photobucket.com/albums/e57/PinkParkaGirl/Image137_zps07becca2.png
2E 21 4D 02 02 D8 28 14 6F 1D 08

I will edit this post with more moves as I continue to work on this. I hope this helps all the other Ruby hackers out there! :)
What Animation was used in U-Turn?

Perri Lightfoot
April 11th, 2013, 11:12 PM
What Animation was used in U-Turn?

I used Body Slam for now so there would be SOMETHING going on when I went to take screenshots, but I'll probably experiment and see if I can find something that looks better go to with it later. :)

robin22gongon
April 11th, 2013, 11:19 PM
I used Body Slam for now so there would be SOMETHING going on when I went to take screenshots, but I'll probably experiment and see if I can find something that looks better go to with it later. :)

Okay I was just wondering because I thaught I saw stars

BTW guys!!!!

Can I overwrite the original move data, name data, etc. with FFs once I repointed those?

dondon151
April 12th, 2013, 10:18 PM
Alright, another question:

I was trying to change Surf's double battle effect from its gen 3 range (both opponents) to its gen 4 range (all Pokemon on field). If I just change the relevant field in most generic attack editors, such as MoveEditor or GBAPGE's Attack Editor, what ends up happening is that Surf only ends up hitting one of the opponents.

So I took a look at the effect codes for the other moves that hit all Pokemon on the field in gen 3 and tried to figure out what allowed them to hit all Pokemon.

Earthquake/Magnitude:
00 02 03 C2 25 21 00 80 00 00 00 01 37 7B 1D 08 35 D0 3D 02 02 00 00 02 00 2E D2 3F 02 02 02 28 46 7B 1D 08 38 D0 3D 02 02 00 00 02 00 2E D2 3F 02 02 01 01 7F 7B 1D 08 00 00 04 05 06 07 09 0A 0E 5C 00 3A 0B 00 0C 00 0D 12 40 00 0F 12 40 00 10 30 01 12 01 00 19 00 00 00 00 00 00 2E D8 3F 02 02 00 49 02 10 7A 17 7B 1D 08 3D 39 20 00 06 0E 0F 12 40 00 2E D8 3F 02 02 00 49 02 10 7A 17 7B 1D 08 3D

Selfdestruct/Explosion:
00 02 03 78 79 3A 29 05 CC 3D 02 02 01 91 6A 1D 08 41 E7 6A 1D 08 28 93 6A 1D 08 09 0A 25 04 05 06 07 01 CC 6A 1D 08 00 00 0E 5C 00 3A 0B 00 0C 00 0D 12 40 00 0F 12 40 00 19 00 00 00 00 00 00 2E D8 3F 02 02 00 49 02 10 7A 93 6A 1D 08 19 01 00 00 00 00 00 3D 0E 0F 12 40 00 2E D8 3F 02 02 00 49 02 10 7A 93 6A 1D 08 19 01 00 00 00 00 00 3D 36 CC 3D 02 02 01 09 0A 33 CC 3D 02 02 01 3C

Teeter Dance:
00 02 03 2E 6C 3D 02 02 00 25 2E 85 3E 02 02 07 2C 6B 3D 02 02 6C 3D 02 02 01 94 83 1D 08 1E 00 14 B2 83 1D 08 1D 00 00 00 00 01 CE 83 1D 08 1D 00 07 00 00 00 DC 83 1D 08 01 EA 83 1D 08 00 00 1F 00 20 00 C0 83 1D 08 09 0A 16 0F 12 40 00 2E D8 3F 02 02 00 49 02 10 2F 6C 3D 02 02 01 2D 6C 3D 02 02 CC 3B 02 02 01 4E 83 1D 08 3D 39 20 00 10 CA 00 12 40 00 28 94 83 1D 08 39 20 00 10 50 00 12 40 00 28 94 83 1D 08 39 20 00 10 E5 00 12 40 00 28 94 83 1D 08 39 20 00 10 44 00 12 40 00 28 94 83 1D 08 0F 12 40 00 28 94 83 1D 08

I observed some similarities between the scripts (especially between Earthquake and Selfdestruct), but I don't know what they correspond to. Can anyone help me out here? I suspect that making the desired effect for Surf just involves copying the Earthquake script and removing the 35 D0 3D 02 02 00 00 02 00 part that corresponds to double damage against opponents underground. Am I correct, or is there something more to that?

On another note, I tried making Poison Gas target all Pokemon on the field by just copying Teeter Dance's effect and changing one of the 07's to an 02, and that worked perfectly.

Thanks for the response on my Thunder/Hurricane question, Jambo, I'll try that out.

dondon151
April 13th, 2013, 09:18 PM
So I figured out Surf and Poison Gas (targeting all Pokemon on field).

Surf:
00 02 03 C2 25 21 00 80 00 00 00 01 91 6A 1D 08

Poison Gas (note that the actual gen 5 range of Poison Gas is both opponents only, not all Pokemon on field; this is for a WIP of mine):
00 02 03 2E 6C 3D 02 02 00 25 2E 85 3E 02 02 02 2C 6B 3D 02 02 6C 3D 02 02 01 94 83 1D 08 1E 00 14 B2 83 1D 08 1D 00 00 00 00 01 CE 83 1D 08 1D 00 07 00 00 00 DC 83 1D 08 01 EA 83 1D 08 00 00 1F 00 20 00 C0 83 1D 08 09 0A 16 0F 12 40 00 2E D8 3F 02 02 00 49 02 10 2F 6C 3D 02 02 01 2D 6C 3D 02 02 CC 3B 02 02 01 4E 83 1D 08 3D 39 20 00 10 CA 00 12 40 00 28 94 83 1D 08 39 20 00 10 50 00 12 40 00 28 94 83 1D 08 39 20 00 10 E5 00 12 40 00 28 94 83 1D 08 39 20 00 10 44 00 12 40 00 28 94 83 1D 08 0F 12 40 00 28 94 83 1D 08
EDIT: dammit, this is still causing confusion. I definitely got this to cause burn, freeze, and poison to all other units on the field before. I'm not sure why this isn't working.

Now, I tried making Discharge by adding something to the beginning of Surf, but the game would freeze when I tried to use a move with the effect. What would I have to do to add a chance of paralysis (or any status effect)?

MrDollSteak
April 14th, 2013, 01:14 AM
So I figured out Surf and Poison Gas (targeting all Pokemon on field).

Surf:
00 02 03 C2 25 21 00 80 00 00 00 01 91 6A 1D 08

Poison Gas (note that the actual gen 5 range of Poison Gas is both opponents only, not all Pokemon on field; this is for a WIP of mine):
00 02 03 2E 6C 3D 02 02 00 25 2E 85 3E 02 02 02 2C 6B 3D 02 02 6C 3D 02 02 01 94 83 1D 08 1E 00 14 B2 83 1D 08 1D 00 00 00 00 01 CE 83 1D 08 1D 00 07 00 00 00 DC 83 1D 08 01 EA 83 1D 08 00 00 1F 00 20 00 C0 83 1D 08 09 0A 16 0F 12 40 00 2E D8 3F 02 02 00 49 02 10 2F 6C 3D 02 02 01 2D 6C 3D 02 02 CC 3B 02 02 01 4E 83 1D 08 3D 39 20 00 10 CA 00 12 40 00 28 94 83 1D 08 39 20 00 10 50 00 12 40 00 28 94 83 1D 08 39 20 00 10 E5 00 12 40 00 28 94 83 1D 08 39 20 00 10 44 00 12 40 00 28 94 83 1D 08 0F 12 40 00 28 94 83 1D 08
EDIT: dammit, this is still causing confusion. I definitely got this to cause burn, freeze, and poison to all other units on the field before. I'm not sure why this isn't working.

Now, I tried making Discharge by adding something to the beginning of Surf, but the game would freeze when I tried to use a move with the effect. What would I have to do to add a chance of paralysis (or any status effect)?

So Pokemon Game Editor's move editor isn't working for you? I just set target to all pokemon and it works perfectly.

Muchasmarcos
April 14th, 2013, 06:45 AM
Does this work on emerald too?
If it does i'd like to ask for the offsets in emerald.

dondon151
April 14th, 2013, 09:49 AM
So Pokemon Game Editor's move editor isn't working for you? I just set target to all pokemon and it works perfectly.

For which move? I just tried doing this on a clean ROM with Poison Gas and it didn't work. See the video below, where the move highlights all Pokemon on the field but only affects one opponent Pokemon. I also tried Poison Fang and the outcome ends up being the same.

youtu.be/bt3boebV2SU

If it's not working, try youtu.be/bt3boebV2SU

EDIT: Okay, I think I fixed Poison Gas. I took a closer look at Teeter Dance's script and then looked at the pointers in the script. Turns out that those pointers point back to Teeter Dance.

Well, I really don't know what any of it means, but I copied over everything involved, repointed all of the pointers, and I guess it seems to work now?

MrDollSteak
April 14th, 2013, 03:29 PM
For which move? I just tried doing this on a clean ROM with Poison Gas and it didn't work. See the video below, where the move highlights all Pokemon on the field but only affects one opponent Pokemon. I also tried Poison Fang and the outcome ends up being the same.

youtu.be/bt3boebV2SU

If it's not working, try youtu.be/bt3boebV2SU

EDIT: Okay, I think I fixed Poison Gas. I took a closer look at Teeter Dance's script and then looked at the pointers in the script. Turns out that those pointers point back to Teeter Dance.

Well, I really don't know what any of it means, but I copied over everything involved, repointed all of the pointers, and I guess it seems to work now?

If it works then that's fine. My question is why didn't the animation play or any of the text assosciated with it come on? Because chances are the move is hitting everyone it just has a 55% accuracy and is missing the majority of the pokemon. I've set hydro pump as double target and it has successfully done damage to both targets. I put it back, but it has worked for me.

dondon151
April 14th, 2013, 09:14 PM
If it works then that's fine. My question is why didn't the animation play or any of the text assosciated with it come on?

Animations were off. The text doesn't come up for the other Pokemon because Poison Gas is not doing anything to the other Pokemon. It's ignoring them entirely.

Because chances are the move is hitting everyone it just has a 55% accuracy and is missing the majority of the pokemon. I've set hydro pump as double target and it has successfully done damage to both targets. I put it back, but it has worked for me.

I changed Poison Gas to 100% accuracy for the test.

I don't think I was being entirely clear here, as it seems that you've misunderstood. There are no problems with moves set to target only both opponent Pokemon. As you've said already, you can set Hydro Pump to target both opponents and it'll work just fine. The problem here is when a move is set to target both opponent Pokemon and your partner. In this case, the move will only hit one opponent Pokemon (and I think that it will always hit the same Pokemon).

I can guarantee that if you set Hydro Pump to target both opponent Pokemon and your partner, it will hit only one opponent Pokemon. Try it!

MrDollSteak
April 14th, 2013, 10:40 PM
Animations were off. The text doesn't come up for the other Pokemon because Poison Gas is not doing anything to the other Pokemon. It's ignoring them entirely.



I changed Poison Gas to 100% accuracy for the test.

I don't think I was being entirely clear here, as it seems that you've misunderstood. There are no problems with moves set to target only both opponent Pokemon. As you've said already, you can set Hydro Pump to target both opponents and it'll work just fine. The problem here is when a move is set to target both opponent Pokemon and your partner. In this case, the move will only hit one opponent Pokemon (and I think that it will always hit the same Pokemon).

I can guarantee that if you set Hydro Pump to target both opponent Pokemon and your partner, it will hit only one opponent Pokemon. Try it!

Ahhh I see. I misunderstood, I thought you meant double targetting. In that case, it's very useful that you've found that out.

Jambo51
April 15th, 2013, 02:31 AM
I can guarantee you that damaging moves do work as intended with the hit all behaviour. I changed Surf to have that hit behaviour and it works like intended. It's because the behaviour is built into the script used for moves. However, since most status moves (like poison gas) do not use the main script, you will find that the behaviour fails to work correctly.

You can implement it manually using a relatively simple loop for which I don't currently have the code, but believe me, it's simple.

You need to take things like that into account when messing around with moves and their scripts.

dondon151
April 15th, 2013, 11:01 AM
In response to the above:

youtu.be/FJOJxvK8xJU
h**p://youtu.be/FJOJxvK8xJU if it's not working

Either my eyes are deceiving me, or I'm doing something wrong. Any thoughts on the matter?

In the first clip, I set Horn Attack to target both foes and partner in GBAPGE. The game highlights the appropriate targets, but the outcome is not as intended. In the second clip, I set Horn Attack to target both foes only, and the outcome is as intended.

I've made some innocuous edits to the game using AdvanceMap and A-Trainer, and I repointed the move tables as instructed to by this guide. However, the same thing happens when I thest this on a clean ROM.

Jambo51
April 15th, 2013, 09:51 PM
Perhaps it also has to do with whether or not the original move was defined around hitting more than 1 target. I can assure you that Surf does work with this behaviour.

I couldn't pinpoint why it does so, if it isn't to do with the script, but it does work.

From what I can tell, the game does a controlled mini-loop executed by ASM over part of the main script. So it definitely has something to do with that script, but until we know how that loop is executed, your guess is as good as mine.

dondon151
April 17th, 2013, 10:45 PM
Well, finally got around to this:

h**p://youtu.be/unL-smOqkRs

Setting Surf to target both foes and partner doesn't work. Are you sure that it works properly on your ROM?

I observed that Surf crashed the game if its first target caused it to miss (e.g. Dig), so I reworked it, but this time it stops hitting subsequent targets if it hits a target with Water Absorb.

Wow, this is super annoying. It would probably not be as bad if I knew what I was doing...

Kurapika
April 23rd, 2013, 04:48 PM
Hi guys, so, I can't figure out how to make a sound-based move. (like Growl, Sing, ...)
Do I have to find and modify the abilities Soundproof/Cacophony?? :x :x
Because I studied the moves data table thouroughtly and there is no sound-based parameter ... I guess
By the way, talking about the moves data table I figured them all except of the 3 bytes who are quiet strange, can anyone please enlighten this:
From what I understood, every move's datas are stored in 12 bytes in this form:
[Effect ID] [Power] [Type] [Accuracy] [PP] [effect's %Chance] [Target] [Priority] [Affected by King's Rock, BrightPowder, Magic Coat, Snatch, Protect/Detect, contact] [00] [00] [00]
So, the last 3 bytes are always set to 0, EXCEPT for TWO moves: Hidden Power and DragonBreath.
Hidden Power's datas: 87 46 00 64 0A 00 00 00 32 00 01 00
DragonBreath's datas: 06 3C 10 64 14 1E 00 00 32 00 01 00
Does anyone know what it means?

Also, does anyone have an idea on how to extend Metronome's range to the new moves??? PLEEEEEAASE.
Or how to make a 1/2 recoil effect? (like Head Smash)

Finally, here are the moves I have made: (I only made them by coping other moves, BPS won't work for me. I have no idea if I can use it correctly anyway.)
V-Create (Nothing amazing, just added -Speed to pawel16's Close Combat and changed -Def/-spDef into -Atk/-Def)
00 01 5E 69 1D 08 00 00 02 03 04 05 06 07 09 0A 0E 5C 00 3A 0B 00 0C 00 0D 12 40 00 0F 12 40 00 2E 85 3E 02 02 D6 15 2E 85 3E 02 02 D7 15 2E 85 3E 02 02 D8 15 28 47 69 1D 08

Fire/Ice/Thunder Fang (Copied from Jambo51's Flare Blitz)
00 01 5E 69 1D 08 00 00 02 03 04 05 06 07 09 0A 0E 5C 00 3A 0B 00 0C 00 0D 12 40 00 0F 12 40 00 2E 85 3E 02 02 (flinch)88 15 2E 85 3E 02 02 (burn/freeze/paralyz)03/04/05 15 28 47 69 1D 08

Dragon Tail/Circle Throw (Uhm, a basic damage-dealing move that ... lol... points to Roar's effect in the end but skips the part where it checks accuracy and specialflags. THE ANIMATION OF THE MOVE WILL BE SHOWN TWICE!! I couldn't figure out how to fix this. XX YY ZZ 08 is a pointer to Roar's effect; in my rom it is stored at B0 6C 1D 08, normally. To skip the part where it checks accuracy you must skip 5 bytes, so, in my case, I ended the effect with this pointer B5 6C 1D 08.)
00 01 5E 69 1D 08 00 00 02 03 04 05 06 07 09 0A 0E 5C 00 3A 0B 00 0C 00 0D 12 40 00 0F 12 40 00 28 XX YY ZZ 08

Hone Claws (Copied from Bulk Up, Dragon Dance & Calm Mind, ...)
00 02 03 20 01 03 (*Note1)01 0C XX XX XX 08 20 01 00 (*Note2)06 0C E7 85 1D 08 (@XXX)09 0A 2E DF 3F 02 02 00 48 01 (*Note3)42 00 2E DE 3F 02 02 (+Atk)11 89 41 YY YY YY 08 29 00 87 3E 02 02 02 YY YY YY 08 13 7C E5 3F 08 12 40 00 (@YYY)2E DE 3F 02 02 (+Accuracy)16 89 41 EE NN DD 08 29 00 87 3E 02 02 02 EE NN DD 08 13 7C E5 3F 08 (@END)12 40 00 28 4E 69 1D 08
When I compared Bulk Up, Dragon Dance and Calm Mind, only differences were in the "internal" pointers (duh), stats (duh) and the bytes I marked with (*Notes)
*Note1: This apparently checks on weither Attack (01) is maxed or not. The next byte (0C), aparently, has to do with the game's message (OC = stats won't go any higher, while 00 = stat won't go any lower)
*Note2: This apparently checks on weither Accuracy (06) is maxed or not. The next byte, aparently, has to do with the game's message (OC = stats won't go any higher, while 00 = stat won't go any lower)
*Note3: This byte is weird, I only understood it when I converted it to binary... for exemple: 42 is 01000010 in binary. It seems that each bit is connected to one of the stats, from left to right: Evasion, Accuracy, Sp. Def., Sp. Atk, Speed, Def., Atk. and the last one is HP I guess, lol. So, 42 (01000010), supposedly, tells the game to check on Accuracy and Attack, but putting any value there doesn't seem to affect anything tough. (In Calm Mind it had the value: 30 = 00110000, Bulk Up: 06 = 00000110, Dragon Dance: 0A = 00001010)

Shift Gear (Same way I did with Hone Claws, copied from Dragon Dance, Bulk Up ...)
00 02 03 20 01 03 01 0C XX XX XX 08 20 01 00 03 0C E7 85 1D 08 (@XXX)09 0A 2E DF 3F 02 02 00 48 01 0A 00 2E DE 3F 02 02 (+Atk)11 89 41 YY YY YY 08 29 00 87 3E 02 02 02 YY YY YY 08 13 7C E5 3F 08 12 40 00 (@YYY)2E DE 3F 02 02 (+Accuracy)16 89 41 EE NN DD 08 29 00 87 3E 02 02 02 EE NN DD 08 13 7C E5 3F 08 (@END)12 40 00 28 4E 69 1D 08

Coil (Copied from Curse. XX YY ZZ 08 is a pointer to (@XYZ), same with UU VV WW 08 which points to (@UVW), ... etc. It works like Curse, so it doesn't show the grey animation like in Bulk Up, Calm Mind... and if all 3 stats are maxed it simply say "but it failed" instead of giving 3 succesive messages. If you wan't the gray animation then do it by copying Bulk Up I guess.)
00 02 03 20 01 02 01 0C XX YY ZZ 08 20 01 01 02 0C XX YY ZZ 08 20 01 00 06 0C F2 7D 1D 08 (@XYZ)31 6C 3D 02 02 6B 3D 02 02 01 2E DC 3F 02 02 01 09 0A 2E DE 3F 02 02 11 89 41 UU VV WW 08 13 7C E5 3F 08 12 40 00 (@UVW)2E DE 3F 02 02 12 89 41 II JJ KK 08 13 7C E5 3F 08 12 40 00 (@IJK)2E DE 3F 02 02 16 89 41 EE NN DD 08 13 7C E5 3F 08 12 40 00 (@END)28 4E 69 1D 08

Quiver Dance (Exact same way I did with Coil, copied from Curse.)
00 02 03 20 01 02 04 0C XX YY ZZ 08 20 01 01 05 0C XX YY ZZ 08 20 01 00 03 0C F2 7D 1D 08 (@XYZ)31 6C 3D 02 02 6B 3D 02 02 01 2E DC 3F 02 02 01 09 0A 2E DE 3F 02 02 14 89 41 UU VV WW 08 13 7C E5 3F 08 12 40 00 (@UVW)2E DE 3F 02 02 15 89 41 II JJ KK 08 13 7C E5 3F 08 12 40 00 (@IJK)2E DE 3F 02 02 13 89 41 EE NN DD 08 13 7C E5 3F 08 12 40 00 (@END)28 4E 69 1D 08

Shell Smash (Same way I did with Coil and Quiver Dance, copied Curse and repeated the part that changes the stats twice before ENDing the effect. Of course, no grey/red/green animation... But the rest works perfectly!)
00 02 03 20 01 02 02 00 XX XX XX 08 20 01 02 05 00 XX XX XX 08 20 01 01 01 0C XX XX XX 08 20 01 01 04 0C XX XX XX 08 20 01 00 03 0C F2 7D 1D 08 (@XXX)31 6C 3D 02 02 6B 3D 02 02 01 2E DC 3F 02 02 01 09 0A 2E DE 3F 02 02 92 89 41 YY YY YY 08 13 7C E5 3F 08 12 40 00 (@YYY)2E DE 3F 02 02 95 89 41 ZZ ZZ ZZ 08 13 7C E5 3F 08 12 40 00 (@ZZZ)2E DE 3F 02 02 21 89 41 MM MM MM 08 13 7C E5 3F 08 12 40 00 (@MMM)2E DE 3F 02 02 24 89 41 NN NN NN 08 13 7C E5 3F 08 12 40 00 (@NNN)2E DE 3F 02 02 23 89 41 EE NN DD 08 13 7C E5 3F 08 12 40 00 (@END)28 4E 69 1D 08

Tail Glow (Copied from Bulk Up, it increases Sp. Atk 1 stage then 2 stages, lol. I don't know how to make it increase Sp. Atk once and drastically...)
00 02 03 20 01 03 04 0C XX XX XX 08 20 01 00 04 0C E7 85 1D 08 (XX)09 0A 2E DF 3F 02 02 00 48 01 10 00 2E DE 3F 02 02 14 89 41 YY YY YY 08 29 00 87 3E 02 02 02 YY YY YY 08 13 7C E5 3F 08 12 40 00 (YY)2E DE 3F 02 02 24 89 41 ZZ ZZ ZZ 08 29 00 87 3E 02 02 02 ZZ ZZ ZZ 08 13 7C E5 3F 08 12 40 00 (ZZ)28 4E 69 1D 08

Cotton Guard (Same way I made Tail Glow...)
00 02 03 20 01 03 02 0C XX XX XX 08 20 01 00 02 0C E7 85 1D 08 (XX)09 0A 2E DF 3F 02 02 00 48 01 04 00 2E DE 3F 02 02 12 89 41 YY YY YY 08 29 00 87 3E 02 02 02 YY YY YY 08 13 7C E5 3F 08 12 40 00 (YY)2E DE 3F 02 02 22 89 41 ZZ ZZ ZZ 08 29 00 87 3E 02 02 02 ZZ ZZ ZZ 08 13 7C E5 3F 08 12 40 00 (ZZ)28 4E 69 1D 08

Miscellaneous (Copied from Overheat's effect.)
Flame Charge
2E 85 3E 02 02 D1 28 00 69 1D 08
Charge Beam/Fiery Dance
2E 85 3E 02 02 D2 28 00 69 1D 08
Acid Spray
2E 85 3E 02 02 32 28 00 69 1D 08
Mess up with the 6th byte by putting in it other values, there is a **** load of effects.

Is there some sort of tutorial, guide, or anything that gives some details or a list of the meaning of some bytes and such?? Please, I barely have an unclear idea on what some stuff does...

Eren Jaeger
April 23rd, 2013, 05:27 PM
Very helpful! But patience is in need here.. oh man.

MrDollSteak
April 23rd, 2013, 06:43 PM
Is there some sort of tutorial, guide, or anything that gives some details or a list of the meaning of some bytes and such?? Please, I barely have an unclear idea on what some stuff does...

There's a list on the original post under Step Six in Creating New Move effects:


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


C1: Puts yourself to sleep.
C2: Poisons yourself.
C3: Burns yourself.
C4: Freezes yourself.
C5: Paralyzes yourself.
C6: Badly poisons yourself.
C7: Confuses yourself.
C9: Freezes opponent.
CA: Uproar's effect.
CB: Payday's effect.
CD: Sand Tomb's effect.
CE: 1/4 Recoil damage.
CF: Raises users attack one level.
D0: Raises users defense one level.
D1: Raises users speed one level.
D2: Raises users special attack one level.
D3: Raises users special defense one level.
D4: Raises users accuracy one level.
D5: Raises users evasion one level.
D6: Lowers users attack one level.
D7: Lowers users defense one level.
D8: Lowers users speed one level.
D9: Lowers users special attack one level.
DA: Lowers users special defense level.
DB: Lowers users accuracy level.
DC: Lowers users evasion one level.
DD: Takes a turn to recover (Hyper Beam, etc...)
DF: Thief's effect
E2: Users stats all raise one level (Except Accuracy and Evasion).
E5: Users attack and defense lower one level.
E6: 1/3 Recoil.
E7: Users attack raises two levels.
E8: Users defense raises two levels.
E9: Users speed raises two levels.
EA: Users special attack raises two levels.
EB: Users special defense raises two levels.
EC: Users accuracy raises two levels.
ED: Users evasion raises two levels.
EE: Users attack lowers two levels.
EF: Users defense lowers two levels.
F0: Users speed lowers two levels.
F1: Users special attack lowers two levels.
F2: Users special defense lowers two levels.
F3: Users accuracy lowers two levels.
F4: Users evasion lowers two levels.
F5: Outrage's effect.
F6: Knock Off's effect.
FB: Users special attack lowers two levels.

Kurapika
May 9th, 2013, 05:00 PM
Hello guys, so I found that using the burn effect, even by replacing one of the existing effects that cause burn (Will-O-Wisp, Blaze Kick & the one that most Fire moves have) the burn doesn't work correctly.
Ok, how does it not work correctly?
It burns Fire-type Pokémon except if they have Flash Fire ability... normally, Fire Pokémon shouldn't get burned at all.
So, moves with more than 1 secondary effect like Flare Blitz, Fire Fang, ... can burn Fire Pokémon...
I tested Ice Fangs on Ice Pokémon, they don't get Frozen even when I put the chance at 100%. So I thinK the checking for Fire Pokémon works differently than for Ice Pokémon... I think, tough, this can be fixed if we make these moves check target's type before and skip the burn chance in case of a Fire-typed target...

Tomi01
May 11th, 2013, 06:31 AM
Can somebody tell me how to make a "hit+effect" move, like Flare Blitz with never miss accuracy, like Clear Smog? The Clear Smog code, what is posted before works, but it doesn't have never miss accuracy, so my question is, how to add never miss accuracy code to create a move effect like Clear Smog.

Kurapika
May 17th, 2013, 01:47 AM
@tomi, removing the 01 at the beginning of the effect should do the trick, I guess.

As of my previous problem with Fire-typed Pokémon getting burned when hit by custom effects like Fire Fang and Flare Blitz I found a fix for it:
22 00 0A XX XX XX 08
This piece of code checks if the target has FIRE type, in which case it will jump to the point XX XX XX 08. Now, I am still trying to figure out how to extend the effect of Metronome to include the new moves. Does anyone have some clues about that?

~Anbuja
May 18th, 2013, 05:21 AM
I have a question at the move effect table:
After I repoint that table and all, and adding new move effect pointers at the end, and putting the end of that table.
Do I still need free space after the end for when I add another effect pointer in that table?

If yes then I gotta re-repoint that table D:
But its not of a issue.

Tomi01
May 18th, 2013, 05:35 AM
Okay, the Clear Smog code is working now, I had to just modify the first 00 to 01. ^^ So the code is:

01 01 5E 69 1D 08 00 00 02 03 04 05 06 07 09 0A 0E 5C 00 3A 0B 00 0C 00 0D 12 40 00 0F 12 40 00 0F 12 40 00 0A 8A 10 F9 00 12 40 00 15 28 47 69 1D 08

Kurapika
May 18th, 2013, 05:54 AM
@Anbuja, there are 213 effects originally, you can add new ones up to 256, so, after re-pointing the table, just put after it as much 00s as move effects you may need * 4. Or just go for the maximum and replace 186 FFs with 00s, 186 bytes is not too much. ^^

rhettz_emboar
May 27th, 2013, 08:41 PM
Woah what a great TuT!
But is there a way to add moves to emerald?

Garuga17
July 6th, 2013, 08:34 PM
I got a question, i cant edit trainer's pokemon in A-trainer, i guess a-trainer doesn't use the edited .ini ......

Is there any resolution?

LCCoolJ95
July 14th, 2013, 01:35 PM
I found the Ruby's Attack Animation Table Offset: 1C7168

Some one test this and see if it works.

pawell6
July 15th, 2013, 05:14 AM
I got a question, i cant edit trainer's pokemon in A-trainer, i guess a-trainer doesn't use the edited .ini ......

Is there any resolution?
Use trainer editor made by Jambo51 posted in toolbox forum.

Kurapika
July 17th, 2013, 05:24 AM
These codes are for Fire Red BPRE
Hex effect
1C 00 FF 00 00 00 51 80 1D 08 28 00 69 1D 08
Venoshock effect
1C 00 88 00 00 00 51 80 1D 08 28 00 69 1D 08
Venoshock effect with a poison hax
1C 00 88 00 00 00 51 80 1D 08 2E 85 3E 02 02 02 28 00 69 1D 08
Dragon Tail/Circle Throw effect
00 01 5E 69 1D 08 00 00 02 03 04 05 06 07 09 0A 0E 5C 00 3A 0B 00 0C 00 0D 12 40 00 0F 12 40 00 1E 00 15 08 94 1D 08 21 00 00 04 00 00 00 27 8F 1D 08 8F F2 7D 1D 08

The Dragon Tail effect works perfectly regarding type-immunities, accuracy, ...etc, but, it will repeat most animations twice, if you want to fix that, you need to make a custom animation similar to Solarbeam's animation.

MrDollSteak
July 17th, 2013, 09:25 PM
These codes are for Fire Red BPRE
Hex effect
1C 00 FF 00 00 00 51 80 1D 08 28 00 69 1D 08
Venoshock effect
1C 00 88 00 00 00 51 80 1D 08 28 00 69 1D 08
Venoshock effect with a poison hax
1C 00 88 00 00 00 51 80 1D 08 2E 85 3E 02 02 02 28 00 69 1D 08
Dragon Tail/Circle Throw effect
00 01 5E 69 1D 08 00 00 02 03 04 05 06 07 09 0A 0E 5C 00 3A 0B 00 0C 00 0D 12 40 00 0F 12 40 00 1E 00 15 08 94 1D 08 21 00 00 04 00 00 00 27 8F 1D 08 8F F2 7D 1D 08

The Dragon Tail effect works perfectly regarding type-immunities, accuracy, ...etc, but, it will repeat most animations twice, if you want to fix that, you need to make a custom animation similar to Solarbeam's animation.

What do you mean by Poison Hax?

Also great work with Dragon Tail, I couldn't manage to turn off the second animation either.

You should submit all of these to the 4th Gen Move Resource made by Shadowraze/Tajaros

Kurapika
July 17th, 2013, 10:54 PM
I meant by poison hax a chance to poison the target, just for those (like me, lol) who want Venoshock to have a chance of 10% to inflict poison.

MrDollSteak
July 17th, 2013, 11:42 PM
I meant by poison hax a chance to poison the target, just for those (like me, lol) who want Venoshock to have a chance of 10% to inflict poison.

Ah fair enough! Did you have any luck with the sound based moves?
Chances are it'll be in the routine that loads the ability itself. There's probably a
battle script that checks if Soundproof is present and blocks certain moves.

Kurapika
July 18th, 2013, 06:30 AM
Yes, apparently, sound-based moves are checked elsewhere. But, you can check for Soundproof ability anytime with this:
1E 00 2D XX XX XX 08
To check for Cacophony use this:
1E 00 4C XX XX XX 08
And to check for both use them both. XX XX XX 08 is a pointer to the move's effect if the target is sound-proof.

Exemple:
The effect of Sleep Powder, Spore, Sing and Grass Whistle
00 02 03 1D 00 00 00 00 01 F2 7D 1D 08 1C 00 07 00 00 00 B0 69 1D 08 84 CC 69 1D 08 1C 00 FF 00 00
Lets make Sleep Powder and Spore useless against Soundproof and Cacophony:
00 02 03 1E 00 2D XX XX XX 08 1E 00 4C XX XX XX 08 1D 00 00 00 00 01 F2 7D 1D 08 1C 00 07 00 00 00 B0 69 1D 08 84 CC 69 1D 08 1C 00 FF 00 00
@0x08XXXXXX:
10 D2 00 12 40 00 28 4E 69 1D 08 (This will mimic the message of soundproof blocking a move)

MrDollSteak
July 19th, 2013, 07:11 AM
Yes, apparently, sound-based moves are checked elsewhere. But, you can check for Soundproof ability anytime with this:
1E 00 43 XX XX XX 08
To check for Cacophony use this:
1E 00 76 XX XX XX 08
And to check for both use them both. XX XX XX 08 is a pointer to the move's effect if the target is sound-proof.

Exemple:
The effect of Sleep Powder, Spore, Sing and Grass Whistle
00 02 03 1D 00 00 00 00 01 F2 7D 1D 08 1C 00 07 00 00 00 B0 69 1D 08 84 CC 69 1D 08 1C 00 FF 00 00
Lets make Sleep Powder and Spore useless against Soundproof and Cacophony:
00 02 03 1E 00 43 XX XX XX 08 1E 00 76 XX XX XX 08 1D 00 00 00 00 01 F2 7D 1D 08 1C 00 07 00 00 00 B0 69 1D 08 84 CC 69 1D 08 1C 00 FF 00 00
@0x08XXXXXX:
10 D2 00 12 40 00 28 4E 69 1D 08 (This will mimic the message of soundproof blocking a move)

The problem with doing that though, is it will affect all moves that use that effect. So to make a specific move resistant to sound, you'd have to give it a unique effect. Which is annoying because we only have so many extra spots for move effects.

Kurapika
July 19th, 2013, 08:13 AM
Sadly, that's the only way I can think of, I have no idea how to deal with abilities directly.

EDIT:
Hell yeah! I searched the IDs of sound-based moves with a hex editor, I found them in a nicely ordered table located at 0x08250104.
This is the table:
2D 00 2E 00 2F 00 30 00 67 00 AD 00 FD 00 3F 01 40 01 30 01 FF FF 00 00
(FF FF 00 00 is probably the part that tells it's the end of the table?? I'm not sure about that, but I kept it just for safety.)
I repointed that table and extended it (by adding Bubble and SmokeScreen as sound-based moves in it) and it worked!!!
By the way, Heal Bell and Perish Song are not present in this table, their respective effects checks for Soundprood. I think it is because these 2 moves target the user, which makes sense.

MrDollSteak
July 19th, 2013, 07:16 PM
Sadly, that's the only way I can think of, I have no idea how to deal with abilities directly.

EDIT:
Hell yeah! I searched the IDs of sound-based moves with a hex editor, I found them in a nicely ordered table located at 0x08250104.
This is the table:
2D 00 2E 00 2F 00 30 00 67 00 AD 00 FD 00 3F 01 40 01 30 01 FF FF 00 00
(FF FF 00 00 is probably the part that tells it's the end of the table?? I'm not sure about that, but I kept it just for safety.)
I repointed that table and extended it (by adding Bubble and SmokeScreen as sound-based moves in it) and it worked!!!
By the way, Heal Bell and Perish Song are not present in this table, their respective effects checks for Soundprood. I think it is because these 2 moves target the user, which makes sense.

That's fascinating! Brilliant work. This is actually incredibly useful. I think if theres a unique move that doesn't share it's effect, and happens to be sound based. It would make more sense to put it there. But this table is fantastic for say Bug Buzz which shares its ability with multiple moves. Great work Kurapika!

EDIT: After some testing I've found it does indeed work. However it doesn't work 100% with the new moves.The moves don't play and it says Soundproof Blocked which is fine, however, instead of displaying the new move names correctly it spouts hex numbers. I'll try and find the thing that causes this. Other than that it seems fine.

Kurapika
July 20th, 2013, 09:38 AM
Hi!
To fix that issue of Soundproof VS new moves go to 0x080D7E96 you will find the limiter (B1 20 40 00 81 42) that this tutorial suggested us to overwrite with 00 00 00 00 00 00. I am not sure, but, apparently, we only need to replace the first byte B1 with FF. (B1 = 177 in decimal. and 177 multiplied by 2 = 354. In Gen3 we have 354 moves)

Anyway, replacing that limiter will fix the issue with Soundproof VS new moves along with Disable VS new moves.

I discovered that when I was trying to figure out how to extend Metronome to new moves. I partially succeeded in that:
Metronome uses an ASM code located at 0x08029754, in that code I found a byte = B1, I replaced it with FF and now Metronome is including the new moves too. (FF = 255 in decimal. 255 multiplied by 2 = 511. The maximum of moves we can have is 511 and I am using them all.)
If you are using only, say, 400 moves, then replace B1 with C8 instead of FF. (C8 is 200 in decimal. 200 multiplied by 2 = 400.)

Now, Metronome is including new moves, but there are some moves that Metronome does not select (such us itself, Sketch, Mimic, ...etc) those moves are gathered in a list located at 0x082507E8:
76 00 A5 00 A6 00 66 00 FE FF 44 00 F3 00 B6 00 C5 00 CB 00 C2 00 D6 00 A8 00 0A 01 21 01 0E 01 57 01 0F 01 08 01 FF FF
Every 2 bytes (half word) is a move ID, f.e.: 67 00 = Metronome. FF FF apparently is the end of the table while FE FF is probably a sort of a separator, to separate Metronome, Struggle, Sketch and Mimic from the other moves.
I tried repointing and extending this list but it won't work, I think the only way to fix it is to completely hack Metronome's ASM code... But I don't have enough skill for that. :/

MrDollSteak
July 20th, 2013, 06:47 PM
Hi!
To fix that issue of Soundproof VS new moves go to 0x080D7E96 you will find the limiter (B1 20 40 00 81 42) that this tutorial suggested us to overwrite with 00 00 00 00 00 00. I am not sure, but, apparently, we only need to replace the first byte B1 with FF. (B1 = 177 in decimal. and 177 multiplied by 2 = 354. In Gen3 we have 354 moves)

Anyway, replacing that limiter will fix the issue with Soundproof VS new moves along with Disable VS new moves.

I discovered that when I was trying to figure out how to extend Metronome to new moves. I partially succeeded in that:
Metronome uses an ASM code located at 0x08029754, in that code I found a byte = B1, I replaced it with FF and now Metronome is including the new moves too. (FF = 255 in decimal. 255 multiplied by 2 = 511. The maximum of moves we can have is 511 and I am using them all.)
If you are using only, say, 400 moves, then replace B1 with C8 instead of FF. (C8 is 200 in decimal. 200 multiplied by 2 = 400.)

Now, Metronome is including new moves, but there are some moves that Metronome does not select (such us itself, Sketch, Mimic, ...etc) those moves are gathered in a list located at 0x082507E8:
76 00 A5 00 A6 00 66 00 FE FF 44 00 F3 00 B6 00 C5 00 CB 00 C2 00 D6 00 A8 00 0A 01 21 01 0E 01 57 01 0F 01 08 01 FF FF
Every 2 bytes (half word) is a move ID, f.e.: 67 00 = Metronome. FF FF apparently is the end of the table while FE FF is probably a sort of a separator, to separate Metronome, Struggle, Sketch and Mimic from the other moves.
I tried repointing and extending this list but it won't work, I think the only way to fix it is to completely hack Metronome's ASM code... But I don't have enough skill for that. :/

That's fantastic! You've been very busy. I think in the case of Metronome, that's not a huge problem, as most of the new moves that we can create are generally attack or stat-up moves. So they don't really need to be added to the banned list of moves.

Ksiazek Bartlomiej
July 22nd, 2013, 12:04 PM
Can you told me what is pointer of Attacks in Pokemon Ruby?

Kurapika
July 22nd, 2013, 01:05 PM
Yeah, actually, for Metronome, instead of bothering understanding its ASM, it is far more simple to put the banned moves at the bottom of the list of moves and then exclude them from Metronome's range.

Anyway, I've been working on Acrobatics' effect:
00 01 5E 69 1D 08 00 00 29 00 6B 3D 02 02 03 XX XX XX 08 29 00 6B 3D 02 02 02 YY YY YY 08 29 00 6B 3D 02 02 01 ZZ ZZ ZZ 08 2A 00 12 3C 02 02 00 00 DD DD DD 08 28 00 69 1D 08
(XXX)2A 00 1A 3D 02 02 00 00 DD DD DD 08 28 00 69 1D 08
(YYY)2A 00 C2 3C 02 02 00 00 DD DD DD 08 28 00 69 1D 08
(ZZZ)2A 00 6A 3C 02 02 00 00 DD DD DD 08 28 00 69 1D 08
(DDD)2E D2 3F 02 02 02 28 00 69 1D 08
It takes too much time and space to make it in hex, but it is much more simple and shorter in ASM. The problem is that there is no callasm in battle scripts... the only way I made it work is by overwriting another command's ASM code and calling that command in Acrobatics' effect...
Does anyone please know if it is possible to call ASM without having to alter the existing commands??

Can you told me what is pointer of Attacks in Pokemon Ruby?
Here:
[AXVE]
ROMName=Pokémon Ruby (English)
ItemData=&H3C5564
AttackNames=&H1F8320
TMData=&H376504
NumberOfItems=349
NumberOfAttacks=354
PokemonNames=&H1F716C
NumberOfPokemon=412
NationalDexTable=&H1FC516
SecondDexTable=&H1FC1E0
PokedexData=&H3B1858
NumberOfDexEntries=387
PokemonData=&H1FEC18
AbilityNames=&H1FA248
NumberOfAbilities=78
Pointer2PointersToMapBanks=&H53324
MapLabelData=&H3E73C8
NumberOfMapLabels=88
PokemonFrontSprites=&H1E8354
PokemonBackSprites=&H1E97F4
PokemonNormalPal=&H1EA5B4
PokemonShinyPal=&H1EB374
IconPointerTable=&H3BBD20
IconPalTable=&H3BC400
CryTable=&H452590
FootPrintTable=&H3B4EE4
PokemonAttackTable=&H207BC8
PokemonEvolutions=&H203B68
TMHMCompatibility=&H1FD0F0
EnemyYTable=&H1E7C74
PlayerYTable=&H1E9114
EnemyAltitudeTable=&H1ECB14
AttackData=&H1FB12C
ContestMoveData=&H3CF594
ContestMoveEffectData=&H3D00AC
AttackDescriptionTable=&H3C09D8
AbilityDescriptionTable=&H
StarterPokemon=&H3F76C4
StarterPokemonLevel=&H821A8
StarterEncounterPokemon=&HB8EC
StarterEncounterPokemonLevel=&HB8FA
AttackAnimationTable=&H
IconPals=&HE966D8

Ksiazek Bartlomiej
July 23rd, 2013, 01:05 AM
Where is Sprites Data? I want add more sprites to my game. And I do not know where it is. I want resize Trainer Sprites bank.

LCCoolJ95
July 23rd, 2013, 08:18 AM
Where is Sprites Data? I want add more sprites to my game. And I do not know where it is. I want resize Trainer Sprites bank.
Dude, wrong thread. This is not a sprite thread.

Can you told me what is pointer of Attacks in Pokemon Ruby?
Look for my post. I found the animation table for Ruby. Even though no one cared to acknowledge me for that...god...

pawell6
July 23rd, 2013, 12:41 PM
Yeah, actually, for Metronome, instead of bothering understanding its ASM, it is far more simple to put the banned moves at the bottom of the list of moves and then exclude them from Metronome's range.

Anyway, I've been working on Acrobatics' effect:
00 01 5E 69 1D 08 00 00 29 00 6B 3D 02 02 03 XX XX XX 08 29 00 6B 3D 02 02 02 YY YY YY 08 29 00 6B 3D 02 02 01 ZZ ZZ ZZ 08 2A 00 12 3C 02 02 00 00 DD DD DD 08 28 00 69 1D 08
(XXX)2A 00 1A 3D 02 02 00 00 DD DD DD 08 28 00 69 1D 08
(YYY)2A 00 C2 3C 02 02 00 00 DD DD DD 08 28 00 69 1D 08
(ZZZ)2A 00 6A 3C 02 02 00 00 DD DD DD 08 28 00 69 1D 08
(DDD)2E D2 3F 02 02 02 28 00 69 1D 08
It takes too much time and space to make it in hex, but it is much more simple and shorter in ASM. The problem is that there is no callasm in battle scripts... the only way I made it work is by overwriting another command's ASM code and calling that command in Acrobatics' effect...
Does anyone please know if it is possible to call ASM without having to alter the existing commands??


Hmm, I made acrobatics effect using BSP:
#dynamic 0x(offset)
#include items.bsh
#org @start
jumpifhalfword 0x1 0x2023c12 0x0 0x1d6900
setbyte damagemultiplier 0x2
goto 0x1d6900

Kurapika
July 23rd, 2013, 01:45 PM
@pawel, Your code checks only the held item at slot1, which is Player's 1st Pokémon. If that Pokémon is holding an item, Acrobatics will deal normal damage even tough if it is used by a different Pokémon (foe Pokémon, Player's 2nd Pokémon and 2nd foe Pokémon).

I can't use BSP on my computer... But I think the full code of Acrobatics wil be something like this:

#dynamic 0x(offset)
#org @start
jumpifbyte 0x0 0x02023D6B 0x0 @slot1
jumpifbyte 0x0 0x02023D6B 0x1 @slot2
jumpifbyte 0x0 0x02023D6B 0x2 @slot3
jumpifhalfword 0x0 0x02023D1A 0x0 @doubledamage
goto 0x1D6900

@slot1
jumpifhalfword 0x0 0x02023C12 0x0 @doubledamage
goto 0x1D6900

@slot2
jumpifhalfword 0x0 0x02023C6A 0x0 @doubledamage
goto 0x1D6900

@slot3
jumpifhalfword 0x0 0x02023CC2 0x0 @doubledamage
goto 0x1D6900

@doubledamage
setbyte damagemultiplier 0x2
goto 0x1D6900

pawell6
July 24th, 2013, 08:12 AM
@pawel, Your code checks only the held item at slot1, which is Player's 1st Pokémon. If that Pokémon is holding an item, Acrobatics will deal normal damage even tough if it is used by a different Pokémon (foe Pokémon, Player's 2nd Pokémon and 2nd foe Pokémon).

I can't use BSP on my computer... But I think the full code of Acrobatics wil be something like this:

#dynamic 0x(offset)
#org @start
jumpifbyte 0x0 0x02023D6B 0x0 @slot1
jumpifbyte 0x0 0x02023D6B 0x1 @slot2
jumpifbyte 0x0 0x02023D6B 0x2 @slot3
jumpifhalfword 0x0 0x02023D1A 0x0 @doubledamage
goto 0x1D6900

@slot1
jumpifhalfword 0x0 0x02023C12 0x0 @doubledamage
goto 0x1D6900

@slot2
jumpifhalfword 0x0 0x02023C6A 0x0 @doubledamage
goto 0x1D6900

@slot3
jumpifhalfword 0x0 0x02023CC2 0x0 @doubledamage
goto 0x1D6900

@doubledamage
setbyte damagemultiplier 0x2
goto 0x1D6900


Thanks for your answer. I've got 2 questions. So you're trying to say that if user bank adress (0x02023D6B) has value 0x0 then it refers to player first pokemon , value 0x1 refers to opponent pokemon, value 0x2 refers to partner pokemon and value 0x3 refers to opponent's partner pokemon?

And where did you find adresses 0x02023D1A, 0x02023C6A, 0x02023CC2? I only found 0x02023C12 using JPAN thread about battle scripts.

Anyway I also had some problems with newer verion of BSP, so I'm using older version. I could send it to you.

Jambo51
July 24th, 2013, 08:57 AM
Anyway I also had some problems with newer verion of BSP, so I'm using older version. I could send it to you.

I can't use BSP on my computer...

Talk to me. What errors are you getting?

Kurapika
July 24th, 2013, 09:24 AM
@pawel, yeah, you are right. I found the other pointers by adding 0x58 everytime since the size of data for each one one of the 4 pokemon is 0x58 (88 bytes). All of this is mentioned by JPAN in his research about battle scripts.
Thank you but older versions of BSP don't work for me.
Finally, Head Smack's 1/2 recoil:

00 01 5E 69 1D 08 00 00 02 03 04 05 06 07 09 0A 0E 5C 00 3A 0B 00 0C 00 0D 12 40 00 0F 12 40 00 80 01 0B 01 0C 01 10 64 00 E3 01 XX XX XX 08 28 47 69 1D 08
@0x08XXXXXX: 10 1C 00 28 47 69 1D 089..

It does not work graphically perfectly if the user faints from recoil. Fixable if you are good at making custom animations.

pawell6
July 24th, 2013, 01:44 PM
@Kurapika, I did the same you wrote I've got the same adresses, thank you very much, everything is clear now :)

@Jambo51, The problem is when i try to open the newest BSP it start at all. When I copy BattleScriptPro.Ini from older version into data folder program starts normally, but then it have problem with loading my rom (with extended table of moves), program says: "There was a problem parsing the pointer from the rom". Then I paste the newest BattleScriptPro.Ini and the program works fine, but it's annoying. So most of the time I'm using older version.

LCCoolJ95
July 27th, 2013, 07:57 AM
I don't know what the limiting hex values I have to replace are. Without that, I cannot add in new moves. What do I have to replace?

Shinx
July 28th, 2013, 01:36 PM
Your images are broken, any chance of a re-upload?

Pyro the Magma Fox
July 29th, 2013, 11:15 AM
@pawell6 I followed your custom description tutorial on post #48, but the following happens:

In the PGE, I enter the description, change the offset to an empty one from Karate Chop's, hit 'Repoint', and it goes blank. Then, when I reload the attack, it switched right back to Karate Chop's offset and description! How can I properly change this in PGE?

EDIT: Found out about the description thing. It was the whole credits thing. And PGE's repoint button is useless...back to hex...

EDIT2: Okay, got everything done, except that Roar of Time isn't playing along... It keeps revering back to Normal type from Dragon! How can I change the type with hex so it switches to Dragon and STAYS at Dragon?

pokepie
September 1st, 2013, 01:49 PM
I'm having an issue in where the new moves do not show up in PGE (It starts at Tackle and ends of Doom Desire). I probably did something stupid, but does anybody have any idea why they are not showing up?

EDIT: I'm just going to shoot myself now, I cannot believe I actually made that mistake.

LCCoolJ95
September 1st, 2013, 05:16 PM
I'm having an issue in where the new moves do not show up in PGE (It starts at Tackle and ends of Doom Desire). I probably did something stupid, but does anybody have any idea why they are not showing up?

EDIT: I'm just going to shoot myself now, I cannot believe I actually made that mistake.Did you edit the roms.ini?

pokepie
September 1st, 2013, 05:18 PM
Did you edit the roms.ini?

I did, but I accidentally edited the information for Ruby, not FireRed.

LCCoolJ95
September 2nd, 2013, 06:30 AM
I did, but I accidentally edited the information for Ruby, not FireRed.There's your problem. You just edited the wrong data. It's fine. Just download another version of the roms.ini file and redo it.

Kurapika
September 2nd, 2013, 11:33 AM
@Pyro the Magma Fox, You can download the newest PGE, it's repoint buttons all work!
As for Roar of Time, your issue is pretty strange... Try with the newest PGE.
If it still doesn't work, you have 2 ways to change it in hex:
1- Look for this hex data: 50 96 00 5A 05 00 00 00 and replace 00 by 10 (But before doing so, change Hyper Beam's base power or accuracy temporarly!)
2- Take Roar of Time ID (f.e.: If you inserted it just after Psycho Boost the ID will be 355), then multiply this ID by 12, now open your rom in a Hex Editor, go to the offset in which your moves table is located at, select ID * 12 number of bytes, what comes right after the selection is Roar of Time's data, the 1st byte, 50, is the effect, the 2nd byte, 96, is the base power, and the third byte is the type (00 = Normal, 10 = Dragon).

Get the newest PGE from here: http://www.pokecommunity.com/showthread.php?t=299112

pokepie
September 3rd, 2013, 07:01 PM
There's your problem. You just edited the wrong data. It's fine. Just download another version of the roms.ini file and redo it.

I just edited the data back (I didn't screw up things too much) using your earlier post, but it doesn't matter much since I'm not using Ruby anyways.

Now for another problem:

I inserted Hammer Arm into my FireRed ROM at location 0x920000. At first, it looks like it is doing everything right: it says, "Arcanine used Hammer Arm!", displays the attack animation (using Mega Punch's attack animation at the moment), but instead of damaging, it tells me that Arcanine changed to grass type. I've tested it multiple times, and it always changes to grass type, so I know that it's most likely using Camouflage's effect. My bytes at offset 0x910354 are 00 00 92 08 5F 86 1D 08, just like it said in the guide. I am using effect 214. I have it listed as a 100 base power Fighting move, but it doesn't do any damage. My bytes at 920000 are 2E 85 3E 02 02 D8 28 00 69 1D 08.

Kurapika
September 4th, 2013, 01:45 PM
@Pokepie, Open your rom in a hex editor, go to the offset where you inserted the new moves effects table, select 856 bytes (213*4 bytes), right after the selection, you should see a pointer to Camouflage effect duplicated, replace the second one by 00 00 92 08, if Camouflage's effect isn't duplicated, then you derped either when you repointed the moves table or when extended it...
Also, just as a note, the Hammer Arm effect you're using is not working perfectly (Clear Body ability), I guess Doesn'tKnowHowToPlay made a better version of it.

CrystalStatic
September 22nd, 2013, 06:34 PM
Thank you for the tutorial, itman. Now I have 135 new moves ready to be edited :)

Fuuka
September 22nd, 2013, 07:38 PM
Okay, the tutorial was very helpful..
My first time sucks so, I guess I need to keep trying.

EricaHarper
October 6th, 2013, 06:06 PM
Hmmm.. I'm new here, and have been observing the move hacking everyone has been doing. I do understand that this tutorial is for fire red, but using the inis for PGE and BSP, this thread and a few others, have gotten a lot of this to work for pokemon emerald. That is, until I am to create new effects. I cannot locate psycho boost's effect for the life of me. Much of the data in emerald is quite different from Fr/Lg, and even ruby and sapphire's. Any assistance would be greatly appreciated.

LCCoolJ95
October 7th, 2013, 06:55 AM
Hmmm.. I'm new here, and have been observing the move hacking everyone has been doing. I do understand that this tutorial is for fire red, but using the inis for PGE and BSP, this thread and a few others, have gotten a lot of this to work for pokemon emerald. That is, until I am to create new effects. I cannot locate psycho boost's effect for the life of me. Much of the data in emerald is quite different from Fr/Lg, and even ruby and sapphire's. Any assistance would be greatly appreciated.I totally agree with EH. I did the same thing for Ruby. I found all the offsets, except for where the effects table is. I would love it if there was some way that the effects found already were ported over to Ruby. That would be fantastic and such a help indeed.

EricaHarper
October 7th, 2013, 07:50 AM
Tip for LCCool: Actually,the offset for the effect table in pkmn ruby is at 1D6BBC, according to battle script pros ini. It says emeralds is at 2D86A8.

I didn't have a problem with that. Rather, I have an issue when using psycho boosts pointer to find its effect. I get: 2E 88 44 02 02 00 49 00 00 3D... I'd tell you the rest but the thing is, the pointer after psycho boost's effect points to an offset that comes before psycho boost in the hexadecimal system. furthermore, the byte FB is nowhere to be found. I'm beginning to think that the way emerald conveys its effects in the table is completely different from how fire red does in its own. Can anyone confirm this?

ron50
October 7th, 2013, 04:40 PM
can anyone help me understand how to create the Physical/Special Split like diamond and pearl has but put it into emeralds please?

LCCoolJ95
October 8th, 2013, 07:09 AM
Tip for LCCool: Actually,the offset for the effect table in pkmn ruby is at 1D6BBC, according to battle script pros ini. It says emeralds is at 2D86A8.But in the roms.ini for the Pokemon Game Editor, the Attack Animation Table for Emerald is 2C8D6C.

can anyone help me understand how to create the Physical/Special Split like diamond and pearl has but put it into emeralds please?
http://www.pokecommunity.com/showpost.php?p=7465618&postcount=163

The second link is for Emerald.

EricaHarper
October 8th, 2013, 07:13 AM
Are you saying that its too close to be correct?

LCCoolJ95
October 9th, 2013, 05:57 AM
Are you saying that its too close to be correct?

Well, I did my own Pokemon Emerald hacks using my animation offset, and they worked. Do they work for you? Also, is that really the animation offset for Ruby? Have you tested it?

EricaHarper
October 9th, 2013, 06:08 AM
Ah. No I did not. I don't have ruby. Only emerald and Fr atm. However, I was going more on the fact that for me, gamer2020's logging of the tables hasn't been wrong so far. Also, the information on tables that I gave you was for the effect tables. Not the animations. I can give you table offsets for ruby as they are in the roms.ini of pge, but its up to you to test them, as I don't have ruby..

LCCoolJ95
October 12th, 2013, 06:40 AM
Wait, so the offsets you gave me were for the effects table? Oh, ok. And yeah, the thing is, the Ruby table doesn't have an animation table offset. I had to find it myself, and it works.

EricaHarper
October 12th, 2013, 07:58 AM
Excellent! Can you help me figure out where psycho boosts effect is in the table? And what hex values emerald uses to determine its effects? It would help me a lot. The offset psycho boost points to is 2D8A4E. I have been messing with it for over a month now, and no dice.

darthvader45
October 12th, 2013, 10:29 AM
Only one problem. The pics are broken now. :(

EricaHarper
October 12th, 2013, 10:35 AM
One step forward, two in reverse, lol...

mf91
November 10th, 2013, 09:56 AM
Hi :)

I didnt see anyone mentioning this, so a very very small trick if you are using Hex Workshop is to use the Replace option (just above Goto...) for those times you are gonna replace a lot of the same things.

- Anyway, I have some questions about this whole thing, if I may (hope I didnt miss out on any replies). First off, is it made any tutorial on how to add these new moves to our Pokemon's move table? Ive been checking out YAPE which only allows you to add moves if another move is deleted elsewhere. And I checked futher on Pokemon Editor Pro were the author warned that this function could be buggy as heck. For my game, Im planning to give every pokemon a new learnset, so a full delete to the whole "Hex Block" containing all current moves would actually be sweet, with the possibility to create a new and bigger table.. Is it that simple? :P
EDIT: I think the full move table are between 257494 and 25974E, so that would be a quick way to clear everything.. However, Im not sure what consequences that may appear from this. In Pokemon Editor Pro, you choose where the move table starts from, so I hope this fixes the pointer part.

Also, during my way through this tutorial, I got some ideas that maybe got messed up on this:
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!
What does this mean? Multiple status alignments against one target, or one status alignment to each of more targets? I kinda though out in my mind an ability suck as "Ice Age", that would damage and 100% freeze every Pokemon in the battle, but I kinda fear that this is something that will not work :P

Thirdly, I noticed you discussed stuff about double battles. Did you come to any conclusion about a safe edit to change an attack from hitting 1 to 2 or 3 other Pokemon?

Thanks in advance :)

Wesley FG
November 14th, 2013, 11:47 AM
nice tutorial, i test it and work, really awesome resourcer for new hacks, but you forgot one steep :

change on PGE ini, for the new attack animation table too.

AttackAnimationTable=&H90336C

If dont make it, you don't know change the animations

Ksthesprite
November 17th, 2013, 06:11 PM
Awesome! Except I have one problem, when I open up attack editor in gba pokemon game editor
the move's names are messed up example: Karate Chop is now, "ate chop" also i get unhandled expections. during hex editing a faster way to repoint that I just found out for looking closesly,
all you have to do is use the replace thingy :) when i found that out i was like: {XD} I AM KSTHESPRITE HACKER OF EVIL lol. Another problem that I have is when I use free space finder
to find a free spot it went to 71B2E0 It was ok, 'till the next time i used it i searched again(after i filled the spot, "71B2E0") and it said 71B2E0 again can you help plz? :) thnx

dondon151
December 7th, 2013, 07:43 PM
Thirdly, I noticed you discussed stuff about double battles. Did you come to any conclusion about a safe edit to change an attack from hitting 1 to 2 or 3 other Pokemon?

This is a rather late response, but changing an attack to hit both opponents yields no problems if the effect is originally designed to only target a single opponent. It will not work properly if you change the target byte to 0x20 (targeting opponents and partner) unless there is something obvious that I'm missing. You'd have to script a new effect.

And as far as I know, in double battles, moves that hit the entire field (like Earthquake or gen 4 Surf) don't interact properly with certain abilities. Water Absorb, Volt Absorb, and probably Flash Fire halt execution of the move entirely when a target when the ability is hit. Lightningrod seems to do absolutely nothing (technically this is "correct" behavior in later gens if we ignore the extra properties of Lightningrod in later gens).

Here are decompiled BSP scripts for Earthquake and Explosion:

//EARTHQUAKE

#org 0x1D7B13
attackcanceler
attackstring
ppreduce
selectnexttarget
cmd25
jumpifspecialstatusflag 0x0 0x80 0x1 0x81D7B37
orword 0x2023DD0 0x20000
setbyte 0x2023FD2 0x2
goto 0x81D7B46

#org 0x1D7B37
bicword 0x2023DD0 0x20000
setbyte 0x2023FD2 0x1
accuracycheck 0x81D7B7F 0x0
calculatedamage
attackanimation
waitanimation
missmessage
cmd5c 0x0
waitstate
graphicalhpupdate 0x0
datahpupdate 0x0
critmessage
waitmessage 0x40
resultmessage
waitmessage 0x40
printstring 0x130
waitmessage 0x1
faintpokemon 0x0 0x0 0x0
setbyte 0x2023FD8 0x0
cmd49 0x2 0x10
jumpwhiletargetvalid 0x81D7B17
end

#org 0x1D7B7F
pause 0x20
cmd6
missmessage
resultmessage
waitmessage 0x40
setbyte 0x2023FD8 0x0
cmd49 0x2 0x10
jumpwhiletargetvalid 0x81D7B17
end

// Used Strings
// String 0x130
// =

#org 0x1D7B46
accuracycheck 0x81D7B7F 0x0
calculatedamage
attackanimation
waitanimation
missmessage
cmd5c 0x0
waitstate
graphicalhpupdate 0x0
datahpupdate 0x0
critmessage
waitmessage 0x40
resultmessage
waitmessage 0x40
printstring 0x130
waitmessage 0x1
faintpokemon 0x0 0x0 0x0
setbyte 0x2023FD8 0x0
cmd49 0x2 0x10
jumpwhiletargetvalid 0x81D7B17
end

#org 0x1D7B7F
pause 0x20
cmd6
missmessage
resultmessage
waitmessage 0x40
setbyte 0x2023FD8 0x0
cmd49 0x2 0x10
jumpwhiletargetvalid 0x81D7B17
end

// Used Strings
// String 0x130
// =

//EXPLOSION

#org 0x1D6A76
attackcanceler
attackstring
ppreduce
faintifabilitynotdamp
setuserhptozero
waitstate
jumpifbyte 0x5 0x2023DCC 0x1 0x81D6A91
call 0x81D6AE7
goto 0x81D6A93

#org 0x1D6A91
attackanimation
waitanimation
cmd25
calculatedamage
accuracycheck 0x81D6ACC 0x0
missmessage
cmd5c 0x0
waitstate
graphicalhpupdate 0x0
datahpupdate 0x0
critmessage
waitmessage 0x40
resultmessage
waitmessage 0x40
faintpokemon 0x0 0x0 0x0
setbyte 0x2023FD8 0x0
cmd49 0x2 0x10
jumpwhiletargetvalid 0x81D6A93
faintpokemon 0x1 0x0 0x0
end

#org 0x1D6ACC
missmessage
resultmessage
waitmessage 0x40
setbyte 0x2023FD8 0x0
cmd49 0x2 0x10
jumpwhiletargetvalid 0x81D6A93
faintpokemon 0x1 0x0 0x0
end

#org 0x1D6AE7
bicbyte 0x2023DCC 0x1
attackanimation
waitanimation
orbyte 0x2023DCC 0x1
return

#org 0x1D6A93
cmd25
calculatedamage
accuracycheck 0x81D6ACC 0x0
missmessage
cmd5c 0x0
waitstate
graphicalhpupdate 0x0
datahpupdate 0x0
critmessage
waitmessage 0x40
resultmessage
waitmessage 0x40
faintpokemon 0x0 0x0 0x0
setbyte 0x2023FD8 0x0
cmd49 0x2 0x10
jumpwhiletargetvalid 0x81D6A93
faintpokemon 0x1 0x0 0x0
end

#org 0x1D6ACC
missmessage
resultmessage
waitmessage 0x40
setbyte 0x2023FD8 0x0
cmd49 0x2 0x10
jumpwhiletargetvalid 0x81D6A93
faintpokemon 0x1 0x0 0x0
end
I haven't really gone through all of this yet, but clearly the effects are specifically designed to hit all other Pokemon on the field.

EDIT: Oh, as an aside, trying to decompile Teeter Dance causes BSP to crash.

EDIT 2: Here's a script for gen 4 Surf that should work (except for the interaction with Water Absorb):

//SURF

#dynamic 0x740200
#freespacebyte 0xFF
#include moves.bsh

#org @start
attackcanceler
attackstring
ppreduce
selectnexttarget

#org @offset1
cmd25
jumpifspecialstatusflag 0x0 0x40000 0x1 @offset2 //check for DIVE
orword 0x2023DD0 0x40000
setbyte 0x2023FD2 0x2
goto @offset3

#org @offset2
bicword 0x2023DD0 0x40000
setbyte 0x2023FD2 0x1

#org @offset3
accuracycheck @offset4 0x0
calculatedamage
attackanimation
waitanimation
missmessage
cmd5c 0x0
waitstate
graphicalhpupdate 0x0
datahpupdate 0x0
critmessage
waitmessage 0x40
resultmessage
waitmessage 0x40
printstring 0x130
waitmessage 0x1
faintpokemon 0x0 0x0 0x0
setbyte 0x2023FD8 0x0
cmd49 0x2 0x10
jumpwhiletargetvalid @offset1
end

#org @offset4
pause 0x20
cmd6
missmessage
resultmessage
waitmessage 0x40
setbyte 0x2023FD8 0x0
cmd49 0x2 0x10
jumpwhiletargetvalid @offset1
end

// Used Strings
// String 0x130
// =

EDIT 3: Ugh, hitting a Protect also stops execution of the above script. Hmm...

EDIT 4: Oh, I figured it out. Turns out that there's nothing wrong with the script, but BSP was compiling an offset incorrectly for some reason.

misterpoor
December 13th, 2013, 07:17 PM
I don't know how to count, 75e8f8+4 = ?

LCCoolJ95
December 14th, 2013, 02:40 PM
I don't know how to count, 75e8f8+4 = ?
In hex, 75E8F8+4=75E8FC would be the correct offset.

shaheer07
January 5th, 2014, 03:53 PM
How would we do this for NDS games?

Shiny Lizard
January 12th, 2014, 12:57 PM
Can anyone could put sone photos? :)

Leafbarrett
January 30th, 2014, 12:41 PM
Since none of ya'll wanna help Emerald users with pointers and such, I'm blindly stumbling through the usable parts of the tutorial and praying I get it right.

I think I might have found the base "does damage" code for Emerald. Maybe. Hopefully.
At 2D8A26:
00 01 5E 8A 2D 08 00 00 02 03 04 05 06 07 09 0A 0E 5C 00 3A 0B 00 0C 00 0D 12 40 00 0F 12 40 00

If there's any sort of consistency between the games, add this to the end of the move to complete it:
28 47 8A 2D 08


Also, apparently there's no way to convert effects between the two games, because after like 5 hours of trying pointers (including the ones that following the tutorial letter for letter gave me and the Emerald equivalents as far as I (or anyone else unless someone's not talking) can figure out) I can't get a single one to work, including Hammer Arm.
EDIT: I got it to work by using a battle script instead, though there was still some blind searching for pointers involved, and I'm honestly not super-confident in how exactly I got it to work.

LCCoolJ95
February 2nd, 2014, 09:41 AM
Since none of ya'll wanna help Emerald users with pointers and such, I'm blindly stumbling through the usable parts of the tutorial and praying I get it right.

I think I might have found the base "does damage" code for Emerald. Maybe. Hopefully.
At 2D8A26:
00 01 5E 8A 2D 08 00 00 02 03 04 05 06 07 09 0A 0E 5C 00 3A 0B 00 0C 00 0D 12 40 00 0F 12 40 00

If there's any sort of consistency between the games, add this to the end of the move to complete it:
28 47 8A 2D 08


Also, apparently there's no way to convert effects between the two games, because after like 5 hours of trying pointers (including the ones that following the tutorial letter for letter gave me and the Emerald equivalents as far as I (or anyone else unless someone's not talking) can figure out) I can't get a single one to work, including Hammer Arm.Let me check it out. I'm more of an Emerald ROM hacker.

Leafbarrett
February 10th, 2014, 09:32 AM
Let me check it out. I'm more of an Emerald ROM hacker.
I got it to work by using a battle script instead (along with some more lucky stumbling). I do need help on some things though, mind if I PM you with some questions?

Also, I think this really needs to be in the OP.
If you're going to be giving the moves descriptions (so basically always), you need to move and repoint the table of move description pointers. If you don't, then when you change the description pointers for new moves, it will start to overwrite the Nature names (which follow immediately after the move descriptions), even if it's a preexisting description (i.e. giving Flare Blitz Double-Edge's description). Trust me, I learned this the hard way... Some of what I'm typing here (like explaining pointers) is explained in the OP already, but just to be safe, I'm adding them.

Step 1:
In a hex editor, go to:
Emerald: 61C524
Ruby: 3C09D8
Sapphire: 3C0A30
Fire Red: 4886E8
Leaf Green: 487FC4
and copy 1416 bytes of data.

https://dl.dropboxusercontent.com/u/28505565/bluh/hack/tutorial/step_1.png


Step 2:
Paste that to free space. Make sure to write down the new offset! (Notepad is your friend.) Also make sure you're overwriting bytes, not inserting them! If you're not overwriting bytes, then you'll change the size of the rom. That does bad things. (Admittedly, I'm not entirely sure what those bad things are, and I've been able to run the rom after changing the file size, but I know it messes some programs up, and you don't want to take the risk anyhow.) If there's no Paste Write/Overwrite option, then select 1416 bytes at the free space address, delete them, then paste the description table. If for some reason you insert instead of overwriting, just go to the end of the rom and delete the excess bytes (the end of the rom should be 00FFFFFF).

https://dl.dropboxusercontent.com/u/28505565/bluh/hack/tutorial/step_2-1.png https://dl.dropboxusercontent.com/u/28505565/bluh/hack/tutorial/step_2.png


Step 3:
Once you've pasted that to free space, you need to make sure there's space for all the other pointers - don't want it overwriting your new stuff either, do we?
There are a couple of ways to reserve the space for future pointers. What I personally do is replace FFs with 00s. Select 628 bytes after the end of the new table and fill it with 00s. The table should be 2044 bytes in length overall. If your hex editor doesn't have a Fill function, copy 628 bytes from the beginning and paste it at the end instead (remember, overwrite, don't insert).

https://dl.dropboxusercontent.com/u/28505565/bluh/hack/tutorial/step_3.png

Step 4:
Now we have to tell the game to look at your new description table instead of the old one. We do this by replacing the pointers directed at the old table with ones aimed at the new table.
A pointer, in short, is an address that points to something else in the game's data. It's used for almost every list or table, as well as being used in animations, move effects, scripts... You name it, the game has a pointer in it or to it.
In Emerald, we want to replace pointers to 61C524 with ones to our new offset (E4AA68 for me). For other games, just use the description pointer from the list above instead of 61C524.
However! Pointers don't store addresses normally. Pointers look like this:
ZZ YY XX 08
where XXYYZZ is the address.

So instead of searching for 61C524, we want to search:
24 C5 61 08
and replace it with the new pointer. In my case:
68 AA E4 08

https://dl.dropboxusercontent.com/u/28505565/bluh/hack/tutorial/step_4.png


Step 5:
Now we need to tell PGE to look at the new description list. Before doing this, I suggest making a backup of PGE's files, just in case.

In the folder with PGE (wherever you happened to put it), open the "ini" folder and open "roms.ini" (if it doesn't have a default opening program, use Notepad). In that file, find the game you're hacking (make sure you have this right) and find "AttackDescriptionTable".
The way I do it is I search the rom name, then search "description".
Change it from its original value to your new address (don't use the pointer notation, just a normal address). Make sure not to delete the H before the address - that's what tells PGE that it's looking at a hex value, not a string.

https://dl.dropboxusercontent.com/u/28505565/bluh/hack/tutorial/step_5.png


And there you go.
If you've already messed up the natures, don't worry, it's an easy fix. Follow the tutorial, but instead of just copying 1416 bytes in step 1, copy an additional 4 for every new move you gave a description, and in step 3, fill in 4 fewer bytes for every new move with a description. As I said above, the table should be 2044 bytes in length when you're done.
After that:

Step 1:
Open a fresh ROM in a hex editor. Go to the original move description table, select 1416 bytes, and move your cursor onto the very next byte. This is the start of the natures. In Emerald, it's at address 61CAAC. (I don't know what it is in the other games, sorry.) Once there, select and copy a number of bytes equal to the newly described moves times 4 (at max, 628 bytes). The nature names take up 162 bytes, and the table of pointers for the natures (which follows immediately after) takes up 100 bytes; selecting 264 bytes will get you both (there's 2 bytes extra between the names and the table).

https://dl.dropboxusercontent.com/u/28505565/bluh/hack/tutorial/fix_1.png

Step 2:
Go to the nature names' address in your hack and paste overwrite the data fix.

!!WARNING!!
MAKE SURE TO PASTE OVERWRITE! I don't know what the repercussions of inserting at the end of the ROM are, because that just pushes empty space. I DO know exactly what will happen if you try inserting here. Your game will completely cease all function because it will throw off every pointer aimed past this address, breaking everything.

https://dl.dropboxusercontent.com/u/28505565/bluh/hack/tutorial/fix_2.png

Joltix
February 24th, 2014, 09:15 PM
Was wondering if anyone knows how to change the types on attacks. I've added the fairy type to the game for the pokemon and changed its resistance and effectiveness against other types but for the life of me, I can't figure out how to change it for the attacks.
EG. changing tackle from a normal type to a fairy type.

I've read that it can be done with the g3t tools but they are not available at the moment and was wondering if it can be changed using hex in the attack table and if so, any idea of where the table starts.

Thank you.

Edit: Managed to do it with hex. All working fine. Thanks for the help and it's Fire Red I'm using. :)

LCCoolJ95
February 25th, 2014, 08:47 AM
Was wondering if anyone knows how to change the types on attacks. I've added the fairy type to the game for the pokemon and changed its resistance and effectiveness against other types but for the life of me, I can't figure out how to change it for the attacks.
EG. changing tackle from a normal type to a fairy type.

I've read that it can be done with the g3t tools but they are not available at the moment and was wondering if it can be changed using hex in the attack table and if so, any idea of where the table starts.

Thank you.
Hmm...it definitely depends on what ROM you are using. So, what ROM are you using?

tditdatdwt
March 1st, 2014, 05:38 AM
...ehm ......i dont have 250C04....