• 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.

[Script✓] Emerald - Use HMs without teaching them

McPaul

On my way to become a controversial and hated memb
  • 289
    Posts
    7
    Years
    Hello!

    I'm currently trying to hack Pokémon Emerald. As I'm a beginner, it's more a succession of tests than a real project.

    What I want to do is to make a Pokémon able to use the HMs it can potentially learn on the field without actually knowing them.

    I think when you select a Pokémon in your party or when you click A before a tree/water/boulder/etc. it checks if a Pokémon learned the move.

    Instead, I want the check to be if the Pokémon CAN learn the field move instead of actually knowing it.

    For example, Nincada can learn Cut, Flash, Dig and Secret Power. If I have a Nincada in my team, when I select it, Cut, Dig, Flash and Secret power should appear and when I'm in front of a Cut Tree or a Secret Base and click A, should be able to use the moves.

    My English is not perfect so I hope you understood and that someone could help me find a path to what I desire.

    Thank you very much.
     
    Last edited:
    Last edited:
    Here are the HM script offsets if it helps you out:

    Cut: 2906BB
    Surf: 271EA0
    Strength: 2908BA
    Rock Smash: 2907A6
    Waterfall: 290A49
    Dive: 290B0F
    Resurfacing from Dive: 290B5A

    Fly & Flash are a bit different since they're called exclusively from the party menu rather than the overworld x
     
    Thank you very much it helps a lot!

    I'll eventually create a tutorial for item-HMs and I'll credit you of course!

    Now I'll have to find how to cut the HM animation where the party-Pokémon appears and how to make my Charizard-item able to fly. I'll completely erase Flash from my game and there won't be dark places.
     
    Well, I have trouble with the SURF script. I modified the script the same way as the others, but when I click a in front of water nothing happens unless I have a Pokémon with SURF in my party (although I removed the checkattack and bufferpartypokemon)

    Here is my script:

    '---------------
    #org 0x271EA0
    checkitem 0x15F 0x1
    compare 0x800D 0x6
    if 0x1 goto 0x8271ED6
    bufferitem 0x0 0x15F
    lockall
    msgbox 0x8272FD6 0x5 '"The water is dyed a deep blue[.]\n..."
    compare 0x800D 0x0
    if 0x1 goto 0x8271ED5
    msgbox 0x827300D 0x4 '"[player] used [buffer1]!"
    doanimation 0x9
    releaseall
    end

    '---------------
    #org 0x271ED6
    end

    '---------------
    #org 0x271ED5
    releaseall
    end


    '---------
    ' Strings
    '---------
    #org 0x272FD6
    = The water is dyed a deep blue[.]\nWould you like to SWIM?

    #org 0x27300D
    = [player] used [buffer1]!


    And the original script:

    '---------------
    #org 0x271EA0
    checkattack 0x39
    compare 0x800D 0x6
    if 0x1 goto 0x8271ED6
    bufferpartypokemon 0x0 0x800D
    setanimation 0x0 0x800D
    lockall
    msgbox 0x8272FD6 0x5 '"The water is dyed a deep blue[.]\n..."
    compare 0x800D 0x0
    if 0x1 goto 0x8271ED5
    msgbox 0x827300D 0x4 '"[buffer1] used SURF!"
    doanimation 0x9
    releaseall
    end

    '---------------
    #org 0x271ED6
    end

    '---------------
    #org 0x271ED5
    releaseall
    end


    '---------
    ' Strings
    '---------
    #org 0x272FD6
    = The water is dyed a deep blue[.]\nWould you like to SURF?

    #org 0x27300D
    = [buffer1] used SURF!


    What did I do wrong? And where on earth can I find the scripts of the field moves in the party menu?
     
    Last edited:
    What did I do wrong? And where on earth can I find the scripts of the field moves in the party menu?

    You might want to take a look at my HM type-check hack. It's for FireRed, but it's very similar to what you're doing. In particular, if you're looking for the HM scripts, they're all in that post (except Dive as it doesn't exist in FireRed).
     
    Neat. That's all I got to say for now
     
    Back
    Top