The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script Is it possible to replace HMs with Key Items?

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 January 9th, 2020 (6:07 AM). Edited January 10th, 2020 by AltariaUp.
AltariaUp's Avatar
AltariaUp AltariaUp is offline
 
Join Date: Jan 2020
Location: Breastamore
Posts: 1
Hey Guys!

I've been interested in creating a patch for pokemon Emerald for a very long time. And being new to rom hacking I'm not looking to do anything insane. I'd just like to test the waters.

For now I would like to find a way to replace HMs in the game with some sort of key item. And my research so far makes it seem not impossible, it appears a case of redirecting certain script.

If anyone has any pointers on where to start with this Emerald patch, I'm open to any advice.

Thanks all.
__________________
Basic Breeder and Patcher
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old January 10th, 2020 (6:40 PM).
dearman4's Avatar
dearman4 dearman4 is offline
 
Join Date: Nov 2017
Location: Michigan
Age: 30
Gender: Male
Nature: Quirky
Posts: 620
I was able to make all but flash and fly activate-able without being taught
Cut Original Script:
Spoiler:
'---------------
#org 0x2906BB
lockall
checkflag 0x867
if 0x0 goto 0x8290721
checkattack 0xF
compare LASTRESULT 0x6
if 0x1 goto 0x8290721
setanimation 0x0 LASTRESULT
bufferpartypokemon 0x0 LASTRESULT
bufferattack 0x1 0xF
msgbox 0x829072E MSG_YESNO '"This tree looks like it can be\nCU..."
compare LASTRESULT 0x0
if 0x1 goto 0x829072B
msgbox 0x8290771 MSG_KEEPOPEN '"[buffer1] used [buffer2]!"
closeonkeypress
doanimation 0x2
waitstate
goto 0x8290710

'---------------
#org 0x290721
msgbox 0x829077D MSG_KEEPOPEN '"This tree looks like it can be\nCU..."
releaseall
end

'---------------
#org 0x29072B
closeonkeypress
releaseall
end

'---------------
#org 0x290710
applymovement LASTTALKED 0x829071F
waitmovement 0x0
hidesprite LASTTALKED
releaseall
end


'---------
' Strings
'---------
#org 0x29072E
= This tree looks like it can be\nCUT down!\pWould you like to CUT it?

#org 0x290771
= [buffer1] used [buffer2]!

#org 0x29077D
= This tree looks like it can be\nCUT down!


'-----------
' Movements
'-----------
#org 0x29071F
#raw 0x5B 'mov5B
#raw 0xFE 'End of Movements

Cut Modified Script:
Spoiler:
'---------------
#org 0x2906BB
lockall
checkflag 0x867
if 0x0 goto 0x8290721
bufferfirstpokemon 0x0
setanimation 0x0 LASTRESULT
bufferattack 0x1 0xF
msgbox 0x829072E MSG_YESNO '"This tree looks like it can be\nCu..."
compare LASTRESULT 0x0
if 0x1 goto 0x829072B
msgbox 0x8290771 MSG_KEEPOPEN '"[buffer1] used [buffer2]!"
closeonkeypress
goto 0x8290710

'---------------
#org 0x290721
msgbox 0x829077D MSG_KEEPOPEN '"This tree looks like it can be\nCu..."
releaseall
end

'---------------
#org 0x29072B
closeonkeypress
releaseall
end

'---------------
#org 0x290710
applymovement LASTTALKED 0x829071F
waitmovement 0x0
hidesprite LASTTALKED
releaseall
end


'---------
' Strings
'---------
#org 0x29072E
= This tree looks like it can be\nCut down!\pWould you like to Cut it?

#org 0x290771
= [buffer1] used [buffer2]!

#org 0x29077D
= This tree looks like it can be\nCut down!


'-----------
' Movements
'-----------
#org 0x29071F
#raw 0x5B 'mov5B
#raw 0xFE 'End of Movements

I only had to remove five lines that deal with checking the attack, though its obviously preferable to re-point the text to something that talks about using an item, and you can remove the animations for HM moves by editing 0xB8536 with 00 00 00 00 00 00 00 00 00 00 00 00

Here are the locations for Emerald's HM scripts:
Spoiler:
Surf:271EA0
Waterfall:290A49
Dive:290B0F
Dive(return to surface):290b5a
Cut:2906BB
Rock Smash:2907A6
Strength:2908BA


But for surf for some reason there has to be other edits, just replace the bytes at 9C80A-9C80B to 00 00
I THINK that was it for surf, but honestly my notes I took about this weren't great, I know I did get it working in my hack though. Hopefully someone else can help with flash and fly! I haven't had much luck asking for help here or on discord (asking multiple times mind you) so I hope I was able to help you out a bit!
__________________
My ROM hack, Pokemon Emerald Final:
https://www.pokecommunity.com/showthread.php?p=9898603
My beginner's devkit tutorial:
https://www.pokecommunity.com/showthread.php?t=411844
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:15 AM.