• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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

Code:
FB 20 E3 03 02 SS SS SS 08
have you changed the FB to FA here?

The code for Fire Red has it as FA to start,

That segment of code as it is in my ROM:
Code:
FA 20 C0 03 02 90 50 77 08
 
The code for Fire Red has it as FA to start,

That segment of code as it is in my ROM:
Code:
FA 20 C0 03 02 90 50 77 08

Oops, my bad. The issue must be setword command not being set up properly if you are getting the animation to play properly. Try to redo the steps from scratch.
 
Oops, my bad. The issue must be setword command not being set up properly if you are getting the animation to play properly. Try to redo the steps from scratch.

Started from back-up before adding the one new ability, battle string loader, and setword; after re-implementing all of them it was the same result.

The changes made so far are: Doesn't's 1.6 PSS, repointed attack everything and added 1 new attack, Repointed BS command table, added callasm to F8, First Side Routine Rewrite. Could any of that cause a problem?

Either way gonna try straight from a clean FR now and add only the ability, repoint the BSC table and add F8 Callasm, FA Setword, and Battle String Loader.

Edit: From clean FR start after KOing a pokemon the animation for attack up plays then the message displayed is the Rival's "WHAT? Unbelievable! I Picked the wrong pokemon!" RAM offset issue for one of the things?
 
Last edited:
Started from back-up before adding the one new ability, battle string loader, and setword; after re-implementing all of them it was the same result.

The changes made so far are: Doesn't's 1.6 PSS, repointed attack everything and added 1 new attack, Repointed BS command table, added callasm to F8, First Side Routine Rewrite. Could any of that cause a problem?

Either way gonna try straight from a clean FR now and add only the ability, repoint the BSC table and add F8 Callasm, FA Setword, and Battle String Loader.

Edit: From clean FR start after KOing a pokemon the animation for attack up plays then the message displayed is the Rival's "WHAT? Unbelievable! I Picked the wrong pokemon!" RAM offset issue for one of the things?

Check the contents of 0x203C020 in the VBA memory viewer at the time of message display.
 
Check the contents of 0x203C020 in the VBA memory viewer at the time of message display.

All 0s anywhere near it. That section isn't having anything stored there at all while doing anything in the game.

Instead it seems to be loading from 0x202298C. Can advance frame by frame until it loads the Rival message then manually replace the contents with the bytes for the string and it prints "WO's Moxie Raised its attack!"

I have no idea why it isn't using 0x203C020..

Edit: while viewing the memory in VBA at 0x2023D74 it seems to have a pointer to what is currently happening in battle, when it lands on the FA in the Moxie script it jumps to the next byte after SS SS SS 08. Is it skipping the 20 C0 03 02 then?
 
Last edited:
All 0s anywhere near it. That section isn't having anything stored there at all while doing anything in the game.

Instead it seems to be loading from 0x202298C. Can advance frame by frame until it loads the Rival message then manually replace the contents with the bytes for the string and it prints "WO's Moxie Raised its attack!"

I have no idea why it isn't using 0x203C020..

Edit: while viewing the memory in VBA at 0x2023D74 it seems to have a pointer to what is currently happening in battle, when it lands on the FA in the Moxie script it jumps to the next byte after SS SS SS 08. Is it skipping the 20 C0 03 02 then?

If set word is not working then you can try:
2E 20 C0 03 02 SS
2E 21 C0 03 02 SS
2E 22 C0 03 02 SS
2E 23 C0 03 02 08

instead of
FA 20 C0 03 02 SS SS 08
 
If set word is not working then you can try:
2E 20 C0 03 02 SS
2E 21 C0 03 02 SS
2E 22 C0 03 02 SS
2E 23 C0 03 02 08

instead of
FA 20 C0 03 02 SS SS 08

Yup, that worked just fine. Still, I wish it would work the way it's supposed to but I can't figure out what could have gone wrong with the Setword command.
I used the compiled asm you posted on page 3 when someone else was having trouble with it; couldn't find it posted anywhere else other than there.

Was there anything else that needed to be changed other than inserting the compiled asm in free space and adding a pointer to it in the battle script commands table?
 
Yup, that worked just fine. Still, I wish it would work the way it's supposed to but I can't figure out what could have gone wrong with the Setword command.
I used the compiled asm you posted on page 3 when someone else was having trouble with it; couldn't find it posted anywhere else other than there.

Was there anything else that needed to be changed other than inserting the compiled asm in free space and adding a pointer to it in the battle script commands table?

I don't think so. I think the hex dump I uploaded might not be correct. You can try ripping setword from MrDS' rombase.
 
I don't think so. I think the hex dump I uploaded might not be correct. You can try ripping setword from MrDS' rombase.

The one in MrDS is literally the exact same as what you posted, but I tried it anyway and it worked... I don't even... Thanks for all the help KDS, hope it wasn't too much of a bother. Gonna do it from scratch one more time to be sure but it will probably work.
 
I rewrote Mr. DS's Multiscale and Fur Coat code, to incorporate Shadow Shield and Fluffy as well. Thanks to KDS for helping me out with this. Replace the bolded code with the proper ability IDs.
Fire Red
Spoiler:
 
Can you post your routine for Imposter that you have in your Emerald base so it can be ported to Firered? Please?

Well, it isn't in asm. It is in C and cannot be extracted out separately becoz it is linked with other parts of the engine code.
 
Can someone explain what any of this is... this is why I don't mess with this stuff. I'm not a computer geek, I don't understand what this stuff is :(
 
Can someone explain what any of this is... this is why I don't mess with this stuff. I'm not a computer geek, I don't understand what this stuff is :(
basically the lot of this is assembly, a very basic computer coding language. what is done when adding abilities is editing the battle engine (the code that makes battles what you see on the screen and otherwise) to branch off from the original code so we can insert our code, which has our desired effects covered in it; halving the power will branch off from the damage calulator, halving defense would also do so, an ability to make hail start would branch off at the battle's first steps, etc.
 
So, related to Desolate Land, Deltra Stream and Primordial Sea, I see that Drought, Air Lock and Drizzle makes almost the "same" effect. So is it possible to make it work like those? How do I do that? (I mean like redirect some pointer and make both Desolate Land and Drought works the same way).
 
It is easily portable to FR, I'll update soon. It's just I never use FR so every time I do a routine I'm too lazy to seek for FR offset. But if someone ask I guess I can make an effort

I have also the -ate abilities done :
Spoiler:

What is the hex form of that?
 
Hi ! I have a question about abilities. Let's suppose that i create a new ability(i name it Test for example) thanks to ASM. How can i do to associate with Test its effect ?
(sorry if there are grammar/syntax mistakes, i'm not an english native)
 
Last edited:
Hi ! I have a question about abilities. Let's suppose that i create a new ability(i name it Test for example) thanks to ASM. How can i do to associate with Test its effect ?
(sorry if there are grammar/syntax mistakes, i'm not an english native)
the asm covers everything for you; abilities are actually done by a check for the ability in the battle engine (i.e. the damage calculator) which then modifies the result until that point (to continue with the example, halving the attack or something)
 
Thank you for your answer. I have another question about battle scripting this time. I saw there is a battle script editor, but it can be only used for a fire red ROM. How can i do to use battle script into emerald if i need it ? Is there an alternative ?
 
Back
Top