• 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

Lance32497

LanceKoijer of Pokemon_Addicts
792
Posts
9
Years
  • 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

    Can someone port it in FireRed?
     
    Last edited:

    MrDollSteak

    Formerly known as 11bayerf1
    858
    Posts
    15
    Years
  • Sorry for the long delay, but here are the Type Change Abilities! Credits to Kleenexfeu for the original routines, I've just optimised them and added Normalize.

    Normalize, Refrigerate, Pixilate and Aerilate

    Spoiler:
     
    Last edited:

    Trainer 781

    Guest
    0
    Posts
    Just updated Unaware here by merging the accuracy ones into a single, clear and concise routine as well as including the updated effect of Keen Eye and also accommodating the evasion drop due to the move Gravity.
     
    218
    Posts
    10
    Years
    • Seen Nov 12, 2021
    Sorry for the long delay, but here are the Type Change Abilities! Credits to Kleenexfeu for the original routines, I've just optimised them and added Normalize.

    Normalize, Refrigerate, Pixilate and Aerilate

    Spoiler:

    -ate aren't supposed to change the type of move like Judgment etc. So you check correctly that for the type, though you still give them a boost.
    You should first check changetype loc, anding it with 0x3F, because moves like weather ball still store a value, even if the type is note changed, like 0x80, once "anded" with 0x3F, it gives 0. If once anded it's equal to 0, you can change the type and then boost.

    Good catch for normalize, I didn't even paid attention to r10 x)

    You also have to check changetypeloc for normalize, because it doesn't affect judgment and such
     
    Last edited:

    MrDollSteak

    Formerly known as 11bayerf1
    858
    Posts
    15
    Years
  • -ate aren't supposed to change the type of move like Judgment etc. So you check correctly that for the type, though you still give them a boost.
    You should first check changetype loc, anding it with 0x3F, because moves like weather ball still store a value, even if the type is note changed, like 0x80, once "anded" with 0x3F, it gives 0. If once anded it's equal to 0, you can change the type and then boost.

    Good catch for normalize, I didn't even paid attention to r10 x)

    You also have to check changetypeloc for normalize, because it doesn't affect judgment and such


    Well actually Normalize doesn't need to check changetypeloc, because it only activates on not Normal moves, so if r10 is storing Normal for Judgment and Hidden Power it won't change.

    Good catch on the boost though, I'll swap the order around a little bit.
     

    Trainer 781

    Guest
    0
    Posts
    Parental Bond:-

    Fire Red:-
    Spoiler:
     
    Last edited:
    218
    Posts
    10
    Years
    • Seen Nov 12, 2021
    Parental Bond:-

    Fire Red:-
    Spoiler:

    This and the new items effect effect, + the good place for multitype, that's really awesome KDS, thanks for your work !

    Could we check the move effect instead of the move number ? Perhaps it'd be more practical.
     

    Trainer 781

    Guest
    0
    Posts
    This and the new items effect effect, + the good place for multitype, that's really awesome KDS, thanks for your work !

    Could we check the move effect instead of the move number ? Perhaps it'd be more practical.

    Thanks!
    Yes you can. Feel free to mod.
     

    pokefreak890

    The One that will make everything great
    853
    Posts
    9
    Years
    • Age 26
    • Seen May 18, 2023
    i have a request for you guys and i hope it isnt too big of a request can u guys code download for emerald that would be awesome
     
    457
    Posts
    10
    Years
    • Age 29
    • Seen Apr 9, 2024
    Normalize, Refrigerate, Pixilate and Aerilate

    Is that where I supposedly put the hook because the pointer to be placed is not 4-byte aligned.

    And there are few errors while compiling:
    - Two instances of Return. One is a branch and one is a pointer. I believe that the branch Return should be ReturnType.
    - Forgotten the . "dots" before the .align 2 of pointers (ChangeTypeLog and others)
    - and r2, #0x3F... "and" seriously? Maybe a typo of add I suppose?
     
    Last edited:
    218
    Posts
    10
    Years
    • Seen Nov 12, 2021
    Is that where I supposedly put the hook because the pointer to be placed is not 4-byte aligned.

    And there are few errors while compiling:
    - Two instances of Return. One is a branch and one is a pointer. I believe that the branch Return should be ReturnType.
    - Forgotten the . "dots" before the .align 2 of pointers (ChangeTypeLog and others)

    The alignement could be a problem indeed.

    I hooked at 08069614 because I used 0806960C for psystrike (and the same location can be used later for other move of that kind), could you slightly change your hook ?
    The dot before ChangeTypeLoc should be removed in the routine rather than added in the literal pool, as they are used for directive, using them for label/literal pool can be confusing.
    You could indeed rename the label "Return" to "ReturnType", and then change the instances of the label Return in the routine.
    I don't think "and r2, #0x3F" is allowed, at least with my assembler.
    Finally, you should check the change type loc before moving r0 into r10, as r10 is used several times later. Something like :
    ldr r1, ChangeTypeLoc
    ldr r1, [r1]

    stuffs

    bne Return
    mov r10, r0
    strb r0, [r1]
     
    Last edited:
    127
    Posts
    10
    Years
    • Age 37
    • Seen today
    The only link I found the Battle Script Editor is dead. Where can I download it?
     
    1,681
    Posts
    8
    Years
    • Age 24
    • Seen today
    This is a really cool resource.
    How do you link the battle scripts to the ASM?
    Or is the ASM linked to the Battle script?
     
    325
    Posts
    10
    Years
  • This is a really cool resource.
    How do you link the battle scripts to the ASM?
    Or is the ASM linked to the Battle script?
    There's a post by Jambo in the Quick Research and Development that has a 'callasm' command for his battle script editor. We also use hooks in whatever routine the ability checks /should/ be in. So that's how we get battle scripts to use custom ASM in the middle of it.

    Also, battle scripts are 'macro' ASM, so we can actually change what the commands do. So as you can see, literally everything in the game is ASM, a table, or a picture, but the battle scripts make things a lot shorter.
     
    1,681
    Posts
    8
    Years
    • Age 24
    • Seen today
    There's a post by Jambo in the Quick Research and Development that has a 'callasm' command for his battle script editor. We also use hooks in whatever routine the ability checks /should/ be in. So that's how we get battle scripts to use custom ASM in the middle of it.

    Also, battle scripts are 'macro' ASM, so we can actually change what the commands do. So as you can see, literally everything in the game is ASM, a table, or a picture, but the battle scripts make things a lot shorter.

    Thanks for the response!
    To the thread!
     

    pokefreak890

    The One that will make everything great
    853
    Posts
    9
    Years
    • Age 26
    • Seen May 18, 2023
    i have another request for abilites can u guys do ice body and magician for emerald?
     
    Back
    Top