• 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

Trainer 781

Guest
0
Posts
    Thank you.I find it.
    Now I have another problem.

    No1:About Prankster ability
    This link is about Prankster
    https://m.ign.com/wikis/pokemon-x-y/Prankster
    And I do not know how to make the move quick guard.Could you write a ASM code for EM

    And No2:How to change the weather ability round to 5 (like gen6)

    Lost problem:About the weather can not change when i need.

    When i need :D I can make some weather change move or ability failure.

    soory my English not good.:(

    Prankster is already done by MrDS (though it is not the thread yet).
    Regarding Quick Guard, this is an Ability Resource thread not a Move Resource Thread. Also, I'm not hacking actively now for some time since I'm busy. But I may consider doing Quick Guard later.

    I haven't researched weather abilities yet.
     

    MrDollSteak

    Formerly known as 11bayerf1
    858
    Posts
    15
    Years
  • Thank you.I find it.
    Now I have another problem.

    No1:About Prankster ability
    This link is about Prankster
    https://m.ign.com/wikis/pokemon-x-y/Prankster
    And I do not know how to make the move quick guard.Could you write a ASM code for EM

    And No2:How to change the weather ability round to 5 (like gen6)

    Lost problem:About the weather can not change when i need.

    When i need :D I can make some weather change move or ability failure.

    soory my English not good.:(

    As KDS said I'll be uploading Prankster shortly. I've sort of redone the Priority System to use a BL that is called for every Banked Pokemon (same as the Speed Calc).

    Again as KDS said, ask about Quick Guard in the Move Resource Thread.

    Weather Abilities are called at about 42A18 in Emerald, though I'm rewriting the check for Snow Warning, and Kleenexfeu'ss abilities. I believe the actual endless weather effect is done by the battle script, so it could just be a matter of editing it there to set only five turns.
     

    Trainer 781

    Guest
    0
    Posts
    I found the reason of the bug in the Damage Absorbing abilities.
    If your HP is full, you will not get the boosts. It is the HP check which is causing the problem.

    To disable HP check for non-HP restoring abilities, move #0x2 into r9 instead of #0x1 in their respective routines.
     
    Last edited:
    48
    Posts
    9
    Years
    • Seen May 15, 2024
    As KDS said I'll be uploading Prankster shortly. I've sort of redone the Priority System to use a BL that is called for every Banked Pokemon (same as the Speed Calc).

    Again as KDS said, ask about Quick Guard in the Move Resource Thread.

    Weather Abilities are called at about 42A18 in Emerald, though I'm rewriting the check for Snow Warning, and Kleenexfeu'ss abilities. I believe the actual endless weather effect is done by the battle script, so it could just be a matter of editing it there to set only five turns.

    It so nice:D I am waiting you are ASM code I need it
     
    457
    Posts
    10
    Years
    • Seen today
    I found the reason of the bug in the Damage Absorbing abilities.
    If your HP is full, you will not get the boosts. It is the HP check which is causing the problem.

    To disable HP check for non-HP restoring abilities, move #0x2 into r9 instead of #0x1 in their respective routines.

    Thanks! Lightningrod and the works fine now and I get the stat boosts, as well as the AI does. But another thing I've found out:

    If the combatants keep attacking that causes the ability to activate and when a certain stat maxed out, should it be sent to where the script where the and displaying the "User's Ability made Move's useless!" instead of "User's restored HP using its Ability!"? This also causes the AI to suddenly faint.

    And also string problems when I'm facing a wild one having these abilities. Sometimes when the AI gains stat due to these, the message error occurs sometimes the player's "User"'s name is displayed. When the wild's message, the name's blank.

    Also in Mold Breaker, when the Mold Breaker user is going to attack the opponent which has any of those Type Absorb Abilities, the game freezes after selecting a move.
     
    Last edited:

    MrDollSteak

    Formerly known as 11bayerf1
    858
    Posts
    15
    Years
  • Thanks! Lightningrod and the works fine now and I get the stat boosts, as well as the AI does. But another thing I've found out:

    If the combatants keep attacking that causes the ability to activate and when a certain stat maxed out, should it be sent to where the script where the and displaying the "User's Ability made Move's useless!" instead of "User's restored HP using its Ability!"? This also causes the AI to suddenly faint.

    And also string problems when I'm facing a wild one having these abilities. Sometimes when the AI gains stat due to these, the message error occurs sometimes the player's "User"'s name is displayed. When the wild's message, the name's blank.

    Also in Mold Breaker, when the Mold Breaker user is going to attack the opponent which has any of those Type Absorb Abilities, the game freezes after selecting a move.

    Hrm, okay thanks for finding those bugs. I must be pointing to the wrong place in the jumpifstatchange.

    I'm not sure about Mold Breaker, realistically the way its set up it'd have changed the ability to 00, so it shouldn't activate the table and should just jump away.

    EDIT: I've fixed the first bug! Still not entirely sure about Mold Breaker, I'll run some tests.
     
    Last edited:

    Trainer 781

    Guest
    0
    Posts
    Also in Mold Breaker, when the Mold Breaker user is going to attack the opponent which has any of those Type Absorb Abilities, the game freezes after selecting a move.

    The reason is that, Mold Breaker sets the target's ability to xFF and absorb table routine reads the last entry to branch to xFFFFFF. To fix this, in the Loop: label ,swap the order of these pair statements 'cmp r0, r1 beq Success' and 'cmp r1, xFF beq End'.
     
    794
    Posts
    10
    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:
    Your Magic Bounce routine works perfectly fine except one little thing. Instead of printing: "Pokemon's attack was bounced back by Magic Bounce" it says "Pokemon's attack was bounced back by X" where X is the attacking Pokmon's ability.

    EDIT:
    Tinted Lens, Solid Rock, Filter (+ Expert Belt)

    Spoiler:


    I have slightly updated Mold Breaker using MrDS's Emerald Ports for this routine. The old routines also work perfectly fine but the new one's are optimized and more understandable.

    I also tested these abilities and they change damage correctly however the messages "it's super effective" and "it's not very effective" no loner appear if you attack a pokemon with Solid Rock and Filter. And if a pokemon with Tinted Lens attacks you with a not very effective move the message will not appear neither.
     
    Last edited:

    Trainer 781

    Guest
    0
    Posts
    Your Magic Bounce routine works perfectly fine except one little thing. Instead of printing: "Pokemon's attack was bounced back by Magic Bounce" it says "Pokemon's attack was bounced back by X" where X is the attacking Pokmon's ability.

    EDIT:


    I also tested these abilities and they change damage correctly however the messages "it's super effective" and "it's not very effective" no loner appear if you attack a pokemon with Solid Rock and Filter. And if a pokemon with Tinted Lens attacks you with a not very effective move the message will not appear neither.

    I'll look into Magic Bounce. Just a matter of changing the string.

    Try testing Solid Rock etc. on a blank FR ROM. The messages did appear in my testing.
     
    794
    Posts
    10
    Years
  • I'll look into Magic Bounce. Just a matter of changing the string.

    Try testing Solid Rock etc. on a blank FR ROM. The messages did appear in my testing.

    Looks like you're right. Do you know, by any chance, why the message wouldn't show up in Mr.DollSteak's Patch? Maybe it's because these abilities were present in the rombase in the first place and now they're called two times?
     

    Trainer 781

    Guest
    0
    Posts
    Looks like you're right. Do you know, by any chance, why the message wouldn't show up in Mr.DollSteak's Patch? Maybe it's because these abilities were present in the rombase in the first place and now they're called two times?

    Looks like this is the case.
     

    MrDollSteak

    Formerly known as 11bayerf1
    858
    Posts
    15
    Years
  • The reason is that, Mold Breaker sets the target's ability to xFF and absorb table routine reads the last entry to branch to xFFFFFF. To fix this, in the Loop: label ,swap the order of these pair statements 'cmp r0, r1 beq Success' and 'cmp r1, xFF beq End'.

    All fixed!

    I've actually made Simple now! I'll also update this post to include Contrary in the future!

    Simple

    Spoiler:
     
    Last edited:
    218
    Posts
    10
    Years
    • Seen Nov 12, 2021
    All fixed! Just try the routines now and they'll work. Kleenex was right with all of them except Heatproof.

    I'm reserving this spot for Magic Guard. Although there are already a few Magic Guard routines I'll try and link them all in this post. This is where things start getting annoying as more and more abilities need to be hooked in multiple places with multiple other routines.

    Magic Guard

    Spoiler:


    Overcoat and Bulletproof

    Spoiler:

    For magic guard : You can prevent recoil (maybe crash too) by hooking at the same place I used for Contrary in the second routine. For the recoil/eventual crash effect, if the pokemon has magic guard ability and the said effect is used, set the byte 02024335 (in emerald) to 0
     

    Trainer 781

    Guest
    0
    Posts
    For magic guard : You can prevent recoil (maybe crash too) by hooking at the same place I used for Contrary in the second routine. For the recoil/eventual crash effect, if the pokemon has magic guard ability and the said effect is used, set the byte 02024335 (in emerald) to 0

    Alternatively, you can directly go to recoil routine specified by the table at x48F88 (Emerald). You can also make proper Head Smash there (By adding a Move ID check).

    The crash damage can be handled by pure Battle Scripting.

    Magic Guard

    Overcoat and Bulletproof

    You can also expand Overcoat to emulate Grass Type's immunity to Powder Moves.
    Nevermind, it is already covered in the Veil Abilities.

    Though you will need to edit the Battle Scripts in the Veil Abilities to enable Sap Sipper Grass Types getting Stat Boosts from Grass-type powder moves like Stun Spore, Spore, Sleep Powder and Cotton Spore.

    The Effect Spore Routine can be expanded to accommodate Grass-types though.
     
    Last edited:

    MrDollSteak

    Formerly known as 11bayerf1
    858
    Posts
    15
    Years
  • Alternatively, you can directly go to recoil routine specified by the table at x48F88 (Emerald). You can also make proper Head Smash there (By adding a Move ID check).

    The crash damage can be handled by pure Battle Scripting.


    You can also expand Overcoat to emulate Grass Type's immunity to Powder Moves.
    Nevermind, it should be done elsewhere.

    Yeah actually I might do what you suggest and just make another check at 49390.
    See what annoys me is, is that Struggle sets Recoil damage to 1/2, but it seems to be hardcoded elsewhere as well, so it doesn't work with Head Smash, so I'll do that too.

    Powder moves I've just handled in the battle scripts. The only one that really needs ASM is Overcoat users and Grass-type users ignoring Rage Powder. But that also means that Rage Powder needs to set something different to Follow Me (but only slightly).

    I'm reserving this post to upload some of my end of turn abilities up here.
     

    Exodrake

    The Manliest Chick that Ever Manlied
    163
    Posts
    11
    Years
    • Seen Nov 30, 2016
    I'm having an issue with Simple. After implementing it, the ability itself works perfectly fine but when something which doesn't have simple has its stats modified, the game freezes if the stats are modified by one stage and resets when modified by two stages. The issue seems to be that it cannot display the text strings anymore.
     
    180
    Posts
    10
    Years
    • Seen Jan 10, 2017
    Just noticed that Keen Eye should also be added as an ability that has changed effect since Gen III.

    Also, in the OP it says that Oblivious is updated but I can't find the update for it. The link leads to Leaf Guard/Aroma Veil etc.
     

    Trainer 781

    Guest
    0
    Posts
    Just noticed that Keen Eye should also be added as an ability that has changed effect since Gen III.

    Also, in the OP it says that Oblivious is updated but I can't find the update for it. The link leads to Leaf Guard/Aroma Veil etc.

    It is in the Taunt Battle Script.
     
    794
    Posts
    10
    Years
  • 1. Mold Breaker, Teravolt and Turboblaze:
    Spoiler:

    Replacing the end command with the pointer to fourth routine freezes my game. Now, I have Life Orb routine inserted but I don't think it matters since we're replacing the end command anyway. Also look at the bottom of 4th routine, there seems to be some leftovers of code(bolded text). Also, is asm3 necessary or can I just ignore it?
     

    Trainer 781

    Guest
    0
    Posts
    Replacing the end command with the pointer to fourth routine freezes my game. Now, I have Life Orb routine inserted but I don't think it matters since we're replacing the end command anyway. Also look at the bottom of 4th routine, there seems to be some leftovers of code(bolded text). Also, is asm3 necessary or can I just ignore it?

    You can remove these bolded lines.
    Asm 3 is for that situation when you have Spikes set up for the opposing team and if using the move Roar to brings out a Levitate Pokemon then it is damaged by Spiked. Thr routines 1,2 and 3 are independent of each other though i.e. do not require insertion of one or the other.
     
    Back
    Top