• 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

33
Posts
2
Years
    • Seen today
    I know this is from 2015, but I tested this and it did not work. Do I need something like the Physical/Special split?

    Code:
    @ at 01EA54 insert 00 49 08 47 XX+1 XX XX 08 00 00
    
    effectivnesscheck:
    ldrb r1, [r0, #0x0]
    mov r0, #0x8
    and r0, r1
    cmp r0, #0x0
    bne noteffective
    
    misscheck:
    mov r0, #0x31
    and r0, r1
    cmp r0, #0x0
    bne exit
    
    notveryeffectivecheck:
    mov r0, #0x4
    and r0, r1
    cmp r0, #0x0
    beq supereffectivecheck
    ldr r0, .userbank
    ldr r1, .battlestruct
    mov r2, #0x58
    ldrb r0, [r0]
    mul r2, r0
    add r1, r1, r2
    ldrb r1, [r1]
    cmp r1, #0xXX @Tinted Lens ID
    bne exit
    
    hastintedlens:
    ldr r0, .damage
    ldrh r1, [r0]
    lsl r1, r1, #0x1
    strh r1, [r0]
    b exit
    
    supereffectivecheck:
    mov r0, #0x2
    and r0, r1
    cmp r0, #0x0
    beq exit
    ldr r0, .targetbank
    ldr r4, .battlestruct
    mov r3, #0x58
    ldrb r0, [r0]
    mul r0, r3
    add r1, r0, r4
    ldrb r0, [r1]
    cmp r0, #0xXX @Filter ID
    beq hasfiltersolidrock
    cmp r0, #0xXX @Solid Rock ID
    bne exit
    hasfiltersolidrock:
    ldr r0, .damage
    ldrh r1, [r0]
    lsl r2, r1, #0x1
    add r1, r1, r2
    lsr r1, r1, #0x2
    cmp r1, #0x0
    bne notzero
    mov r1, #0x1
    
    notzero:
    strh r1, [r0]
    exit:
    ldr r1, =0x0801ea71
    bx r1
    
    noteffective:
    ldr r1, =0x0801ea5f
    bx r1
    
    .align 2
    .userbank:	.word 0x02023d6b
    .targetbank:	.word 0x02023d6c
    .battlestruct:	.word 0x02023c04
    .damage:	.word 0x02023d50

    Code:
    @ at 01EFAC insert 00 00 00 00 00 49 08 47 XX+1 XX XX 08
    
    strugglecheck:
    mov r1, r10
    cmp r1, #0xa5
    beq quit
    
    effectivnesscheck:
    ldrb r1, [r0, #0x0]
    mov r0, #0x39
    and r0, r1
    cmp r0, #0x0
    bne exit
    
    notveryeffectivecheck:
    mov r0, #0x4
    and r0, r1
    cmp r0, #0x0
    beq supereffectivecheck
    ldr r0, .userbank
    ldr r1, .battlestruct
    mov r2, #0x58
    ldrb r0, [r0]
    mul r2, r0
    add r1, r1, r2
    ldrb r1, [r1]
    cmp r1, #0xXX @Tinted Lens ID
    bne exit
    
    hastintedlens:
    ldr r0, .damage
    ldrh r1, [r0]
    lsl r1, r1, #0x1
    strh r1, [r0]
    b exit
    
    supereffectivecheck:
    mov r0, #0x2
    and r0, r1
    cmp r0, #0x0
    beq exit
    ldr r0, .targetbank
    ldr r4, .battlestruct
    mov r3, #0x58
    ldrb r0, [r0]
    mul r0, r3
    add r1, r0, r4
    ldrb r0, [r1]
    cmp r0, #0xXX @Filter ID
    beq hasfiltersolidrock
    cmp r0, #0xXX @Solid Rock ID
    bne exit
    hasfiltersolidrock:
    ldr r0, .damage
    ldrh r1, [r0]
    lsl r2, r1, #0x1
    add r1, r1, r2
    lsr r1, r1, #0x2
    cmp r1, #0x0
    bne notzero
    mov r1, #0x1
    
    notzero:
    strh r1, [r0]
    
    exit:
    mov r0, sp
    ldrb r0, [r0, #0x0]
    quit:
    add sp, #0x10
    pop {r3-r5}
    mov r8, r3
    mov r9, r4
    mov r10, r5
    pop {r4-r7}
    pop {r1}
    bx r1
    
    .align 2
    .userbank:	.word 0x02023d6b
    .targetbank:	.word 0x02023d6c
    .battlestruct:	.word 0x02023c04
    .damage:	.word 0x02023d50
     
    Last edited:
    135
    Posts
    4
    Years
    • Seen May 13, 2024
    Code:
    @ at 01EA54 insert 00 49 08 47 XX+1 XX XX 08 00 00
    
    effectivnesscheck:
    ldrb r1, [r0, #0x0]
    mov r0, #0x8
    and r0, r1
    cmp r0, #0x0
    bne noteffective
    
    misscheck:
    mov r0, #0x31
    and r0, r1
    cmp r0, #0x0
    bne exit
    
    notveryeffectivecheck:
    mov r0, #0x4
    and r0, r1
    cmp r0, #0x0
    beq supereffectivecheck
    ldr r0, .userbank
    ldr r1, .battlestruct
    mov r2, #0x58
    ldrb r0, [r0]
    mul r2, r0
    add r1, r1, r2
    ldrb r1, [r1]
    cmp r1, #0xXX @Tinted Lens ID
    bne exit
    
    hastintedlens:
    ldr r0, .damage
    ldrh r1, [r0]
    lsl r1, r1, #0x1
    strh r1, [r0]
    b exit
    
    supereffectivecheck:
    mov r0, #0x2
    and r0, r1
    cmp r0, #0x0
    beq exit
    ldr r0, .targetbank
    ldr r4, .battlestruct
    mov r3, #0x58
    ldrb r0, [r0]
    mul r0, r3
    add r1, r0, r4
    ldrb r0, [r1]
    cmp r0, #0xXX @Filter ID
    beq hasfiltersolidrock
    cmp r0, #0xXX @Solid Rock ID
    bne exit
    hasfiltersolidrock:
    ldr r0, .damage
    ldrh r1, [r0]
    lsl r2, r1, #0x1
    add r1, r1, r2
    lsr r1, r1, #0x2
    cmp r1, #0x0
    bne notzero
    mov r1, #0x1
    
    notzero:
    strh r1, [r0]
    exit:
    ldr r1, =0x0801ea71
    bx r1
    
    noteffective:
    ldr r1, =0x0801ea5f
    bx r1
    
    .align 2
    .userbank:	.word 0x02023d6b
    .targetbank:	.word 0x02023d6c
    .battlestruct:	.word 0x02023c04
    .damage:	.word 0x02023d50

    Code:
    @ at 01EFAC insert 00 00 00 00 00 49 08 47 XX+1 XX XX 08
    
    strugglecheck:
    mov r1, r10
    cmp r1, #0xa5
    beq quit
    
    effectivnesscheck:
    ldrb r1, [r0, #0x0]
    mov r0, #0x39
    and r0, r1
    cmp r0, #0x0
    bne exit
    
    notveryeffectivecheck:
    mov r0, #0x4
    and r0, r1
    cmp r0, #0x0
    beq supereffectivecheck
    ldr r0, .userbank
    ldr r1, .battlestruct
    mov r2, #0x58
    ldrb r0, [r0]
    mul r2, r0
    add r1, r1, r2
    ldrb r1, [r1]
    cmp r1, #0xXX @Tinted Lens ID
    bne exit
    
    hastintedlens:
    ldr r0, .damage
    ldrh r1, [r0]
    lsl r1, r1, #0x1
    strh r1, [r0]
    b exit
    
    supereffectivecheck:
    mov r0, #0x2
    and r0, r1
    cmp r0, #0x0
    beq exit
    ldr r0, .targetbank
    ldr r4, .battlestruct
    mov r3, #0x58
    ldrb r0, [r0]
    mul r0, r3
    add r1, r0, r4
    ldrb r0, [r1]
    cmp r0, #0xXX @Filter ID
    beq hasfiltersolidrock
    cmp r0, #0xXX @Solid Rock ID
    bne exit
    hasfiltersolidrock:
    ldr r0, .damage
    ldrh r1, [r0]
    lsl r2, r1, #0x1
    add r1, r1, r2
    lsr r1, r1, #0x2
    cmp r1, #0x0
    bne notzero
    mov r1, #0x1
    
    notzero:
    strh r1, [r0]
    
    exit:
    mov r0, sp
    ldrb r0, [r0, #0x0]
    quit:
    add sp, #0x10
    pop {r3-r5}
    mov r8, r3
    mov r9, r4
    mov r10, r5
    pop {r4-r7}
    pop {r1}
    bx r1
    
    .align 2
    .userbank:	.word 0x02023d6b
    .targetbank:	.word 0x02023d6c
    .battlestruct:	.word 0x02023c04
    .damage:	.word 0x02023d50

    Thanks for the response. I feel bad now, because it actually was working in the first place; I mixed up 2 numbers in one of the offsets I was supposed to put code in.
     

    Marinebeast

    violet phantom in disguise
    11
    Posts
    1
    Years
  • It looks like there's issues taken with the "modify wild Pokemon levels based on slot1 ability (pressure/intimidate/etc)" script, and refuses to compile since "CheckAbility" is defined twice. Attempting to remove the second "CheckAbility" makes the game crash when attempting to generate a wild encounter under the effect of specified abilities.
     
    Last edited:
    5
    Posts
    1
    Years
    • Seen Jun 30, 2023
    I know this post is old, but i found out the magic guard script for removing recoil damage just removed recoil from all moves in my case and not only for magic guard

    so i went and made updated version
    Spoiler:
     
    Last edited:
    5
    Posts
    1
    Years
    • Seen Jun 30, 2023
    Magic guard Routine with poison prevention caused poison to 1HIT KO any poisoned pokemon from the damage lmao i had a good laugh when i saw that, here is a fixed version (hopefully)

    Spoiler:
     
    Last edited:

    jmynes

    Jordank
    4
    Posts
    1
    Years
  • Am I doing something wrong? Whether I edit my hack, or vanilla Fire Red, I get a Bad Egg when I try to use the Magma Armour / Flame Body snippet.

    For this bit:
    /* Put 00 49 08 47 XX XX XX 08 at 0x46390 */

    I'm placing 00 49 08 47 10 00 A1

    And then for the snippet below, I'm inserting at A10000, using HMA (though I've also tried THUMB Editor & Assembler.

    Ability Resource Thread


    Out-Of-Battle Effects

    Flame Body
    Flame Body, Magma Armour and Steam Engine will halve the number of steps needed to hatch an egg if they are in the party.

    Spoiler:
     

    AkameTheBulbasaur

    Akame Marukawa of Iyotono
    409
    Posts
    10
    Years
  • Am I doing something wrong? Whether I edit my hack, or vanilla Fire Red, I get a Bad Egg when I try to use the Magma Armour / Flame Body snippet.

    For this bit:


    I'm placing 00 49 08 47 10 00 A1

    And then for the snippet below, I'm inserting at A10000, using HMA (though I've also tried THUMB Editor & Assembler.

    Ability Resource Thread

    I fixed the routine.

    I changed "add r0, r0, r4" to "mov r0, r4". It was supposed to be the second thing (it loads some code from the original function that we overwrote when we branched) but for some reason, I copied the original code wrong.

    Also, I fixed another bug. Turns out, I checked for Magma Armour twice and Flame Body zero times. One of the "cmp r1, #0x28" lines should be "cmp r1, #0x31" (0x28 is the index number for Magma Armour and 0x31 is the index number for Flame Body).

    This should work correctly now, hopefully.
     

    Battle Trainer 1823

    Guest
    0
    Posts
    Greetings, may I request a way to edit Pure Power, so it doubles Special Attack instead? Would help a lot of mons to reach better potential :'3
     
    1
    Posts
    2
    Years
    • Seen Feb 16, 2024
    Thank you! Also fixed.

    S-Bird requested I finally get around to doing the Type Absorb abilities, and so I have!
    I'll update this post once everything is done.

    Lightningrod, Motor Drive, Dry Skin, Storm Drain and Sap Sipper

    Spoiler:

    Does anyone here that uses HMA can help me with these routines? .-. I'm having a hard time with the Sp.Atk boost
     
    11
    Posts
    1
    Years
    • They/Them
    • Seen Nov 14, 2023
    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.

    I edited this ASM by kleenex to include Sharpness [EM]

    Sharpness Table:
    Spoiler:


    ASM:
    Spoiler:
    ]
     

    ZekroSlice

    Prince Zekro
    15
    Posts
    359
    Days
  • Can y'all help me ? I'm doing a Ruby hack and was wondering if anyone could help me with adding new abilities like this in my hack 🙏🏾
     
    11
    Posts
    1
    Years
    • They/Them
    • Seen Nov 14, 2023
    Hiya there aren't many abilities here available for Ruby, but you will need to know the basics to compiling an ASM into a bin. file.
     
    11
    Posts
    1
    Years
    • They/Them
    • Seen Nov 14, 2023
    I edited the routine of Overcoat/Bulletproof to include Dazzling and its variants, as well as Good as Gold.
    [EM]
    Spoiler:
     
    33
    Posts
    2
    Years
    • Seen today
    ABILITY POP-UP [FR]
    As you can see in the video, its a simply ability pop-up for binary, using the code for the battle lvl up banner as a base. But the image is still editable like other things bellow.
    * The pokemon's icon visibility and its position on the boxes are editable.
    * The box's position is editable.
    * There is two text align chosen on the ASM, Right or left align.

    First inserts the callasm command that can be found here: https://www.pokecommunity.com/threads/quick-research-development-thread.205158/post-7101031

    then, add the pointer for the asm bellow.

    All credits go to Blackuser.
    Spoiler:

    The asm is inserted into rom via .org and includes all GenIII abilities(i think don't loses any) and also has an update for Intimidate and Sturdy, and adds a mensage script to Levitate and Wonder Guard.

    I will don't give support for use this since it was writen a long ago, use it to your risk.
     
    Last edited:
    Back
    Top