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

Code: Ability Resource Thread

AkameTheBulbasaur

Akame Marukawa of Iyotono
409
Posts
10
Years
I'm currently working on something that will allow the user to load pretty much any Ability from a series of tables. The advantage (I hope) is that it will make Ability hacking a bit easier and more customisable since you would only need to add/remove entries from a table as opposed to having to put branches to a whole bunch of different routines.

I'm not entirely done, but the way that it's going so far, I will likely make a separate thread for it since it is so large.

I do have one question for anyone reading. Since the introduction of Gen VIII, we now have 267 different Abilities. This presents an issue as Gen III games only support up to 255 different Abilities. The question is, do you think it would be worth it to try to allow the game to use a halfword (two bytes) to load Abilities, or would most people simply just not use every single Ability instead.

Considering that there are nearly 1,000 Pokémon in existence, I don't know if it would be realistic to try to cram all of them into one hack. Therefore you wouldn't need all of the Abilities if you did not have all of the Pokémon.

That being said, I want to still attempt to program those Abilities just for the fun of it, I just wouldn't be able to give them a proper index number if it's past 255 (0xFF).
 

Dreamaker

Banned
97
Posts
14
Years
I'm currently working on something that will allow the user to load pretty much any Ability from a series of tables. The advantage (I hope) is that it will make Ability hacking a bit easier and more customisable since you would only need to add/remove entries from a table as opposed to having to put branches to a whole bunch of different routines.

I'm not entirely done, but the way that it's going so far, I will likely make a separate thread for it since it is so large.

I do have one question for anyone reading. Since the introduction of Gen VIII, we now have 267 different Abilities. This presents an issue as Gen III games only support up to 255 different Abilities. The question is, do you think it would be worth it to try to allow the game to use a halfword (two bytes) to load Abilities, or would most people simply just not use every single Ability instead.

Considering that there are nearly 1,000 Pokémon in existence, I don't know if it would be realistic to try to cram all of them into one hack. Therefore you wouldn't need all of the Abilities if you did not have all of the Pokémon.

That being said, I want to still attempt to program those Abilities just for the fun of it, I just wouldn't be able to give them a proper index number if it's past 255 (0xFF).

This is amazing!

I'm hoping it works out.

My project is focused on some specific Abilities, that is, I would not use all of them, it would be less than 255, it would be worth it.
 
Last edited:
112
Posts
8
Years
  • Age 27
  • Seen Mar 15, 2024
There's some abilites that are identical like insomnia and vital spirit, so maybe replacing those would be a good way to have more ability slots.
 

AkameTheBulbasaur

Akame Marukawa of Iyotono
409
Posts
10
Years
There's some abilites that are identical like insomnia and vital spirit, so maybe replacing those would be a good way to have more ability slots.

I went in Bulbapedia and tallied the amount of Abilities that were exactly identical to something else (as opposed to having a similar but slightly different effect). There were 12, which brings our grand total of unique Abilities to....

255!

Which is exactly enough to fit everything if we replace the repeat Abilities. Until Gen 9 anyway when they inevitably have more stuff.

Anyway, my update on the Ability thing is that I am able to load different routines without having anything crash. I just need to now make all the separate routines which actually apply the effects. Once I finish with school for the semester, I hope to really be able to work on it.
 

Manekimoney

Banned
169
Posts
6
Years
  • Age 25
  • Seen Jan 18, 2024
Fire Red
Spoiler:

Does the Fire Red ASM for Defeatist actually work? Not that anyone would notice that it doesn't, since nobody would bother to implement that ability (except me), but it seems broken.

The ASM states:
Code:
Technician:
	cmp r4, #066
	bne Defeatist
and
Code:
Defeatist:
	cmp r4, #066
	bne SlowStart
But the "cmp r4, #066" seems wrong, for both. Shouldn't it be "cmp r4, #0x66" and also, Defeatist should have "cmp r4, #0x82" to be sorted like all the other abilities in the list.

But even when I implemented these changes, while Technician seems to work fine, Defeatist doesn't seem to. Does anyone know if it's the ASM that's broke, or am I just missing something dumb?
 

Dreamaker

Banned
97
Posts
14
Years
As it turns out, this was next on my To Do List anyway, so you're in luck!

Intimidate Update
This updates Intimidate so that it doesn't work against Pokemon with Inner Focus, Own Tempo, Scrappy and Oblivious.

Spoiler:


Compile this with a THUMB compiler and put the offset at the top where it says ".equ ROM, 0x8". Then change any pointers to 0x1D9307 to a pointer to where you put this script.


Shield Dust does not work against intimidate, the game crashes. ;D
 
853
Posts
3
Years
  • Age 33
  • Seen Nov 9, 2023
Hi everyone, I want to make relatively small edits to 2 existing abilities and make an entirely new ability, that's very slightly similar to another in function, how do I get started?
 

Manekimoney

Banned
169
Posts
6
Years
  • Age 25
  • Seen Jan 18, 2024
Hi everyone, I want to make relatively small edits to 2 existing abilities and make an entirely new ability, that's very slightly similar to another in function, how do I get started?

There is no table or something similar that tells each ability what to do. Each ability is "hard coded" into the battle system or overworld function etc.

To make custom abilites yourself (and probably ability editing), you will need to create ASM routines and insert them (although some abilities can be edited by simply hex editing, for example, rough skin's damage)

You will probably need to expand the ability name and description tables (tutorial on first post), but to create each ability, it's just a matter of creating a ASM routine that does the thing you want. You could probably use some of the abilities that are available on this thread for some reference.

(note that I have the below minimal knowledge on ASM, so I probably can't help much more than that)
 
853
Posts
3
Years
  • Age 33
  • Seen Nov 9, 2023
There is no table or something similar that tells each ability what to do. Each ability is "hard coded" into the battle system or overworld function etc.

To make custom abilites yourself (and probably ability editing), you will need to create ASM routines and insert them (although some abilities can be edited by simply hex editing, for example, rough skin's damage)

You will probably need to expand the ability name and description tables (tutorial on first post), but to create each ability, it's just a matter of creating a ASM routine that does the thing you want. You could probably use some of the abilities that are available on this thread for some reference.

(note that I have the below minimal knowledge on ASM, so I probably can't help much more than that)

Gotcha thanks, so the description itself doesn't determine the effect that's just something you write in after for the users right?
 
853
Posts
3
Years
  • Age 33
  • Seen Nov 9, 2023
Yes. The description has nothing to do with the effect

alright thanks, ok one other thing, I'm looking at moves in hex maniac advance and I see different move effects listed, but there aren't combinations for every effect type. If I look at the raw byte for each one, if I add them together would that be the same as an move that has those two effects?

For example one move can paralyze one move can cause flinch. say paralyze is 06 and flinch is 1F if I add them and put them in the effect section of the string as 25 would that be paralyze and flinch?
nvm that's off topic.
 
853
Posts
3
Years
  • Age 33
  • Seen Nov 9, 2023
So I checked out the post for expanding ability name and description table. and there's a simpler way to do that now so I thought I'd make a quick update post. So with Hex Maniac Advance I think as long as you're using a gen 3 rom, you can just load it, and quickly navigate to the table named as ability names for your rom.

press ctrl g to bring up the goto function. then type in either data.abilities.descriptions or data.abilities.names

based on which you want, but it doesn't matter which you do, because they are linked together, opening the name table will allow you to quickly jump to the descriptions table and vice versa because they are linked in the tab.

Anyway once you're there go to the last entry in the table and in the main tab the "add" button should be un-greyed out. All you have to do is press up to select how many entries you want to add to the table, press add and its updated. and if there wasn't enough free space after the table at that position, it would automatically move and repoint.

If you're going to do this often, you can also create a shortcut to the table, in the first entry of the table press SHIFT 6, then type whatever name you want without spaces, like you're writing a script. like ability.names or A.names whatever works for you. then press enter and a placeholder is put in the program without affecting the data itself. Adding to your base list of options when you open the goto menu, so you no longer have to type out the long name to access the table.

Here's an image of the dialogue to expand the table.
Screenshot (438).png
 
19
Posts
8
Years
But the "cmp r4, #066" seems wrong, for both. Shouldn't it be "cmp r4, #0x66" and also, Defeatist should have "cmp r4, #0x82" to be sorted like all the other abilities in the list.

But even when I implemented these changes, while Technician seems to work fine, Defeatist doesn't seem to. Does anyone know if it's the ASM that's broke, or am I just missing something dumb?

For the values next to each cmp r4, you'll want to put the index number that corresponds to where the ability is in your ROM's ability table. It'll only be 0x66 for Technician and 0x82 for Defeatist if they're in those respective slots. Otherwise, you'll have to count it up and figure out which value to use.

That aside, Defeatist was indeed broken, but managed to fix it with some help from my compsci-savvy friend. Here's the new code from Defeatist onwards:
Spoiler:
 

Manekimoney

Banned
169
Posts
6
Years
  • Age 25
  • Seen Jan 18, 2024
For the values next to each cmp r4, you'll want to put the index number that corresponds to where the ability is in your ROM's ability table. It'll only be 0x66 for Technician and 0x82 for Defeatist if they're in those respective slots. Otherwise, you'll have to count it up and figure out which value to use.

That aside, Defeatist was indeed broken, but managed to fix it with some help from my compsci-savvy friend.

Tested it out and it does indeed work. Thank you very much!
 
853
Posts
3
Years
  • Age 33
  • Seen Nov 9, 2023
I just need to know how to find the battle script or asm of any ability for fire red.

Is it some process leading from the offset of the name?

I'm trying to change sturdy but can't find its data.
 
112
Posts
8
Years
  • Age 27
  • Seen Mar 15, 2024
I don't think this has been adressed before, but later generations updated shadow tag so that users of the same ability won't be trapped by each other, in a way to avoid a lengthy struggle battle between 2 Wobbuffets, has anyone made an updated version yet?
 

Dreamaker

Banned
97
Posts
14
Years
For my GEN IV rom base Fire Red project I need these abilities, does anyone have it?
Tangled Feet - Done
Motor Drive - Done
Rivalry - Need
Steadfast - Done
Snow Cloak - Done
Gluttony - Done
Anger Point - Done
Dry Skin - Done
Download - Done
Iron Fist - Done
Adaptability - Done
Skill Link - Done
Hydration - Done
Solar Power - Done
Quick Feet - Done
Sniper - Done
Magic Guard - Done
No Guard - Done
Technician - Done
Leaf Guard - Done
Mold Breaker - Done
Super Luck - Done
Forewarn - Done
Tinted Lens - Done
Filter - Done
Scrappy - Done
Solid Rock - Done
Snow Warning - Done
Frisk - Done
Reckless - Done
 
Last edited:
39
Posts
5
Years
For my GEN IV rom base Fire Red project I need these abilities, does anyone have it?
Rivalry
Gluttony
Download

Working Download & Rivalry is in MrDollSteak's Decap. and Attack Rombase ;)

ps: You already have Anger Point?
 
Back
Top