• 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?".
  • Forum moderator applications are now open! Click here for details.
  • 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

MrDollSteak

Formerly known as 11bayerf1
858
Posts
15
Years

Ability Resource Thread

FsL5iyd.gif
sCF229V.png
oFp3gjq.gif

This thread is for the development and sharing of new ability routines and battle scripts for Fire Red and Emerald. Requests made by users can definitely be considered just make sure you follow the posting guidelines. Abilities are one of the things that I and other hackers are often asked to share, and make tutorials for, sadly the way in which abilities work, there is no real tutorial that can assist in making an ability outside of general ASM and battle scripting knowledge. For this reason I have decided to create this thread. It also makes it far easier for people to discover bugs or errors in routines, allowing for them to be fixed far more easily.

Extra Information

Before you get started, refer to the following threads for information about the procedure of expanding the relevant tables, inserting ASM and understanding how battle scripts work:

Expanding the Ability Name and Description Tables by RaileysXerilyasRX
Inserting ASM Routines by FBI Agent
HackMew's Knowledge by HackMew
GBA ASM Programming by Shiny Quagsire
Yet another ASM tutorial by knizz
BSP Scripting Tutorial by Jambo51

Thread rules

Do not demand for your requests to be fulfilled!
People do not have to fulfil your requests, they do it because they want to! Not only are those posts annoying, they also are completely pointless! If such a post is found, it will probably be deleted.

Wrap your abilities and routines in [SPOILER]spoiler tags[/SPOILER].
This is here to keep the thread as easy to browse as possible, as most routines and whatnot tend to take up multiple lines and this can make scrolling through the thread a chore.

Be reasonable with your requests!
This thread is for mostly small ability routines or battle scripts: don't be greedy! No-one is going to make an entire hack for you.

Give credit when requested!
If and when you use any of the routines posted here, give credit to the original creator if they ask for it. If they don't explicitly ask for credit, assume they do. Theft won't be tolerated and if you're caught the moderators will request you add credits to your hack threads, and if not your thread may be deleted.

State the base game for which your requests / abilities are for.
This is mostly to avoid confusion, and to allow for easier organisation of the thread. Please try not to request abilities for Ruby or Sapphire: these games are very difficult to code for and Emerald tends to be far better in nearly every way.

Read the thread before making a request!
Again for organisational reasons, it is a waste of space and time to request abilities which have already been created.

New Abilities

All the routines here are for abilities from Gen 4 and above. They are treated in the index order of the most recent games ORAS +1. This is because Cacophony no longer exists in those games, and therefore does not take an index slot. For this reason while Tangled Feet is listed as ability number 77 on Bulbapedia, if you have expanded your ability table, it will in fact be ability number 78. Remember also that this is the decimal index number, so the routines themselves will be listed with their indexes in hex.

Additionally because some abilities are tied to the same routine, or have prerequisites please look at the ability routines themselves, because you may not need to insert it multiple times, or will need to have inserted other routines to get them to work.

Spoiler:


Updated Effects


All the routines here are to add effects that did not exist in Gen 3 to abilities that did. They use the same index numbers as the existing abilities.

Spoiler:
 
Last edited:

MrDollSteak

Formerly known as 11bayerf1
858
Posts
15
Years
To start off here are a few damage-calc related abilities as well as an update Sturdy effect!

These abilities require Doesnt's PSS Split, because of a few shifting bytes.

Sniper, Technician, Defeatist and the Slow Start Attack Drop
Spoiler:

Toxic Boost and Flare Boost
Spoiler:
Multiscale and Fur Coat
Spoiler:
Sturdy
Spoiler:
 
Last edited:
457
Posts
10
Years
  • Age 28
  • Seen Mar 17, 2024
It is an excellent thing that someone finally made this kind of thread. Keep it up dude!
It is kinda bit complicated for me about how abilities are triggered when in need. Well, I'm off to study them. :)

EDIT: One good question: if two routines (one is old and one is latest but different abilities) collides when "insert this at whatever offset", will you rewrite the asm? I don't know if you understand this question and I don't also know if this will possible in progress.

EDIT2: Ported the new Sturdy... there is a bug/error at: In the same turn, if the faster one attacks the enemy then enemy activates sturdy then the enemy uses a status move that affects with snatch, there will be a message appear that is snatch related. I don't know if you can understand this but do a battle in the same turn that you attack first that makes that sturdy effect on the enemy and the enemy uses a status move that affects snatch so you will see what I mean. It snatched itself. A status move used in the next turn after sturdy's turn still works fine (no snatch message). Noted that I have applied expansion of pokemon, types, attacks, abilities, and the pss patch and icons whenever I'm going to post some errors dude.
vVEBT0a.gif
 
Last edited:

Trainer 781

Guest
0
Posts
There was a report mentioning problems with the Magic Bounce Ability in MrDS's Rombase, so I decided it to implement this myself from scratch, and it is working fine in Trainer Battles and Doubles.
Here it is posted with Moxie.

Magic Bounce
Spoiler:


Moxie
Spoiler:


Also, these require Jambo's Callasm and Setword commands, and his Battle String Loader Hack.
 
Last edited:
252
Posts
10
Years
  • Age 27
  • Seen Jul 6, 2019
It is an excellent thing that someone finally made this kind of thread. Keep it up dude!
It is kinda bit complicated for me about how abilities are triggered when in need. Well, I'm off to study them. :)

EDIT: One good question: if two routines (one is old and one is latest but different abilities) collides when "insert this at whatever offset", will you rewrite the asm? I don't know if you understand this question and I don't also know if this will possible in progress.

EDIT2: Ported the new Sturdy... there is a bug/error at: In the same turn, if the faster one attacks the enemy then enemy activates sturdy then the enemy uses a status move that affects with snatch, there will be a message appear that is snatch related. I don't know if you can understand this but do a battle in the same turn that you attack first that makes that sturdy effect on the enemy and the enemy uses a status move that affects snatch so you will see what I mean. It snatched itself. A status move used in the next turn after sturdy's turn still works fine (no snatch message). Noted that I have applied expansion of pokemon, types, attacks, abilities, and the pss patch and icons whenever I'm going to post some errors dude.
vVEBT0a.gif
That's a bug MrDS and I encountered when we were making sturdy. It's fixed in the FR version, but not EM's for some reason (probably a goof on Dollsteak's part). At DisplayEndureMessage, change mov r1, #0x32 to mov r1, #0x2.
 
15
Posts
9
Years
  • Age 28
  • Seen Nov 20, 2016
Also, these require Jambo's Callasm and Setword commands, and his Battle String Loader Hack.

Where can I find the files to patch those in.

Also, would this work with the Mr Dollsteak's Decap Patch?
 
131
Posts
9
Years
  • Age 23
  • Seen today
Alright, I tried implementing the Sturdy for FireRed with MrDollSteak's patch applied to it, but the game froze when I tried the opposing Tepig used Overheat on my Turtwig. At first I thought it was an issue with Overheat, so I tried changing it to Blast Burn, but same thing happened. Note that both times I used Withdraw on the first turn. I tried again, but I used Tackle, and it froze. I wondered if it was an issue with the Rombase and not being compatible, so I went to a clean FireRed ROM, inserted it there, and it happened again. Am I doing something wrong, or can someone else verify that the Sturdy routine is messed up?
 

ShyRayq

Unprofessional Unprofessional
1,856
Posts
16
Years
  • Seen Mar 26, 2024
Alright, I tried implementing the Sturdy for FireRed with MrDollSteak's patch applied to it, but the game froze when I tried the opposing Tepig used Overheat on my Turtwig. At first I thought it was an issue with Overheat, so I tried changing it to Blast Burn, but same thing happened. Note that both times I used Withdraw on the first turn. I tried again, but I used Tackle, and it froze. I wondered if it was an issue with the Rombase and not being compatible, so I went to a clean FireRed ROM, inserted it there, and it happened again. Am I doing something wrong, or can someone else verify that the Sturdy routine is messed up?

When you placed the hook in, did you add 1 to the routine's pointer? Because you need to do that. If you did, I'm not sure what the problem is.
 
131
Posts
9
Years
  • Age 23
  • Seen today
...durr, I pulled a dumb. Works perfectly now! Thank you!

Also, do you plan on adding these abilities to your ROMbase if they aren't already there (like the upgraded Sturdy, and KDS's new Magic Bounce)?
 

AtecainCorp.

Rejishan awake...
1,377
Posts
15
Years
There was a report mentioning problems with the Magic Bounce Ability in MrDS's Rombase, so I decided it to implement this myself from scratch, and it is working fine in Trainer Battles and Doubles.
Here it is posted with Moxie.

Magic Bounce
Spoiler:


Moxie
Spoiler:


Also, these require Jambo's Callasm and Setword commands, and his Battle String Loader Hack.


Someone can traslate me MOXIE effect for Pokemon Fire Red? I'm confused.
 
131
Posts
9
Years
  • Age 23
  • Seen today
If I may make a suggestion? I think it would be very useful to upload the codes for Mega Launcher and Reckless, because those abilities (boost moves if they are in a certain table) could be very useful in making "new" abilities. Just a thought.
 

Trainer 781

Guest
0
Posts
Re: Urobolos

Sorry the for the late reply. The callasm command and battle string loader hack are posted in the Quick R&D thread and these things are already installed in MrDS' Patch.

Re: AtecianCorp.

Lol, you just the need to make the byte changes mentioned the post in a Hex Editor and install Jambo's battle string and setword command.

Anyway, here are some more abilities!

1. Mold Breaker, Teravolt and Turboblaze:
Spoiler:


2. Unaware & Updated Keen Eye (+ Sacred Sword Effect)
Spoiler:


3. New Switch-in Ability System
Spoiler:
 
Last edited:
15
Posts
9
Years
  • Age 28
  • Seen Nov 20, 2016
Sorry the for the late reply. The callasm command and battle string loader hack are posted in the Quick R&D thread and these things are already installed in MrDS' Patch.

Yeah, would the routines (for both the Magic Coat/Bounce fix and the fixed Ability Switch-In routines) still work if I compile and put them in a rom currently using the MrDS patch? Because I'm pretty sure the MrDS patch still uses the erroneous original routines.
 

Trainer 781

Guest
0
Posts
Yeah, would the routines (for both the Magic Coat/Bounce fix and the fixed Ability Switch-In routines) still work if I compile and put them in a rom currently using the MrDS patch? Because I'm pretty sure the MrDS patch still uses the erroneous original routines.

You need to remove the old ones before inserting the new ones.
 
794
Posts
10
Years
I have a question. How do you insert those abilities? I mean, I know how to insert ASM routine but what am I supposed to do later? How to write these abilities' effect into one that exists?
 

Trainer 781

Guest
0
Posts
Where can I even find the old routines to remove in the first place?

For Magic Bounce at x1D8D6 insert, 18 01 80 18 00 78 C0 06 88 46 before applying the new routines.
For the switch-in one, I advise to wait till the next version of the base since MrDS will be making many switch-in abilities using this system.
 
794
Posts
10
Years
The code for Fire Red's Sturdy is impossible to compile. Errors that I get:
Sturdy.asm:22: Error: invalid offset, value too big <0xFFFFFFFC>
Sturdy.asm:31: Error: invalid offset, value too big <0xFFFFFFFC>
Could someone correct it?
 

Touched

Resident ASMAGICIAN
625
Posts
9
Years
  • Age 122
  • Seen Feb 1, 2018
The code for Fire Red's Sturdy is impossible to compile. Errors that I get:
Sturdy.asm:22: Error: invalid offset, value too big <0xFFFFFFFC>
Sturdy.asm:31: Error: invalid offset, value too big <0xFFFFFFFC>
Could someone correct it?

There were errors in the case on lines 22 and 31. The fixed version is below

Spoiler:
 
Back
Top