• 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

For Regenerator, do we need to re-insert the routine if we're using your ROMbase and fixed Natural Cure with the byte changes, or should it work fine on its own?
 
For Regenerator, do we need to re-insert the routine if we're using your ROMbase and fixed Natural Cure with the byte changes, or should it work fine on its own?

The byte changes actually re-insert the routine for you. The implementation was broken, so the byte changes make it reflect this new routine.

Fur coat/multiscale still break the battle system (even if the ability is not in the battle), and noguard doesn't work for me

Fur Coat and Multiscale definitely work 100% as intended, no breaking at all.
I fixed No Guard, basically I put a ldr, instead of ldrb, for the bank check, it definitely works now.

Mold Breaker, Teravolt and Turboblaze

Spoiler:
 
Last edited:
Mold Breaker

Kudos for porting this! Saves me a lot of time.
Just 2 corrections need to be done.
1. In Routine I: .Return2: .word 0x08046072 should be +1
2. In routine IV the instruction should be:
At 4B67C: 00 48 00 47 XX+1 XX XX 08. (in FR I replaced the 'end' command with the ASM. But the Emerald's 'end' BS command uses a special BL (probably for battle frontier purposes) which is not the case in FR, so performing a branch in the 'end' code with this routine is the way to go.)

Also a fun fact. The '09' present at start the Battle Script of Routine 3 executes the Roar, Whirlwind animation.
Their battle scripts do not use the 'moveanimation' command directly but their animation is executed by this script reached via the 'forceswitch' command.
And this why the move animation for 'dragon tail' plays twice (the first reference to the move animation from the main battle script + the second reference this script).
So move id checks can be placed so that the second reference is skipped for moves like 'dragon tail' or 'circle throw'.
 
Kudos for porting this! Saves me a lot of time.
Just 2 corrections need to be done.
1. In Routine I: .Return2: .word 0x08046072 should be +1
2. In routine IV the instruction should be:
At 4B67C: 00 48 00 47 XX+1 XX XX 08. (in FR I replaced the 'end' command with the ASM. But the Emerald's 'end' BS command uses a special BL (probably for battle frontier purposes) which is not the case in FR, so performing a branch in the 'end' code with this routine is the way to go.)

Also a fun fact. The '09' present at start the Battle Script of Routine 3 executes the Roar, Whirlwind animation.
Their battle scripts do not use the 'moveanimation' command directly but their animation is executed by this script reached via the 'forceswitch' command.
And this why the move animation for 'dragon tail' plays twice (the first reference to the move animation from the main battle script + the second reference this script).
So move id checks can be placed so that the second reference is skipped for moves like 'dragon tail' or 'circle throw'.

All fixed! Thanks KDS. Also that note about the roar animation is fantastic, i'll definitely remember it. To be honest rather than having the animation play once, it'd be best to play the move animation, and then at the 09 command, play the whirlwind animation.

You may also have noticed that I optimised the ability checks a tad, just shifts exactly what registers get put in where, saving on a few command cycles (no need to mov #0x58 a second time for example), you may want to consider doing those for FR too, just to save on the tiny bit of free space. No biggy though, fantastic code.

To be honest I'm also thinking of expanding your Routine 1, to include Protean because that'd probably be the best place for it. Thoughts? I'm just unsure of whether Protean would also need to be included in Routine 2.

I'm also going to reserve this post for porting your Unaware / Magic Bounce Code. Maybe a few other ones from my own rombase that I've got ready.
 
All fixed! Thanks KDS. Also that note about the roar animation is fantastic, i'll definitely remember it. To be honest rather than having the animation play once, it'd be best to play the move animation, and then at the 09 command, play the whirlwind animation.

You may also have noticed that I optimised the ability checks a tad, just shifts exactly what registers get put in where, saving on a few command cycles (no need to mov #0x58 a second time for example), you may want to consider doing those for FR too, just to save on the tiny bit of free space. No biggy though, fantastic code.

To be honest I'm also thinking of expanding your Routine 1, to include Protean because that'd probably be the best place for it. Thoughts? I'm just unsure of whether Protean would also need to be included in Routine 2.

I'm also going to reserve this post for porting your Unaware / Magic Bounce Code. Maybe a few other ones from my own rombase that I've got ready.

1. That is a superb idea.

2. I'll def look into it. Also correcting my grammar in that post.

3. It looks the best place. But before implementing this I suggest reading the Bulbapedia article regarding Protean. A very detailed explanation is given for it.

4. Regarding Unaware. The Emerald code will require 6 routines instead of 4. This is because of the different way Doesn't and Tailes made the DPSS for Fire Red and Emerald respectively. The accuaracy ones can be ported but different routines for attack, defense, special attack and special defense have to be coded from scratch.
 
1. That is a superb idea.

2. I'll def look into it. Also correcting my grammar in that post.

3. It looks the best place. But before implementing this I suggest reading the Bulbapedia article regarding Protean. A very detailed explanation is given for it.

4. Regarding Unaware. The Emerald code will require 6 routines instead of 4. This is because of the different way Doesn't and Tailes made the DPSS for Fire Red and Emerald respectively. The accuaracy ones can be ported but different routines for attack, defense, special attack and special defense have to be coded from scratch.

Ah damn that's annoying. I was using Doesn't PSS split for Emerald as far as I can tell, it's the one on the thread anyway. It seemed basically the same as the Fire Red one from what I could tell. Worth looking into then.

Protean should probably go into the Attack Canceler routine then, having looked at it on Bulbapedia.
 
The byte changes actually re-insert the routine for you. The implementation was broken, so the byte changes make it reflect this new routine.



Fur Coat and Multiscale definitely work 100% as intended, no breaking at all.
I fixed No Guard, basically I put a ldr, instead of ldrb, for the bank check, it definitely works now.

Mold Breaker, Teravolt and Turboblaze

Spoiler:

Yep they do works with the new code, thank's, and nice porting, will try it
 

Expanding Ability Names Data and Ability Descriptions Pointer Table

I think this should be here so I don't need to make a new thread with a very simple tutorial. Alright! I'm going to tell you how to expand Ability tables (the Names and the Descriptions). I'm using HxD here as a HEX Editor.

Legend:
  • Green bolded text are for Emerald.
  • Red bolded text are for FireRed.

Step 1: Ability Names

  • Go to a new free space names (example: 0x720000). Select 3328 (0xD00 in HEX) bytes. Fill the bytes with AE AE AE AE AE AE AE FF 00 00 00 00 00.
  • Go to 31B6DB or 24FC40. Select and copy 1014 (0x3F6 in HEX) bytes.
  • Go to the offset of your names data (which the example is 0x720000) and paste the data there.
  • Replace all DB B6 31 08 or 40 FC 24 08 with the "reversed hex in little indian of your new names data offset with 08 at the end" (example: 00 00 72 08)

Step 2: Ability Descriptions

  • Go to a new free space descriptions (example: 0x720D00). Select 1024 (0x400 in HEX) bytes. Fill the bytes with 98 AF 31 08 or C4 F3 24 08.
  • Go to 31BAD4 or 24FB08. Select and copy 312 (0x138 in HEX) bytes.
  • Go to the offset of your description table (which the example is 0x720D00) and paste the data there.
  • Replace all D4 BA 31 08 or 08 FB 24 08 with the "reversed hex in little indian of your new description data offset with 08 at the end" (example: 00 0D 72 08)

Then, change your .ini-s. Replace the old offsets in the .ini with your new data (they should be at where the Ability Names and Ability Descriptions are). Luckily, these don't have limiter stuff at all.

With the expanded data, the new data should be working. I have made this tutorial to have maximized the slots to 256 abilities (255 usable abilities plus one for the none "-----" slot). Now you have 178 new slots for Generation IV+ abilities. Noted that the game can only support up to 256 abilities. The rest of the tutorial on how to insert ability routines are on the first post of this thread since inserting ability routines are now complicated. I hope this post is to be linked up in the Extra Information of this thread so everyone can expand stuff too.
can you create a tutorial for pokemon ruby RaileysXerilyasRX?
 
Mold Breaker, Turboblaze, and Teravolt

Nice that you have worked on this but my assembler caught up many errors (such as the .DisabledAbilities and .DisabledAbility part and more errors that mostly on the last routine as well) Better check and correct those.

Even I made the possible corrections personally, there is a bug though which after beating a Pokemon, the game freezes. I guarantee that my bs loader, callasm, and setword impelementation are correct 'cause my implementation of Moxie works. I dunno what's wrong then but I will wait for your official corrections to be done and reinsert Mold Breaker again.
 
Nice that you have worked on this but my assembler caught up many errors (such as the .DisabledAbilities and .DisabledAbility part and more errors that mostly on the last routine as well) Better check and correct those.

Even I made the possible corrections personally, there is a bug though which after beating a Pokemon, the game freezes. I guarantee that my bs loader, callasm, and setword impelementation are correct 'cause my implementation of Moxie works. I dunno what's wrong then but I will wait for your official corrections to be done and reinsert Mold Breaker again.

1. In the first three routines, the third line should be ldrb r0, [r0] instead of ldr r0, [r0]
2. The corrected last routine.
Spoiler:

Encountered these errors while porting these optimized routines back to FR.
 
1. In the first three routines, the third line should be ldrb r0, [r0] instead of ldr r0, [r0]
2. The corrected last routine.
Spoiler:

Encountered these errors while porting these optimized routines back to FR.

Thanks! You're awesome dude. I've finally got it working, But then... should it have the "<name> breaks the mold!" or "<name> is radiating a blazing aura!" or "<name> is radiating a bursting aura!" message displayed when someone with Moldbreaker/Turboblaze/Teravolt ability is sent out in battle? I think this is one thing I suggest for those abilities.
 
Thanks! You're awesome dude. I've finally got it working, But then... should it have the "<name> breaks the mold!" or "<name> is radiating a blazing aura!" or "<name> is radiating a bursting aura!" message displayed when someone with Moldbreaker/Turboblaze/Teravolt ability is sent out in battle? I think this is one thing I suggest for those abilities.

It is already covered in the new switch-in system in this thread. Just not has been ported to Emerald yet.
 
It's for Emerald btw

EDIT : Stupid mistake, thank's to touched. The only thing that remind undone is the "[buffer] transformed into [buffer] type !"
EDIT 2 : Thank's again Touched for help me to fix the displayed message. It works now perfectly :)

Protean table : How to create this one ? Simple, if you have 354 attack, you'll have to write 354 bytes with 00 or 01. 01 mean protean is affected by this attack, 00 means it is not.
For the TypeList1, TypeList2 and MoveData it's the same than tlachtli's routine

No. This isn't a good way to do it.

A) Protean doesn't change your type if you're frozen, asleep, etc. Not because a move doesn't affect it. All moves will change your type, which is why the BS method doesn't work as well, and why having a table is a bad idea.

As I explained before, the best location to put Protean is in the Attack Canceler routine. That way, if a move fails, you don't activate Protean, as opposed to having an incorrect table.
 
I can finally say it is completely done ! This is for Emerald : Implementation of Delta Stream/DesolateLand/Primordial Sea
Spoiler:

Thank a lot to MrDollSteak to pointing me how to handle a good part of this, thanks to daniilS for help me to fix some bugs, and thanks to Touched for being really patient with me.

Hope this could be useful to someone, if there's any problem or bugs PM me
 
Last edited:
I know that it is bad to double post, but the precedent was long enough I think, and those abilities are not tied with the precedent.

Implementation of Adaptability/Strong Jaw/Iron Fist/Though Claws/Mega Launcher/Sand Force for Emerald :
Spoiler:


I used the same location to hook than MrDollSteak's technician because it seemed to be appriopriate to me.
 
Last edited:
Triple post, it's getting worse, sorry for that :X Little update : Optimisation

I'm pretty proud of these. Full implementation of Bad Dreams and Poison Heal for Emerald :
Spoiler:
 
Last edited:
Restart, everything here is for Emerald : Implementation of Delta Stream/DesolateLand/Primordial Sea

Overall this is pretty good, but I reckon, rather than editing the moxie and regenerator routines, you should just have a check at the 'end' command of the battle script that checks if the Pokemon that activate Delta Stream is still active on the field, and if not making the weather stop.

I know that it is bad to double post, but the precedent was long enough I think, and those abilities are not tied with the precedent.

Implementation of Adaptability/Refrigirate/Pixilate/Aerilate/Strong Jaw/Iron Fist/Though Claws for


Won't be accepting this one as such for a few reasons.

I've already made all of them in a seperate location (apart from the type change ones)
and in a much longer routine. Basically the way I handled it was by putting ALL the abilities that multiply by an amount other than 1.5 in the same routine, as to not waste space.

That being said, Strong Jaw and Mega Launcher could totally go into the Technician Routine.

Also the Type Change abilities shouldn't go here (outside of the 1.3 boost), because there are lots of different damage calcs that factor in type, so the type change would need to go before all of them. IE. If you change a move to the Ice type here, it mighn't be affected by Thick Fat / Nevermeltice etc. etc.

Triple post, it's getting worse, sorry for that :X

I'm pretty proud of this one. Full implementation of Bad Dreams for Emerald :

This is really good thanks! I'll look into porting it to Fire Red / optimising it.
Did you just hook it from the Nightmare check?

ALSO as a general note Kleenex, you'll need to change ALL your ability indexes to match the ones listen in the OP. Also the message location should not be 203E3F0, but rather 203E320, as that's what I've used for every other ability.
 
Last edited:
Responses in bold.

I don't think you do need 2 battle scripts to be honest. Even if Rayquaza is first in battle it should activate. Look at how Drought etc. do it.
Clearing it on faint and switch seems fair enough, but I think there is probably a simpler way to do it. Fine for now though.

I don't want those abilities with Technician for the reason I mentioned. I'll upload my routine later for those abilities later.

Doing it with the status damage calculations makes quite a bit of sense. On that note of status damage, here are the routines I have!

Heatproof

Spoiler:
 
Last edited:
Let's implement Contrary for Emerald !

I think that all, please report any bug, or any problem to insert this (that are not already known)

To stop the animation playing multiple times look at the battlescripts for Dragon Dance, Cosmic Power etc. They only play one animation that changes colours depending on which stats it is raising. Because if say your attack is already maxed and it only raises speed, it will only do that colour. Same with Superpower.

Also I'd put all of your routine into a spoiler, and make the tables and routines a lot clearer (look at Moxie for Emerald) please try that format. It makes things so much more convenient.

Anyway, I've added Big Pecks here because it's a fairly short and easy ability to add.

Big Pecks

Spoiler:
 
Last edited:
Back
Top