• 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: Move Resource Thread

252
Posts
11
Years
    • Seen Jul 6, 2019
    So I made a battle script for Acrobatics (my very first one), and it works! Here's the code.
    (This is for Emerald by the way.)

    ASM at 0xAAAAAA:
    Code:
    .text
    .align 2
    .thumb
    .thumb_func
    
    CheckItem:
    push {r0-r4}
    ldr r1, BattleData
    ldr r0, CurPokeIndex
    ldrb r0, [r0]
    mov r2, #0x58
    mul r2, r0
    add r1, #0x2E
    add r1, r2
    ldrh r0, [r1]
    cmp r0, #0x0
    beq PowerUp
    b End
    
    PowerUp:
    ldr r3, Multiplier
    mov r4, #0x2
    strb r4, [r3]
    b End
    
    End:
    pop {r0-r4}
    bx lr
    
    .align 2
    BattleData:	.word 0x02024084
    CurPokeIndex:	.word 0x0202420B
    Multiplier:	.word 0x02024482

    Battle Script:
    Code:
    #dynamic 0x800000
    #freespace 0xFF
    
    #org @start
    attackcanceler
    accuracycheck 0x82D8A5E 0x0
    attackstring
    ppreduce
    callasm 0x8AAAAAA+1
    calculatedamage	
    attackanimation
    waitanimation
    missmessage
    cmd5c 0x0
    waitstate
    graphicalhpupdate 0x0
    datahpupdate 0x0
    critmessage
    waitmessage 0x40
    resultmessage
    waitmessage 0x40
    seteffectwithchancetarget
    goto 0x82D8A47

    Credits to Tlachtli, for the Emerald offsets.
    Also, thanks to ipatix, for helping me when I was having a bug with this.
     
    Last edited:
    5,256
    Posts
    16
    Years
  • Ominous Wind animation [FR]
    mU1PGvo.gif
    Spoiler:
     
    5,256
    Posts
    16
    Years
  • I made a more violent Flame Charge animation for FireRed:

    dbeuZ2R.gif

    Code:
    [FONT="Courier New"]00 2D 27 00 37 27 00 97 27 19 8F 00 C0 03 F9 A7 0B 08 0A 05 02 00 04 00 00 00 08 00 7F 02 03 F9 89 09 08 05 05 00 00 00 00 02 00 0F 00 01 00 02 38 74 3E 08 02 07 00 00 1C 00 10 02 1E 00 0D 00 32 00 00 00 04 02 02 38 74 3E 08 02 07 00 00 20 00 E0 01 14 00 10 00 D2 FF 00 00 04 02 02 38 74 3E 08 02 07 00 00 21 00 40 02 14 00 08 00 2A 00 00 00 04 02 02 38 74 3E 08 02 07 00 00 1F 00 90 01 19 00 0B 00 D6 FF 00 00 04 02 02 38 74 3E 08 02 07 00 00 1C 00 00 02 19 00 10 00 2E 00 00 00 04 02 02 38 74 3E 08 02 07 00 00 21 00 D0 01 1E 00 0F 00 CE FF 00 00 04 02 02 38 74 3E 08 02 07 00 00 1C 00 10 02 1E 00 0D 00 32 00 00 00 04 02 03 9D 94 09 08 05 07 00 00 E8 FF 08 00 17 00 0A 00 28 00 0A 00 04 23 02 3C 7B 3E 08 02 07 1F 00 03 00 01 00 00 00 0A 00 00 00 00 00 02 08 7C 3E 08 04 04 F6 FF 00 00 01 00 00 00 19 86 00 3F 04 01 02 9C 4E 3D 08 02 05 01 00 F0 FF 00 00 00 00 04 00 05 02 38 74 3E 08 02 07 00 00 20 00 E0 01 14 00 10 00 D2 FF 00 00 04 02 02 38 74 3E 08 02 07 00 00 21 00 40 02 14 00 08 00 2A 00 00 00 04 02 02 38 74 3E 08 02 07 00 00 1F 00 90 01 19 00 0B 00 D6 FF 00 00 04 02 02 38 74 3E 08 02 07 00 00 1C 00 00 02 19 00 10 00 2E 00 00 00 04 02 02 38 74 3E 08 02 07 00 00 21 00 D0 01 1E 00 0F 00 CE FF 00 00 03 D1 8C 09 08 02 05 01 00 04 00 00 00 0C 00 01 00 05 04 02 02 84 4E 3D 08 02 03 00 00 00 00 05 00 04 03 02 84 4E 3D 08 02 03 01 00 00 00 07 00 05 0B 03 0D 08 03 F9 A7 0B 08 0A 05 02 00 04 00 08 00 00 00 7F 02 05 08[/FONT]
     

    Trainer 781

    Guest
    0
    Posts
    I've finally gotten around to making U-turn and Volt Switch for Fire Red through Battle Script Pro, which has removed the bugs from the original code!

    U-Turn and Volt Switch

    Spoiler:

    You should not hook uturn to effect 127 at all, because effect 127 is hardcoded to pass stat boost changes, statuses like ingrain,cursed etc. Just like 125 is for defrosting.
    The script is mainly resonpsible for switching pokemon.

    I tested it in your rombase with a bulbasaur having u-turn and ingrain, it passed the ingrain status to pidgey using uturn. But when i changed the id of the script it did not pass ingrain. ;).
     
    Last edited:

    MrDollSteak

    Formerly known as 11bayerf1
    858
    Posts
    15
    Years
  • You should not hook uturn to effect 127 at all, because effect 127 is hardcoded to pass stat boost changes, statuses like ingrain,cursed etc. Just like 125 is for defrosting.
    The script is mainly resonpsible for switching pokemon.

    I tested it in your rombase with a bulbasaur having u-turn and ingrain, it passed the ingrain status to pidgey using uturn. But when i changed the id of the script it did not pass ingrain. ;).

    That's interesting! Thanks for that.
    The only reason I hooked it into there was so the AI knew how to use it.

    Though now with Knizz having found the AI ASM table, I may just hook it into a new effect slot and copy the 127 AI behaviour to that one. Cheers!
     

    looneyman1

    The Psycho Pokemon
    1,492
    Posts
    10
    Years
    • he/him
    • Seen yesterday
    Is there a means to make Hidden Power with a fixed base power of 60 in a third gen hack yet? It gets aggrivating to have to use an EV calculator over and over and over and over again to find how strong the move's base power will be in addition to type.
     

    destinedjagold

    You can contact me in PC's discord server...
    8,593
    Posts
    16
    Years
    • Seen Dec 23, 2023
    Effect: Flame Charge for Ruby. Haven't fully tested it yet, but it works anyway. :/
    Code:
    2E 21 4D 02 02 D1 28 14 6F 1D 08
     
    180
    Posts
    10
    Years
    • Seen Jan 10, 2017
    I thought the Heart Stamp in the OP was too long so I shortened it down a bit, for Emerald

    Heart Stamp

    Spoiler:


    Move Resource Thread

    Just a few things for the OP.
    *Cotton guard should be moved to Gen 4-6 Effects as the move is not in Gen III.
    *Payback and Switcheroo can use the effects of Revenge and Trick (unless I'm missing something) so they should be moved to the list of moves that already have effects.
    *KDS Posted updated effect for Jump Kick and Hi Jump Kick that works really well. http://www.pokecommunity.com/showthread.php?p=8362802#8362802
    *I translated Quiver Dance and and Shell Smash to Emerald here: http://www.pokecommunity.com/showthread.php?p=8362737#8362737 but it's easy to miss.
     
    Last edited:

    MrDollSteak

    Formerly known as 11bayerf1
    858
    Posts
    15
    Years
  • Just a few things for the OP.
    *Payback and Switcheroo can use the effects of Revenge and Trick (unless I'm missing something)

    Payback is a litle different. It doubles in damage if it moves last. Not if its taken damage. This also activates if the user switches, or uses a status move.
     
    5,256
    Posts
    16
    Years
  • Does this effect take recoil damage into account?
    That's a good point, I'll have to look into that at some point.

    I thought the Heart Stamp in the OP was too long so I shortened it down a bit, for Emerald

    Heart Stamp

    Spoiler:




    Just a few things for the OP.
    *Cotton guard should be moved to Gen 4-6 Effects as the move is not in Gen III.
    *Payback and Switcheroo can use the effects of Revenge and Trick (unless I'm missing something) so they should be moved to the list of moves that already have effects.
    *KDS Posted updated effect for Jump Kick and Hi Jump Kick that works really well. http://www.pokecommunity.com/showthread.php?p=8362802#8362802
    *I translated Quiver Dance and and Shell Smash to Emerald here: http://www.pokecommunity.com/showthread.php?p=8362737#8362737 but it's easy to miss.
    I've made these changes and added that animation, thank you.
     

    destinedjagold

    You can contact me in PC's discord server...
    8,593
    Posts
    16
    Years
    • Seen Dec 23, 2023
    Effect: Play Rough for Ruby. Simply set the effect chance percentage to 10.
    Code:
    2E 21 4D 02 02 96 28 14 6F 1D 08
     

    destinedjagold

    You can contact me in PC's discord server...
    8,593
    Posts
    16
    Years
    • Seen Dec 23, 2023
    You can just use Aurora Beam's effect for Play Rough.

    Huh, the more I know. I never was lucky enough to lower a foe's Attack stat using Aurora Beam, so I just thought it has a low chance of either freezing or lowering the foe's speed, like normal Ice attacks. xD
     
    180
    Posts
    10
    Years
    • Seen Jan 10, 2017
    By the way, the following moves also require custom Effects: Boomburst, Bulldoze, Discharge, Lava Plume, Parabolic Charge, Petal Blizzard, Searing Shot, Sludge Wave and Surf (needs to be updated). They do not work properly with their current effect, as they are supposed to hit Both Foes AND the allied Pokemon similar to Earthquake.

    I have managed to make Surf work so it hits Ally + Target 1 + Target 2, the problem is that it does not recognise the ally's Water Absorb. I guess it's the same with Flash Fire and Volt Absorb when using Lava Plume and Discharge. Is there theoretically any way to get around this without using ASM?

    (I'll post the BSP when I get back home)

    #org @growth
    jumpifabilitypresent ABILITY_CLOUDNINE @workup
    jumpifabilitypresent ABILITY_AIRLOCK @workup
    jumpifhalfword B_& 0x2023F1C 0x60 @sunlight
    goto @workup

    Just tried your Growth/Work Up/Rototiller script and spotted a few bugs. First one was growth sharply increasing Att. And Sp. Att when not Sunny (I fixed this by adding the goto @workup in red), probably just a simple oversight in the code.

    Also, I got some problems with Rototiller, it seems to freeze directly after printing the second status message, just as it goes to @Return.

    Here is the Script I used. I've double checked it to make sure all Offsets are ok with the original Flower Shield Script. Everything is working fine except that last little part where it freezes :(

    FOR EMERALD

    Spoiler:
     
    Last edited:

    MrDollSteak

    Formerly known as 11bayerf1
    858
    Posts
    15
    Years
  • By the way, the following moves also require custom Effects: Boomburst, Bulldoze, Discharge, Lava Plume, Parabolic Charge, Petal Blizzard, Searing Shot, Sludge Wave and Surf (needs to be updated). They do not work properly with their current effect, as they are supposed to hit Both Foes AND the allied Pokemon similar to Earthquake.

    I have managed to make Surf work so it hits Ally + Target 1 + Target 2, the problem is that it does not recognise the ally's Water Absorb. I guess it's the same with Flash Fire and Volt Absorb when using Lava Plume and Discharge. Is there theoretically any way to get around this without using ASM?

    (I'll post the BSP when I get back home)



    Just tried your Growth/Work Up/Rototiller script and spotted a few bugs. First one was growth sharply increasing Att. And Sp. Att when not Sunny (I fixed this by adding the goto @workup in red), probably just a simple oversight in the code.

    Also, I got some problems with Rototiller, it seems to freeze directly after printing the second status message, just as it goes to @Return.

    Here is the Script I used. I've double checked it to make sure all Offsets are ok with the original Flower Shield Script. Everything is working fine except that last little part where it freezes :(

    FOR EMERALD

    Spoiler:

    Boomburst doesn't need a custom effect. Just use 147. The Dig hit I believe is tied to Earthquake's ID not the Move Script. But I can't guarantee. If that is the case just copy it.

    Thanks for spotting that with Growth. Rototiller works fine for me. I'll compare it against my BS to see if anything's different.
     

    MrDollSteak

    Formerly known as 11bayerf1
    858
    Posts
    15
    Years
  • Here are the updated Gyro Ball and Electro Ball effects.

    Fire Red
    Spoiler:


    Emerald
    Spoiler:


    Old Post: There's really no benefit to using this, but I'll just leave this here for interest's sake.
    Spoiler:
     
    Last edited:
    180
    Posts
    10
    Years
    • Seen Jan 10, 2017
    Heavy Slam for Fire Red.

    I've been trying to port your Heavy Slam to Emerald, but I can't get it to deal more than 40 Base Damage. I've made sure to change 0x24 to 0x20 and the RAM offsets work for Doesn'ts Stored Power and Punishment. 0xE is the byte that determines weight just as in Fire Red.

    Any ideas what could be going wrong? I tried to use Flail as script as well (which I guess is more optimized) and got the same result, 40 Damage no matter what weight I set on my test mon.

    Spoiler:

    Spoiler:
     
    Back
    Top