Binary Hack Research & DevelopmentGot a well-founded knack with your binary Pokémon hacks? Love reverse-engineering them? For the traditional Pokémon ROM hacker, this is the spot for polling and gathering your ideas, and then implementing them! Share your hypothesis, get ideas from others, and collaborate to create!
This isn't Ability-related but I wonder if Safety Goggles can be included there. The item's effect is to immune weather-related damage and powder moves.
Much like a free Overcoat
__________________
Ho oh Ho oh it's Lugia, Unown, you'll never believe it's Zapdos.
This is a table that contains the indices (Half Words) of damaging moves not supported by Parental Bond like Multi-Hit, Charging Turn Moves etc. Terminated by FEFE. Add indices for new moves like Dual Chop, Double Hit etc.
.text
.align 2
.thumb
.thumb_func
.global restoreabilities
EndTurn:
ldr r0, .Outcome
mov r1, #0x0
strb r1, [r0]
ldr r0, .Index
strb r1, [r0]
ldr r0, .ParentalByte
strb r1, [r0]
RestoreAbilities:
push {r2-r6}
ldr r4, .Battlers
ldrb r4, [r4]
mov r3, #0x0
ldr r5, .DisabledAbilityLoc
ldr r6, .BattleData
Loop:
ldrb r2 [r5, #0x0]
cmp r2, #0x0
beq EndLoop
strb r2, [r6]
strb r1, [r5]
EndLoop:
add r3, r3, #0x1
cmp r3, r4
bge Exit
add r5, r5, #0x1
add r6, r6, #0x58
b Loop
Exit:
pop {r2-r6}
ldr r1, .EndLoc
mov r0, #0xB
strb r0, [r1]
bx lr
.align 2
.Outcome: .word 0x02023DCC
.Index: .word 0x02023BC4
.Battlers: .word 0x02023D6C
.DisabledAbilityLoc: .word 0x0203C034
.BattleData: .word 0x02023C04
.EndLoc: .word 0x02023BE3
.ParentalByte: .word 0x203C03C
@ Go to your Battle Script command table, search for CD 2C 02 08 and replace it by XX+1 XX XX 08 (We are replacing the 'End' Battle Script Command. Not the case in Emerald)
Basically the 4th Mold Breaker Routine with added logic to clear the Parental Byte.
Bugs
Spoiler:
Does not handle Knock Off, Smelling Salts and Color Change as done in Gen VI. This due to the differences in order between Gen VI and Gen III handling of events during a Move Execution.
I can't get the 5th routine to compile. The command prompt disappears at light speed but with a fast screenshot, it says the problem is on line 23?
What script editor is being used for these routines or can XSE use these when compiling?
I would like to make some new abilities for the new types in my hack. What is the routine (or offset so I can reverse engineer) for Overgrow, Swarm, Blaze, and/or Torrent so I can change the type to be one of the new ones.
And finally, after expanding the ability names and descriptions (PGE comes with a tool to do that), how would I get the game to know to use the routines? What offset would I need to change to make it work?
What script editor is being used for these routines or can XSE use these when compiling?
I would like to make some new abilities for the new types in my hack. What is the routine (or offset so I can reverse engineer) for Overgrow, Swarm, Blaze, and/or Torrent so I can change the type to be one of the new ones.
And finally, after expanding the ability names and descriptions (PGE comes with a tool to do that), how would I get the game to know to use the routines? What offset would I need to change to make it work?
Thanks in advance.
I was confused about this at first too. I'll try to explain how abilities or rather ability's effect work in battle. Pokemon ability is stored in a certain battle struct and is always retrieved from there. Each ability has an ID, a byte in order in the abilities names table. There are no routines for each specific ability. Mostly there are three places where abilities are checked, first being damage calc, second being accuracy checker and most important being giant ability_battle_effects function. So swarm for example works like this:
damage calculator code...
if (attacker_ability == SWARM and move_type == BUG and has less than 31 % of max hp)
{
damage = damage * 1.5;
}
rest of the code...
As you can see, abilities are checked at run time. Now, I suggest you take a copy of FR or EM IDA, look at offset locations in this thread and see how battle functions work.
So to answer, if you expand the ability and want the game to recognize it, you just have to do something like this in your code:
if (pokes_ability == ID_of_new_ability)
do something;
And again, some of the abilities are placed at many places, like there are checks for white smoke and clear smog in stat lowering function or there's a wonder guard check in the type damage calc.
Also, I think this thread becomes more and more unusable. There are about 100 new abilities in gens IV-VI and they all have to be hooked somewhere. I'm not even talking about the time to assemble and insert every routine that's here but also about how the hook locations may contradict each other and how changes to it become more difficult. The solution would be a partial rewrite of the battle engine compiled dynamically(preferably done in C), something that FBI's doing but to a much smaller degree.
I was confused about this at first too. I'll try to explain how abilities or rather ability's effect work in battle. Pokemon ability is stored in a certain battle struct and is always retrieved from there. Each ability has an ID, a byte in order in the abilities names table. There are no routines for each specific ability. Mostly there are three places where abilities are checked, first being damage calc, second being accuracy checker and most important being giant ability_battle_effects function. So swarm for example works like this:
damage calculator code...
if (attacker_ability == SWARM and move_type == BUG and has less than 31 % of max hp)
{
damage = damage * 1.5;
}
rest of the code...
As you can see, abilities are checked at run time. Now, I suggest you take a copy of FR or EM IDA, look at offset locations in this thread and see how battle functions work.
So to answer, if you expand the ability and want the game to recognize it, you just have to do something like this in your code:
if (pokes_ability == ID_of_new_ability)
do something;
And again, some of the abilities are placed at many places, like there are checks for white smoke and clear smog in stat lowering function or there's a wonder guard check in the type damage calc.
Also, I think this thread becomes more and more unusable. There are about 100 new abilities in gens IV-VI and they all have to be hooked somewhere. I'm not even talking about the time to assemble and insert every routine that's here but also about how the hook locations may contradict each other and how changes to it become more difficult. The solution would be a partial rewrite of the battle engine compiled dynamically(preferably done in C), something that FBI's doing but to a much smaller degree.
Ok, so you're saying that in order to have the new Swarm/Torrent/Overgrow/Blaze-like ability work, I need to expand that damage calculator code section to include the newly created ability and the new type? Is the code that you posted, what is actually used in the game/script editor? Or will I need to find what is actually used and copy it from there?
I haven't looked at many of the posts here so I'm not sure where to look. I would just really like having abilities made for the new types. Like I'm planning on using those ?s between Celebi and Treecko for new Pokemon and using 9 of them as starters, so having one of those for the new types would be nice. ASM/Scripting is the hardest for me to do from scratch. If I can reverse engineer, I can make new things.
im on the works to complete my 1460 rombase and i want to add mold breaker,treavolt and turboblaze how would you go about adding them i know how to implement the routine but i dont know how the mold breaker table would look like if anyone already has the mold breaker table inserted for fire red can u show me what it looks like
So I have Mr DS's ROM base, and know how to insert the ASM for the abilities, but how would I go about adding the names and descriptions?
Also, how would one go about creating Poison Touch for Fire Red?
I believe there is a table for the ability names and another one for descriptions; you have to expand both of them to support the new abilities, then add the new names/descriptions to the index slots that match the ASM (ie. if Protean has index 0x75 in it's ASM check, you'll have to find slot 0x75 on both tables and put the name/description there accordingly)
Apologies if the explanation was a bit vague or even incorrect, it's been a long time since I've worked on expanding stuff for new abilities :P
__________________
"All dreams are but another reality. Never forget..."
Looked through to see if this was already requested but didn't find anything...
I was wondering if MissingNo's ability which really has no name could be implemented.
It would be interesting as the original from Red/Blue not only adds 128 of an item to your sixth item slot but also the sprite is determined by specific slots in the players name (I think it's the 3rd, 5th, 7th and also 8th-10th but the naming function only uses 7 characters and leaves the last 3 blank).
That's all I have for now though...
Thanks for your time and all the work you all put into this;
I understand if this is not priority or even done as you all have a lot on your plate already.
^_^
Looked through to see if this was already requested but didn't find anything...
I was wondering if MissingNo's ability which really has no name could be implemented.
It would be interesting as the original from Red/Blue not only adds 128 of an item to your sixth item slot but also the sprite is determined by specific slots in the players name (I think it's the 3rd, 5th, 7th and also 8th-10th but the naming function only uses 7 characters and leaves the last 3 blank).
That's all I have for now though...
Thanks for your time and all the work you all put into this;
I understand if this is not priority or even done as you all have a lot on your plate already.
^_^
Handle it the same way as RBY :D on the set pokedex flag, add a check for the dex number of Missingno then add to item quantity. Idk which rom you're hacking, but you can find the dex flags routine in a pokedex expansion tutorial.
Handle it the same way as RBY :D on the set pokedex flag, add a check for the dex number of Missingno then add to item quantity. Idk which rom you're hacking, but you can find the dex flags routine in a pokedex expansion tutorial.
Thank you azurile13 ^_^
I shall looking in that direction then when I have some time.
Been so busy haven't had any time to really research and focus on rom hacking...
Honestly I need to start practicing again even if just for a 30min to an hour, I hate coming back and having to relearn what I was learning before I took a break an having to refresh my memory on this I already once learned >_< ehh Life right... ^_^ Gotta love it!!!
Basically for Fire Red but I wouldn't mind one for Emerald as well so they could be trade able (not priority though).
Honestly what would you even call this Ability >_< hahahaha Rift??? hahaha I don't know
I'm not sure if it should be posted here or in the moves section, but I was wondering how the game decides if a move is sound based for Soundproof/Cacophony? If it's the ability, can someone clearly state how it works instead of hinting at it? And if it's for each move, is there an attack editor that changes what needs to be changed?
I'm not sure if it should be posted here or in the moves section, but I was wondering how the game decides if a move is sound based for Soundproof/Cacophony? If it's the ability, can someone clearly state how it works instead of hinting at it? And if it's for each move, is there an attack editor that changes what needs to be changed?
There is a table which Soundproof reads if an attack is a sound-based move. You can use 3GT Tool to modify if a move is a sound-based. Be informed that it has only limit and if you wish to expand it, you should look on how to repoint the table. I believe there is a tutorial about that.
There is a table which Soundproof reads if an attack is a sound-based move. You can use 3GT Tool to modify if a move is a sound-based. Be informed that it has only limit and if you wish to expand it, you should look on how to repoint the table. I believe there is a tutorial about that.
Thank you so much. G3T actually allows one to repoint the table. A couple new moves I'm going to be adding will be sound based so it would mean a lot that they be treated as such. And now they can be :D
Can anybody make a new but modified Swift Swim ability. Aside of gaining speed in Rain, it may also gain speed in Waters (I mean seas, ponds and etc.).
__________________
This signature has been disabled.
Scrollbar appears
Please review and fix the issues by reading the signature rules.
You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.
Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
After a quick glance I can't see anything obviously wrong with the logic. Did you follow the instruction telling you to put 01 48 00 47 00 00 xx xx xx 08 1A 4A at 01F1E2. Remember the offset has to be little-endian and plus 1 (since it's THUMB code). If you did this, I can only assume it's broken.
So.... Thank goodness I found this post. I had all of sturdy implemented but I didn't know to add the 1 to the offset.
I really wish the people who made these abilities said which ones need the +1 and which ones don't (I think KDS said when to +1). I had thought all of them needed the +1 but then I thought they didn't because the people didn't say.
Also, I think Protean is broken. I tried putting it into my hack but it would freeze every time I select a move, even if I didn't have Protean. Unless it was one of those +1 ones. In that case I didn't +1 (see what I mean....) (but I really want Protean to work since it could cover my new types). Speaking of new types. Does Protean account for expanded types? I managed to put Protean in and make it not freeze. It did need the +1.
But for those of us who know enough to put these in, but not enough to make them themselves, it would be nice to state +1 or not.
On that case, does the Normalize, Pixilate, Refrigerate, and Aerilate script need to be +1'd?
[EDIT] I think I found a little hiccup with the Pixilate section. It is highlighted.
It should be #0x12 if Fairy comes right after Dark. If it was in decimal, Fairy would actually be 18, as the ??? type is number 9. And unless someone made Fairy not after Dark, I suggest they move it, or find out what its number would be in hex and then putting it in that bolded section.
Now, I could be wrong an it could actually work right, since I don't know ASM enough to make my own scripts, but I just thought that number was wrong.
forgive my stupidity, but even after looking through this thread and all the resources, I'm stuck on where or how you would make the game call a routine after inserting it. I'm interested in just replacing a few old abilities with new ones, and i've successfully (as far as i know) stuck a new ability routine in empty space, but from there i can't find a single way forward. if anyone could point me in the right direction i'd very much appreciate it!
forgive my stupidity, but even after looking through this thread and all the resources, I'm stuck on where or how you would make the game call a routine after inserting it. I'm interested in just replacing a few old abilities with new ones, and i've successfully (as far as i know) stuck a new ability routine in empty space, but from there i can't find a single way forward. if anyone could point me in the right direction i'd very much appreciate it!
there is literally no reason to replace an old ability with a new one, and is literally a lot harder (if not impossible) than you think it is. the way abilities are handled is way different than moves. abilities happen when the battle engine checks for it in various places, i.e. the damage calculator handles overgrow, torrent, blaze, and swarm, while the accuracy check handles sand veil. inserting new abilities is way easier than replacing old ones, so i strongly suggest you do that instead. so, this new ability routine probably had a few byte changes telling you how to do it. (the updated sturdy, for example, has you placing 01 48 00 47 00 00 xx+1 xx xx 08 1A 4A at 01F1E2). xx+1 xx xx refers to the address at which you put the routine +1 in little endian format.
there is literally no reason to replace an old ability with a new one, and is literally a lot harder (if not impossible) than you think it is. the way abilities are handled is way different than moves. abilities happen when the battle engine checks for it in various places, i.e. the damage calculator handles overgrow, torrent, blaze, and swarm, while the accuracy check handles sand veil. inserting new abilities is way easier than replacing old ones, so i strongly suggest you do that instead. so, this new ability routine probably had a few byte changes telling you how to do it. (the updated sturdy, for example, has you placing 01 48 00 47 00 00 xx+1 xx xx 08 1A 4A at 01F1E2). xx+1 xx xx refers to the address at which you put the routine +1 in little endian format.
after this i was still puzzled about the implementation until i realized that the routines themselves were checking if the pokemon had the ability. and now it works! thanks very much!
SAND FORCE, SAND RUSH, IRON FIST, SHEER FORCE, STRONG JAW, MEGA LAUNCHER, TOUGH CLAWS, RECKLESS [FR]
Spoiler:
Don't delete the nops, they're important.
It's also worth noting that you should make sure your ability IDs match those in the .equ section. In addition, check out the bottom to make sure your attack IDs match those in the table section. You can customize it, of course.
Code:
.thumb
.equ table_offset, 0x08250C04 @change this, it's your table of moves
.equ main, 0x08800000
.equ Iron_Fist, 0x5A
.equ Reckless, 0x79
.equ Sheer_Force, 0x7E
.equ Sand_Rush, 0x93
.equ Sand_Force, 0xA0
.equ Strong_Jaw, 0xAE
.equ Mega_Launcher, 0xB3
.equ Tough_Claws, 0xB6
.align 2
.org 0x0801E59E
hook_in_base_damage_calc:
nop
ldr r0, base_power_override_rewrite
bx r0
.align 2
base_power_override_rewrite: .word main + 1
null1:
nop
.org 0x08021130
hook_in_seteffectwithchancetarget:
ldr r1, skip_atk15_if_sheer_force
bx r1
.align 2
skip_atk15_if_sheer_force: .word atk15_sheer_force_check + 1
null2:
nop
.org 0x08021214
hook_in_seteffecttarget:
ldr r1, skip_atk16_if_sheer_force
bx r1
.align 2
skip_atk16_if_sheer_force: .word atk16_sheer_force_check + 1
@--------------------
.org 0x08028D60
sandstorm_check_rewrite:
@r0 is the battle struct
@r1 is attacker x 0x58
@r2 is the attacker
@r3 is nothing important but it's needed for the damage and all the checks
@r4 is the offset of the weather
@r5 is the offset of the attacker
@45 commands needed, no more no less. that's why i have nops in there.
add r3, r0, r1 @r1 is now the offset of the attacker
add r3, #0x20 @ability
ldrb r0, [r3]
cmp r0, #8 @sand veil
beq 0x08028DD4 @store 0 damage from sandstorm
cmp r0, #Sand_Force
beq 0x08028DD4
cmp r0, #Sand_Rush
beq 0x08028DD4
mov r1, #0
type_check_loop:
add r3, #1
ldrb r0, [r3]
cmp r0, #4 @ground
beq 0x08028DD4
cmp r0, #5 @rock
beq 0x08028DD4
cmp r0, #8 @steel
beq 0x08028DD4
cmp r1, #1
beq continue_rewrite
add r1, #1
b type_check_loop
continue_rewrite:
ldr r0, status_bits_atk96
lsl r1, r2, #2
add r1, r0
ldr r1, [r1]
mov r0, #0x80 @dig flag
and r0, r1
cmp r0, #0
bne 0x08028DD4
mov r0, #80
lsl r0, #0xB @mov r0, #0x40000, the dive flag
and r1, r0
cmp r1, #0
bne 0x08028DD4
ldr r1, sandstorm_damage
ldrh r0, [r3, #8] @max hp
lsr r0, #4
str r0, [r1]
cmp r0, #0
bne 0x08028DDA
mov r0, #1
b 0x08028DD8
nop
nop
nop
.word 0x02022B4C @battle_type_flags
.word 0x02023D6B @b_attacker
.word 0x02023F1C @weather
.word 0x02023BE4 @battle_struct
status_bits_atk96: .word 0x02023DFC
sandstorm_damage: .word 0x02023D50 @also known as b_move_damage but i wrote this after the rest
@so i don't know what label number to use and i'm too lazy to check
@--------------------
.org main
.align 2
start:
ldr r0, attacker1
ldrb r0, [r0]
mov r1, #0x58 @length of battle struct
mul r0, r1
ldr r2, battle_struct1 @make it r2 if there's an ability that stops some of these
add r0, r0, r2
mov r4, r0 @r4 is the offset of the attacker
ldr r0, defender
ldrb r0, [r0]
mul r0, r1
mov r5, r0 @r5 is the defender offset
setup:
ldr r0, move_to_execute1
ldrh r6, [r0]
ldr r0, move_table1
mov r1, #0xC
mul r1, r6
add r1, r0
ldrb r7, [r1, #0x2]
attacker_ability_jump:
add r4, #0x20
ldrb r0, [r4] @ability
cmp r0, #Iron_Fist
beq iron_fist_routine
cmp r0, #Strong_Jaw
beq strong_jaw_routine
cmp r0, #Mega_Launcher
beq mega_launcher_routine
cmp r0, #Sand_Force
beq sand_force_routine
cmp r0, #Sheer_Force
beq sheer_force_routine
cmp r0, #Reckless
beq reckless_routine
cmp r0, #Tough_Claws
beq tough_claws_routine
defender_ability_jump:
all_ability_jump:
b end1
@r0 has the ability of the attacker/defender, idk i haven't seen any ability that lowers bp yet
@r1 is the offset of the move to be executed
@r2 is the battle struct
@r3 is nothing
@r4 is the offset of the attacker
@r5 is the offset of the defender
@r6 is the move to execute
@r7 is the base power of the move to execute
tough_claws_routine:
ldrb r0, [r1, #0x9]
mov r1, #1
and r0, r1
cmp r0, #1 @if the contact flag is set in the move struct
beq add_one_third_base_power @continue as it's supposed to
b end1 @if else, end
reckless_routine:
ldrb r0, [r1]
cmp r0, #0x2D @jump kick effect
beq add_one_third_base_power
cmp r0, #0x30 @1/4 recoil effect
beq add_one_third_base_power
cmp r0, #0xC6 @1/3 recoil + paralysis chance
bne end1
add_one_third_base_power
mov r0, r7 @r0 is the base power
mov r1, #3
ldr r2, divsi3
bl jump_with_r2
add r7, r0 @r7 is the base power + 1/3 base power
b end_of_attacking_ability_routine
sand_force_routine:
ldr r0, weather
ldrh r0, [r0]
mov r3, #0x18
and r0, r3
cmp r0, #0
bne end1
check_attack_type:
ldrb r0, [r1, #3] @type of the move
cmp r0, #4 @ground
beq sheer_force_routine
cmp r0, #5 @rock
beq sheer_force_routine
cmp r0, #8 @steel
bne end1
sheer_force_routine:
mov r0, r7
mov r1, #0xA
ldr r2, divsi3
bl jump_with_r2 @r0 will be 1/10 of the bp
mov r1, #3
mul r0, r1 @and that's the 30%
add r7, r0
b end_of_attacking_ability_routine
iron_fist_routine:
ldr r1, iron_fist_pointer
b read_table
strong_jaw_routine:
ldr r1, strong_jaw_pointer
b read_table
mega_launcher_routine:
ldr r1, mega_launcher_pointer
read_table:
ldrh r0, [r1]
cmp r0, #0
beq end1
add r1, #2
cmp r0, r6
bne read_table
check_for_iron_fist:
ldrb r0, [r4] @ability
cmp r0, #Iron_Fist
bne add_one_half_boost_for_launcher_jaw
add_one_fifth_to_base_power_for_iron_fist:
mov r0, r7
mov r1, #5
ldr r2, divsi3
bl jump_with_r2
add r7, r0, r7 @(bp/5) + bp = r7
b end_of_attacking_ability_routine
add_one_half_boost_for_launcher_jaw:
lsr r0, r7, #1
add r7, r0
end_of_attacking_ability_routine:
ldr r0, base_power_override
strh r7, [r0]
end1:
add sp, #-0x10
ldr r4, flags_per_side_status
ldr r5, defender
ldrb r0, [r5]
ldr r2, get_side_per_status
bl jump_with_r2
ldr r2, return_address1
jump_with_r2:
bx r2
.align 2
attacker1: .word 0x02023D6B
defender: .word 0x02023D6C
battle_struct1: .word 0x02023BE4
move_to_execute1: .word 0x02023D4A
move_table1: .word table_offset
iron_fist_pointer: .word iron_fist_table
strong_jaw_pointer: .word strong_jaw_table
mega_launcher_pointer: .word mega_launcher_table
divsi3: .word 0x081E4018 + 1
flags_per_side_status: .word 0x02023DDE
get_side_per_status: .word 0x080751D8 + 1
return_address1: .word 0x0801E5AA + 1
weather: .word 0x02023F1C
base_power_override: .word 0x02023F50
@--------------------
atk15_sheer_force_check:
add r0, r2 @r0 is the offset of the attacker
add r0, #0x20
ldrb r0, [r0] @loading the ability to r0
cmp r0, #Sheer_Force
beq end3
cmp r0, #0x20 @serene grace
bne end4
end2:
bx lr
end3:
ldr r0, move_script_pointer1
ldr r1, [r0]
add r1, #1
str r1, [r0]
ldr r0, return_address2
bx r0
end4:
ldr r0, return_address3
bx r0
.align 2
return_address2: .word 0x080211FC + 1
return_address3: .word 0x08021160 + 1
move_script_pointer1: .word 0x02023D74
@--------------------
atk16_sheer_force_check:
ldr r0, attacker2
ldrb r0, [r0]
mov r1, #0x58
mul r0, r1
ldr r1, battle_struct2
add r0, r1
add r0, #0x20 @to get in range of the ability
ldrb r0, [r0]
cmp r0, #Sheer_Force
beq end5
continue:
mov r0, #1
mov r1, #0
ldr r2, apply_effect
bl jump_with_r2_again
end5:
pop {pc}
jump_with_r2_again:
bx r2
.align 2
attacker2: .word 0x02023D6B
battle_struct2: .word 0x02023BE4
apply_effect: .word 0x0801FF20 + 1
@--------------------
iron_fist_table:
.hword 0x4 @comet punch
.hword 0x5 @mega punch
.hword 0x7 @fire punch
.hword 0x8 @ice punch
.hword 0x9 @thunder punch
.hword 0x92 @dizzy punch
.hword 0xB7 @mach punch
.hword 0xDF @dynamic punch
.hword 0x108 @focus punch
.hword 0x135 @meteor mash
.hword 0x145 @shadow punch
.hword 0x147 @sky uppercut
.hword 0x167 @hammer arm
.hword 0x199 @drain punch
.hword 0x1A2 @bullet punch
.hword 0x264 @power-up punch
.hword 0x0 @end of table
strong_jaw_table:
.hword 0x2C @bite
.hword 0xF2 @crunch
.hword 0x131 @poison fang
.hword 0x1A6 @thunder fang
.hword 0x1A7 @ice fang
.hword 0x1A8 @fire fang
.hword 0x0 @end of table
mega_launcher_table:
.hword 0x160 @water pulse
.hword 0x18C @aura sphere
.hword 0x18F @dark pulse
.hword 0x196 @dragon pulse
.hword 0x1F9 @heal pulse
.hword 0x26A @origin pulse
.hword 0x0 @end of table
Tell me if you find any bugs please.
~EDIT~ and then i forgot that reckless and tough claws existed. oops. i fixed that, it was easy, assuming you edited the battle script for the jump kicks, take down, and double edge for brave bird and the like. which you should, because otherwise the AI won't use it right.
I think the Ate abilities are broken. I tried on a clean Fire Red rom and Scratch did not change to the type I specified and did not change effectiveness to the type it should have changed to.
Spoiler:
I added one ability using PGE, changed refrigerate on the code to use that ability number and the fire type. Gave charmander the ability. Battled rival's squirtle and scratch didn't change type. I'm really disappointed because I wanted to create those abilities for the other types and use them.
I think the Ate abilities are broken. I tried on a clean Fire Red rom and Scratch did not change to the type I specified and did not change effectiveness to the type it should have changed to.
Spoiler:
I added one ability using PGE, changed refrigerate on the code to use that ability number and the fire type. Gave charmander the ability. Battled rival's squirtle and scratch didn't change type. I'm really disappointed because I wanted to create those abilities for the other types and use them.
I can verify that the Type Changing portion does indeed work. I don't know exactly what you did, but something must have gone wrong with the ability checking part. I haven't tested the ability buffer part (I ported the ability to items instead so I used a different check).
__________________
"The human sacrificed himself, to save the Pokemon. I pitted them against each other, but not until they set aside their differences did I see the true power they all share deep inside. I see now that the circumstances of one's birth are irrelevant; it is what you do with the gift of life that determines who you are." -Mewtwo
I can verify that the Type Changing portion does indeed work. I don't know exactly what you did, but something must have gone wrong with the ability checking part. I haven't tested the ability buffer part (I ported the ability to items instead so I used a different check).
You wouldn't happen to know what I should do? It most likely is the ability buffer portion since you say you got it to change type by a different check. I really want to get these to work.