The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script Trying to make specific TM's function like HM's

Notices
For all updates, view the main page.

Binary ROM Hacking Need a helping hand or just want to talk about binary ROM hacks? Get comments and answers to any ROM Hacking-related problems, questions or thoughts you have here.

Ad Content
Reply
 
Thread Tools
  #1   Link to this post, but load the entire thread.  
Old November 16th, 2020 (12:18 PM).
Fatlip_A Fatlip_A is offline
 
Join Date: Nov 2020
Posts: 9
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?
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old November 16th, 2020 (8:10 PM).
Mason Shu Mason Shu is offline
 
Join Date: Jun 2020
Gender: Male
Posts: 387
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.
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old November 16th, 2020 (9:04 PM).
Fatlip_A Fatlip_A is offline
 
Join Date: Nov 2020
Posts: 9
Quote:
Originally Posted by MASON SHU View Post
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?
Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old November 16th, 2020 (9:23 PM). Edited November 17th, 2020 by Mason Shu.
Mason Shu Mason Shu is offline
 
Join Date: Jun 2020
Gender: Male
Posts: 387
Quote:
Originally Posted by Fatlip_A View Post
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:
#define ATK_NONE 0x0
#define ATK_POUND 0x1
#define ATK_KARATECHOP 0x2
#define ATK_DOUBLESLAP 0x3
#define ATK_COMETPUNCH 0x4
#define ATK_MEGAPUNCH 0x5
#define ATK_PAYDAY 0x6
#define ATK_FIREPUNCH 0x7
#define ATK_ICEPUNCH 0x8
#define ATK_THUNDERPUNCH 0x9
#define ATK_SCRATCH 0xA
#define ATK_VICEGRIP 0xB
#define ATK_GUILLOTINE 0xC
#define ATK_RAZORWIND 0xD
#define ATK_SWORDSDANCE 0xE
#define ATK_CUT 0xF
#define ATK_GUST 0x10
#define ATK_WINGATTACK 0x11
#define ATK_WHIRLWIND 0x12
#define ATK_FLY 0x13
#define ATK_BIND 0x14
#define ATK_SLAM 0x15
#define ATK_VINEWHIP 0x16
#define ATK_STOMP 0x17
#define ATK_DOUBLEKICK 0x18
#define ATK_MEGAKICK 0x19
#define ATK_JUMPKICK 0x1A
#define ATK_ROLLINGKICK 0x1B
#define ATK_SANDATTACK 0x1C
#define ATK_HEADBUTT 0x1D
#define ATK_HORNATTACK 0x1E
#define ATK_FURYATTACK 0x1F
#define ATK_HORNDRILL 0x20
#define ATK_TACKLE 0x21
#define ATK_BODYSLAM 0x22
#define ATK_WRAP 0x23
#define ATK_TAKEDOWN 0x24
#define ATK_THRASH 0x25
#define ATK_DOUBLEEDGE 0x26
#define ATK_TAILWHIP 0x27
#define ATK_POISONSTING 0x28
#define ATK_TWINEEDLE 0x29
#define ATK_PINMISSILE 0x2A
#define ATK_LEER 0x2B
#define ATK_BITE 0x2C
#define ATK_GROWL 0x2D
#define ATK_ROAR 0x2E
#define ATK_SING 0x2F
#define ATK_SUPERSONIC 0x30
#define ATK_SONICBOOM 0x31
#define ATK_DISABLE 0x32
#define ATK_ACID 0x33
#define ATK_EMBER 0x34
#define ATK_FLAMETHROWER 0x35
#define ATK_MIST 0x36
#define ATK_WATERGUN 0x37
#define ATK_HYDROPUMP 0x38
#define ATK_SURF 0x39
#define ATK_ICEBEAM 0x3A
#define ATK_BLIZZARD 0x3B
#define ATK_PSYBEAM 0x3C
#define ATK_BUBBLEBEAM 0x3D
#define ATK_AURORABEAM 0x3E
#define ATK_HYPERBEAM 0x3F
#define ATK_PECK 0x40
#define ATK_DRILLPECK 0x41
#define ATK_SUBMISSION 0x42
#define ATK_LOWKICK 0x43
#define ATK_COUNTER 0x44
#define ATK_SEISMICTOSS 0x45
#define ATK_STRENGTH 0x46
#define ATK_ABSORB 0x47
#define ATK_MEGADRAIN 0x48
#define ATK_LEECHSEED 0x49
#define ATK_GROWTH 0x4A
#define ATK_RAZORLEAF 0x4B
#define ATK_SOLARBEAM 0x4C
#define ATK_POISONPOWDER 0x4D
#define ATK_STUNSPORE 0x4E
#define ATK_SLEEPPOWDER 0x4F
#define ATK_PETALDANCE 0x50
#define ATK_STRINGSHOT 0x51
#define ATK_DRAGONRAGE 0x52
#define ATK_FIRESPIN 0x53
#define ATK_THUNDERSHOCK 0x54
#define ATK_THUNDERBOLT 0x55
#define ATK_THUNDERWAVE 0x56
#define ATK_THUNDER 0x57
#define ATK_ROCKTHROW 0x58
#define ATK_EARTHQUAKE 0x59
#define ATK_FISSURE 0x5A
#define ATK_DIG 0x5B
#define ATK_TOXIC 0x5C
#define ATK_CONFUSION 0x5D
#define ATK_PSYCHIC 0x5E
#define ATK_HYPNOSIS 0x5F
#define ATK_MEDITATE 0x60
#define ATK_AGILITY 0x61
#define ATK_QUICKATTACK 0x62
#define ATK_RAGE 0x63
#define ATK_TELEPORT 0x64
#define ATK_NIGHTSHADE 0x65
#define ATK_MIMIC 0x66
#define ATK_SCREECH 0x67
#define ATK_DOUBLETEAM 0x68
#define ATK_RECOVER 0x69
#define ATK_HARDEN 0x6A
#define ATK_MINIMIZE 0x6B
#define ATK_SMOKESCREEN 0x6C
#define ATK_CONFUSERAY 0x6D
#define ATK_WITHDRAW 0x6E
#define ATK_DEFENSECURL 0x6F
#define ATK_BARRIER 0x70
#define ATK_LIGHTSCREEN 0x71
#define ATK_HAZE 0x72
#define ATK_REFLECT 0x73
#define ATK_FOCUSENERGY 0x74
#define ATK_BIDE 0x75
#define ATK_METRONOME 0x76
#define ATK_MIRRORMOVE 0x77
#define ATK_SELFDESTRUCT 0x78
#define ATK_EGGBOMB 0x79
#define ATK_LICK 0x7A
#define ATK_SMOG 0x7B
#define ATK_SLUDGE 0x7C
#define ATK_BONECLUB 0x7D
#define ATK_FIREBLAST 0x7E
#define ATK_WATERFALL 0x7F
#define ATK_CLAMP 0x80
#define ATK_SWIFT 0x81
#define ATK_SKULLBASH 0x82
#define ATK_SPIKECANNON 0x83
#define ATK_CONSTRICT 0x84
#define ATK_AMNESIA 0x85
#define ATK_KINESIS 0x86
#define ATK_SOFTBOILED 0x87
#define ATK_HIJUMPKICK 0x88
#define ATK_GLARE 0x89
#define ATK_DREAMEATER 0x8A
#define ATK_POISONGAS 0x8B
#define ATK_BARRAGE 0x8C
#define ATK_LEECHLIFE 0x8D
#define ATK_LOVELYKISS 0x8E
#define ATK_SKYATTACK 0x8F
#define ATK_TRANSFORM 0x90
#define ATK_BUBBLE 0x91
#define ATK_DIZZYPUNCH 0x92
#define ATK_SPORE 0x93
#define ATK_FLASH 0x94
#define ATK_PSYWAVE 0x95
#define ATK_SPLASH 0x96
#define ATK_ACIDARMOR 0x97
#define ATK_CRABHAMMER 0x98
#define ATK_EXPLOSION 0x99
#define ATK_FURYSWIPES 0x9A
#define ATK_BONEMERANG 0x9B
#define ATK_REST 0x9C
#define ATK_ROCKSLIDE 0x9D
#define ATK_HYPERFANG 0x9E
#define ATK_SHARPEN 0x9F
#define ATK_CONVERSION 0xA0
#define ATK_TRIATTACK 0xA1
#define ATK_SUPERFANG 0xA2
#define ATK_SLASH 0xA3
#define ATK_SUBSTITUTE 0xA4
#define ATK_STRUGGLE 0xA5
#define ATK_SKETCH 0xA6
#define ATK_TRIPLEKICK 0xA7
#define ATK_THIEF 0xA8
#define ATK_SPIDERWEB 0xA9
#define ATK_MINDREADER 0xAA
#define ATK_NIGHTMARE 0xAB
#define ATK_FLAMEWHEEL 0xAC
#define ATK_SNORE 0xAD
#define ATK_CURSE 0xAE
#define ATK_FLAIL 0xAF
#define ATK_CONVERSION2 0xB0
#define ATK_AEROBLAST 0xB1
#define ATK_COTTONSPORE 0xB2
#define ATK_REVERSAL 0xB3
#define ATK_SPITE 0xB4
#define ATK_POWDERSNOW 0xB5
#define ATK_PROTECT 0xB6
#define ATK_MACHPUNCH 0xB7
#define ATK_SCARYFACE 0xB8
#define ATK_FAINTATTACK 0xB9
#define ATK_SWEETKISS 0xBA
#define ATK_BELLYDRUM 0xBB
#define ATK_SLUDGEBOMB 0xBC
#define ATK_MUDSLAP 0xBD
#define ATK_OCTAZOOKA 0xBE
#define ATK_SPIKES 0xBF
#define ATK_ZAPCANNON 0xC0
#define ATK_FORESIGHT 0xC1
#define ATK_DESTINYBOND 0xC2
#define ATK_PERISHSONG 0xC3
#define ATK_ICYWIND 0xC4
#define ATK_DETECT 0xC5
#define ATK_BONERUSH 0xC6
#define ATK_LOCKON 0xC7
#define ATK_OUTRAGE 0xC8
#define ATK_SANDSTORM 0xC9
#define ATK_GIGADRAIN 0xCA
#define ATK_ENDURE 0xCB
#define ATK_CHARM 0xCC
#define ATK_ROLLOUT 0xCD
#define ATK_FALSESWIPE 0xCE
#define ATK_SWAGGER 0xCF
#define ATK_MILKDRINK 0xD0
#define ATK_SPARK 0xD1
#define ATK_FURYCUTTER 0xD2
#define ATK_STEELWING 0xD3
#define ATK_MEANLOOK 0xD4
#define ATK_ATTRACT 0xD5
#define ATK_SLEEPTALK 0xD6
#define ATK_HEALBELL 0xD7
#define ATK_RETURN 0xD8
#define ATK_PRESENT 0xD9
#define ATK_FRUSTRATION 0xDA
#define ATK_SAFEGUARD 0xDB
#define ATK_PAINSPLIT 0xDC
#define ATK_SACREDFIRE 0xDD
#define ATK_MAGNITUDE 0xDE
#define ATK_DYNAMICPUNCH 0xDF
#define ATK_MEGAHORN 0xE0
#define ATK_DRAGONBREATH 0xE1
#define ATK_BATONPASS 0xE2
#define ATK_ENCORE 0xE3
#define ATK_PURSUIT 0xE4
#define ATK_RAPIDSPIN 0xE5
#define ATK_SWEETSCENT 0xE6
#define ATK_IRONTAIL 0xE7
#define ATK_METALCLAW 0xE8
#define ATK_VITALTHROW 0xE9
#define ATK_MORNINGSUN 0xEA
#define ATK_SYNTHESIS 0xEB
#define ATK_MOONLIGHT 0xEC
#define ATK_HIDDENPOWER 0xED
#define ATK_CROSSCHOP 0xEE
#define ATK_TWISTER 0xEF
#define ATK_RAINDANCE 0xF0
#define ATK_SUNNYDAY 0xF1
#define ATK_CRUNCH 0xF2
#define ATK_MIRRORCOAT 0xF3
#define ATK_PSYCHUP 0xF4
#define ATK_EXTREMESPEED 0xF5
#define ATK_ANCIENTPOWER 0xF6
#define ATK_SHADOWBALL 0xF7
#define ATK_FUTURESIGHT 0xF8
#define ATK_ROCKSMASH 0xF9
#define ATK_WHIRLPOOL 0xFA
#define ATK_BEATUP 0xFB
#define ATK_FAKEOUT 0xFC
#define ATK_UPROAR 0xFD
#define ATK_STOCKPILE 0xFE
#define ATK_SPITUP 0xFF
#define ATK_SWALLOW 0x100
#define ATK_HEATWAVE 0x101
#define ATK_HAIL 0x102
#define ATK_TORMENT 0x103
#define ATK_FLATTER 0x104
#define ATK_WILLOWISP 0x105
#define ATK_MEMENTO 0x106
#define ATK_FACADE 0x107
#define ATK_FOCUSPUNCH 0x108
#define ATK_SMELLINGSALT 0x109
#define ATK_FOLLOWME 0x10A
#define ATK_NATUREPOWER 0x10B
#define ATK_CHARGE 0x10C
#define ATK_TAUNT 0x10D
#define ATK_HELPINGHAND 0x10E
#define ATK_TRICK 0x10F
#define ATK_ROLEPLAY 0x110
#define ATK_WISH 0x111
#define ATK_ASSIST 0x112
#define ATK_INGRAIN 0x113
#define ATK_SUPERPOWER 0x114
#define ATK_MAGICCOAT 0x115
#define ATK_RECYCLE 0x116
#define ATK_REVENGE 0x117
#define ATK_BRICKBREAK 0x118
#define ATK_YAWN 0x119
#define ATK_KNOCKOFF 0x11A
#define ATK_ENDEAVOR 0x11B
#define ATK_ERUPTION 0x11C
#define ATK_SKILLSWAP 0x11D
#define ATK_IMPRISON 0x11E
#define ATK_REFRESH 0x11F
#define ATK_GRUDGE 0x120
#define ATK_SNATCH 0x121
#define ATK_SECRETPOWER 0x122
#define ATK_DIVE 0x123
#define ATK_ARMTHRUST 0x124
#define ATK_CAMOUFLAGE 0x125
#define ATK_TAILGLOW 0x126
#define ATK_LUSTERPURGE 0x127
#define ATK_MISTBALL 0x128
#define ATK_FEATHERDANCE 0x129
#define ATK_TEETERDANCE 0x12A
#define ATK_BLAZEKICK 0x12B
#define ATK_MUDSPORT 0x12C
#define ATK_ICEBALL 0x12D
#define ATK_NEEDLEARM 0x12E
#define ATK_SLACKOFF 0x12F
#define ATK_HYPERVOICE 0x130
#define ATK_POISONFANG 0x131
#define ATK_CRUSHCLAW 0x132
#define ATK_BLASTBURN 0x133
#define ATK_HYDROCANNON 0x134
#define ATK_METEORMASH 0x135
#define ATK_ASTONISH 0x136
#define ATK_WEATHERBALL 0x137
#define ATK_AROMATHERAPY 0x138
#define ATK_FAKETEARS 0x139
#define ATK_AIRCUTTER 0x13A
#define ATK_OVERHEAT 0x13B
#define ATK_ODORSLEUTH 0x13C
#define ATK_ROCKTOMB 0x13D
#define ATK_SILVERWIND 0x13E
#define ATK_METALSOUND 0x13F
#define ATK_GRASSWHISTLE 0x140
#define ATK_TICKLE 0x141
#define ATK_COSMICPOWER 0x142
#define ATK_WATERSPOUT 0x143
#define ATK_SIGNALBEAM 0x144
#define ATK_SHADOWPUNCH 0x145
#define ATK_EXTRASENSORY 0x146
#define ATK_SKYUPPERCUT 0x147
#define ATK_SANDTOMB 0x148
#define ATK_SHEERCOLD 0x149
#define ATK_MUDDYWATER 0x14A
#define ATK_BULLETSEED 0x14B
#define ATK_AERIALACE 0x14C
#define ATK_ICICLESPEAR 0x14D
#define ATK_IRONDEFENSE 0x14E
#define ATK_BLOCK 0x14F
#define ATK_HOWL 0x150
#define ATK_DRAGONCLAW 0x151
#define ATK_FRENZYPLANT 0x152
#define ATK_BULKUP 0x153
#define ATK_BOUNCE 0x154
#define ATK_MUDSHOT 0x155
#define ATK_POISONTAIL 0x156
#define ATK_COVET 0x157
#define ATK_VOLTTACKLE 0x158
#define ATK_MAGICALLEAF 0x159
#define ATK_WATERSPORT 0x15A
#define ATK_CALMMIND 0x15B
#define ATK_LEAFBLADE 0x15C
#define ATK_DRAGONDANCE 0x15D
#define ATK_ROCKBLAST 0x15E
#define ATK_SHOCKWAVE 0x15F
#define ATK_WATERPULSE 0x160
#define ATK_DOOMDESIRE 0x161
#define ATK_PSYCHOBOOST 0x162


(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
Reply With Quote
  #5   Link to this post, but load the entire thread.  
Old November 16th, 2020 (9:55 PM).
Fatlip_A Fatlip_A is offline
 
Join Date: Nov 2020
Posts: 9
OMG THANKS! Couldn't done it without you mate!
Reply With Quote
Reply

Quick Reply

Join the conversation!

Create an account to post a reply in this thread, participate in other discussions, and more!

Create a PokéCommunity Account
Ad Content

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 9:16 AM.