• 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

MrDollSteak

Formerly known as 11bayerf1
858
Posts
15
Years
i have another request for abilites can u guys do ice body and magician for emerald?

Ice Body is written up at the moment but it's part of a huge set of routines so it might be a while. Magician I haven't looked into but I imagine it can go into the table that KDS did for the Life Orb thing.

So the Speed and Priority abilities are something I've had written up for awhile but since edited because of KDS and Kleenex's rewrite of the Turn Order Loader. This routine has new items included in it as well, and a few moves such as Trick Room and Tailwind.

Prankster, Gale Wings, Stall, Sand Rush, Slow Start and Quick Feet

Spoiler:
 
Last edited:
218
Posts
10
Years
  • Seen Nov 12, 2021
Ice Body is written up at the moment but it's part of a huge set of routines so it might be a while. Magician I haven't looked into but I imagine it can go into the table that KDS did for the Life Orb thing.

So the Speed and Priority abilities are something I've had written up for awhile but since edited because of KDS and Kleenex's rewrite of the Turn Order Loader. This routine has new items included in it as well, and a few moves such as Trick Room and Tailwind.

Prankster, Gale Wings, Stall, Sand Rush, Slow Start and Quick Feet

Spoiler:

Little thing to note, you miss the fact that there might be more than one poke with slow start.
You can use 2 bytes instead of one, and use 3 bits for each bank, to code the five turns.

Other than that, looks great!

EDIT : My bad, I guess r7 is the bank. Well, you can still use 2 bytes instead of 4.

Also, I don't see where you decrease the counter for slow start, will it be in the end turn routine maybe ?
 
Last edited:

MrDollSteak

Formerly known as 11bayerf1
858
Posts
15
Years
Little thing to note, you miss the fact that there might be more than one poke with slow start.
You can use 2 bytes instead of one, and use 3 bits for each bank, to code the five turns.

Other than that, looks great!

What? No I don't. The routine is called for each banked pokemon. It adds the bank. So far I'm using 4 bytes, one for each of the banks.

EDIT: Yes it will be in a separate routine. So far it uses 4. One when the pokemon enters that sets the routine, counter decrease, then the attack and speed reductions.
I haven't posted the enter or end of turn routines yet because there are so many haha! Also KDS rewrote the enter routines to be a bit better so I am yet to completely redo them to match his new system. The counter decrease routines are going to be very annoying because there are so many new moves and abilities with counters.
 
Last edited:

pokefreak890

The One that will make everything great
853
Posts
9
Years
  • Age 26
  • Seen May 18, 2023
Oh i see well cant wait to see ice body and sorry to request again on the same day but do u have download and cursed body?
 

MrDollSteak

Formerly known as 11bayerf1
858
Posts
15
Years
Oh i see well cant wait to see ice body and sorry to request again on the same day but do u have download and cursed body?

Download and Cursed body are in a similar boat to Ice Body. They're both part of huge routines with lots of pre requisites, namely entry and contact abilities.
 
417
Posts
9
Years
  • Age 33
  • Seen Nov 20, 2016
This slightly off topic question is mostly directed at MrDollSteak/KDS/kleenexfeu based on number of contributions to this thread, though anyone can reply. Do any of you have a very detailed idb with a strong focus on the battle engine that you'd be willing to share? I get annoyed by adding a ton of little hooks here and there within a single routine/ also wanted to research battling in general, so I was going through the routines from which some of your hooks originate. I was plowing through the damage multiplier section with relative ease, throwing in easy additions like new ability and item multipliers. I thought I was making quick progress until I bumped into the horrendous ability_somethingeverything routine. There is (so far) no specific part of it that is terribly difficult to understand, but the sheer size makes me want to cry. Also, I'm guessing that I'm wasting my time as it seems likely that at least one of you has already documented these horrendous 7.3 kilobytes. I understand if you'd prefer not to, but if you'd be willing to share you research, I'd be very grateful :D
 
218
Posts
10
Years
  • Seen Nov 12, 2021
I've update my signature, you can find a link on my IDB, I wouldn't call it a "strong focus on the battle engine" but it's still something, I guess.

For battlestuffs, look in the name windows, the labels with check_something, or battle_something.

There are others labels I used but I don't have them all on the top of my head.

Also, it's emerald, not FR, but the battle engines are praticly the same (not completly though).



I don't know why we didn't do that earlier : I think it should be linked in the OP, in case people want to see/help.
Perhaps KDS has a better documentation, he seems far more organised than I am x)

Hope it'll help
 
Last edited by a moderator:
417
Posts
9
Years
  • Age 33
  • Seen Nov 20, 2016
:D THANK YOU
Even though it is Emerald :P
I agree that it would be a useful link in the OP and could encourage more people to contribute.
 

Trainer 781

Guest
0
Posts
I thought I was making quick progress until I bumped into the horrendous ability_somethingeverything routine. There is (so far) no specific part of it that is terribly difficult to understand, but the sheer size makes me want to cry. Also, I'm guessing that I'm wasting my time as it seems likely that at least one of you has already documented these horrendous 7.3 kilobytes. I understand if you'd prefer not to, but if you'd be willing to share you research, I'd be very grateful :D

Actually, this routine is a collection of around 18 different sections. The table which contains pointers to different sections is located at x1a0dc (FR). Each section has different purpose i.e one is for switchin abilities, one for contact, one for end turn abilities, etc. This routine is referenced from different locations for different purposes using r0 as a parameter to execute different section of this routine.
 
218
Posts
10
Years
  • Seen Nov 12, 2021
What? No I don't. The routine is called for each banked pokemon. It adds the bank. So far I'm using 4 bytes, one for each of the banks.

EDIT: Yes it will be in a separate routine. So far it uses 4. One when the pokemon enters that sets the routine, counter decrease, then the attack and speed reductions.
I haven't posted the enter or end of turn routines yet because there are so many haha! Also KDS rewrote the enter routines to be a bit better so I am yet to completely redo them to match his new system. The counter decrease routines are going to be very annoying because there are so many new moves and abilities with counters.

This message is addressed both to MrDS and KDS, is the switch-in system on the first page up to date ?

Because I made one myself, using more or less the same principle, except I hooked at the same place than weathers abilities. It has the advantage tu support mega evolution without having the call different parts of ability_something.
Indeed after the mega evo, I call ability_something with r0 = 0 (for switch in), and it's the same for role play/trace etc.
It also support custom messages etc.
With that I've made of the switch-in abilities (I think) : mold breaker, pressure and auras messages, download, imposter, updated weathers (snow warning, mega primal, drizzle/drought/sand stream)

So, my point here is to ask, did I forgot something apart from the counter for slow start ?
And, what system do you use for switch-in ? To see which one we should use
 

MrDollSteak

Formerly known as 11bayerf1
858
Posts
15
Years
This message is addressed both to MrDS and KDS, is the switch-in system on the first page up to date ?

Because I made one myself, using more or less the same principle, except I hooked at the same place than weathers abilities. It has the advantage tu support mega evolution without having the call different parts of ability_something.
Indeed after the mega evo, I call ability_something with r0 = 0 (for switch in), and it's the same for role play/trace etc.
It also support custom messages etc.
With that I've made of the switch-in abilities (I think) : mold breaker, pressure and auras messages, download, imposter, updated weathers (snow warning, mega primal, drizzle/drought/sand stream)

So, my point here is to ask, did I forgot something apart from the counter for slow start ?
And, what system do you use for switch-in ? To see which one we should use

The one KDS posted is the most recent one yes. It's the one I would recommend as it fixes intimidate though I guess you could handle that separately.

The full list of abilities discounting weather afaik are:
2E - Pressure entry Message
59 - Download
69 - Mold Breaker entry Message
6C - Anticipation
6D - Forewarn
71 - Slow Start counter set and entry message
78 - Frisk
80 - Unnerve entry Message
97 - Imposter
A4 - Turboblaze entry Message
A5 - Teravolt entry Message
BB - Dark Aura entry Message
BC - Fairy Aura entry Message
BD - Aura Break entry Message

I've done Anticipation and Forewarn on my old system as well as the ones you've mentioned. I've done the Slow Start one too. I have some code for Frisk working but I couldn't get it to cycle through the battle script twice for Double Battles, though KDS has explained a bit better how to do that.
 
417
Posts
9
Years
  • Age 33
  • Seen Nov 20, 2016
Actually, this routine is a collection of around 18 different sections. The table which contains pointers to different sections is located at x1a0dc (FR). Each section has different purpose i.e one is for switchin abilities, one for contact, one for end turn abilities, etc. This routine is referenced from different locations for different purposes using r0 as a parameter to execute different section of this routine.
Yep, I saw the jumptable and knizz pointed out the "huge switch,", but after going through the first case, I had posted my requests in hopes that I wouldn't have to read the rest of them >_<
 
457
Posts
10
Years
  • Age 29
  • Seen Apr 9, 2024
Prankster, Gale Wings, Stall, Sand Rush, Slow Start and Quick Feet

Line 14: add sp, #-x04?
Line 20: mov 10, r1. Is it r10 for real?
Line 39: Forgotten the comma between r0 and #0x18
Line 73: Branch out of range
Line 150: Another BufferMoveData? I guess should it be BufferBattleData or what?
Line 212: Branch out of range
Line 216: Branch out of range
Line 218: Forgotten the comma between r0 and #0x18
Line 228: Branch out of range
Line 414: Branch out of range
Line 416: Forgotten the comma between r0 and #0x18
Line 472: Is it actually EnigmaRamLoc2?
 
218
Posts
10
Years
  • Seen Nov 12, 2021
Line 14: add sp, #-x04? used to save some data sometimes
Line 20: mov 10, r1. Is it r10 for real? Yeah, why not ?
Line 39: Forgotten the comma between r0 and #0x18
Line 73: Branch out of range
Line 150: Another BufferMoveData? I guess should it be BufferBattleData or what?
Line 212: Branch out of range
Line 216: Branch out of range
Line 218: Forgotten the comma between r0 and #0x18
Line 228: Branch out of range
Line 414: Branch out of range
Line 416: Forgotten the comma between r0 and #0x18
Line 472: Is it actually EnigmaRamLoc2? Yeah, enigma is actually a placeholder for other items or berries, in link or some stuff like that

Some responses in bold red
 

Exodrake

The Manliest Chick that Ever Manlied
163
Posts
10
Years
  • Age 30
  • Seen Nov 30, 2016
Is anybody currently researching Anger Point? This ability is one that I am eager to implement in my hack. Not trying to be pushy or anything, I'm just curious if there's any progress on this ability. :)
 

Trainer 781

Guest
0
Posts
Is anybody currently researching Anger Point? This ability is one that I am eager to implement in my hack. Not trying to be pushy or anything, I'm just curious if there's any progress on this ability. :)

Fairly easy to implement. It requires to expand the table at x1a848 and write small amount of code for it. If you're using MrDS's rombase, then I think the table routine and the table have been changed so you might need to account for that.
 

pokefreak890

The One that will make everything great
853
Posts
9
Years
  • Age 26
  • Seen May 18, 2023
Fairly easy to implement. It requires to expand the table at x1a848 and write small amount of code for it. If you're using MrDS's rombase, then I think the table routine and the table have been changed so you might need to account for that.

what about for emerald would it be the same or would there be a diffrent offset?
 

pokefreak890

The One that will make everything great
853
Posts
9
Years
  • Age 26
  • Seen May 18, 2023
I was wondering if u guys can create the new switch in ability system for emerald?
 
Back
Top