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

[Script] Trying to make specific TM's function like HM's

9
Posts
3
Years
    • Seen Aug 12, 2022
    So, I have a question:
    Is there a way to make a specific TM to function like an HM? For example:
    I want the TM 'RAZOR BLADE' to function like the HM 'CUT'. But like, in everything.
    I want it to trigger when I interact with cuttable trees, I want it to actually cut the tree
    and I want it to show on the POKEMON menu, like 'CUT', but under the name 'RAZOR BLADE'
    And also, I dont want it to replace 'CUT', I want it to be an Additional feature

    My goal is to make a functional TM system, like if its logical - it can happen: 'SLASH' can cut, 'EARTHQUAKE' can smash rocks, 'HEADBUTT' can move boulders. Stuff like that.

    Can it be done?
     
    392
    Posts
    3
    Years
    • Seen Nov 24, 2023
    Yes it can be done. I think the tms and his data are stored very similarly. The out of battle is just the out of battle script that determines which move is out of battle.
     
    9
    Posts
    3
    Years
    • Seen Aug 12, 2022
    Yes it can be done. I think the tms and his data are stored very similarly. The out of battle is just the out of battle script that determines which move is out of battle.

    Awesome! Thank you for the answer. Sounds easy enough. Do you have an example? Or could you point me towards a tutorial or an explanation of the subject?
     
    392
    Posts
    3
    Years
    • Seen Nov 24, 2023
    Awesome! Thank you for the answer. Sounds easy enough. Do you have an example? Or could you point me towards a tutorial or an explanation of the subject?

    Cut's attack entry is 0xF:
    Here are the attacks:
    Spoiler:


    (Copied from XSE)
    Then in Advance-Map open up the map with cut and open the script in XSE. Or for Firered, the script offset is 1BDF13
    In the beginning of the script:
    #dynamic 0x80A698

    '---------------
    #org @start
    special 0x187
    compare LASTRESULT 0x2
    if 0x1 goto @snippet1
    lockall
    checkflag 0x821 'checks for the badge
    if 0x0 goto @snippet2 'If no badge
    checkattack 0xF
    compare LASTRESULT 0x6 'compares if you have it

    Change checkattack's ID to the corresponding attack ID of your attack, and recompile that script to your rom. Then replace all cut tree's offsets on a-map with your compiled offset
    In the line

    Sorry for not stating this step:
    bufferattack 0x1 0xF
    Change 0xF as well
     
    Last edited:
    Back
    Top