Binary ROM HackingNeed 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.
I've been working on some data for Fire Red these last days.
I am stuck on something and couldn't find any answer at all.
If I remember right, you can get some items when breaking rocks with Rock Smash. Does it apply to this game?
And if it does, is there any way to change that data?
According to Bulbapedia, you can only get items from Rock Smash in HG/SS and Gen VI. You'll need to rewrite Rock Smash's script and add a part where the you can randomly get an item. I had some time I quickly wrote one up for you.
#org @Continue
applymovement 0x800F @RockAnimation
waitmovement 0x0
hidesprite 0x800F
random 0x5 // Change this to change the chance of getting an item (Currently 20%)
compare 0x800D 0x0
if 0x1 call @Item
special 0xAB
compare 0x800D 0x0
if 0x1 goto @ReleaseAll
waitstate
releaseall
end
#org @Item
random 0x5 // Change this if you want to increase/ decrease the number of items
copyvar 0x8004 0x800D
compare 0x8004 0x0
if 0x1 call @Everstone
compare 0x8004 0x1
if 0x1 call @HardRock
compare 0x8004 0x2
if 0x1 call @HeartScale
compare 0x8004 0x3
if 0x1 call @Pearl
compare 0x8004 0x4
if 0x1 call @Revive
return
#org @Everstone
giveitem 0xC3 0x1 0x1
return
#org @HardRock
giveitem 0xCC 0x1 0x1
return
#org @HeartScale
giveitem 0x6F 0x1 0x1
return
#org @Pearl
giveitem 0x6A 0x1 0x1
return
#org @Revive
giveitem 0x18 0x1 0x1
return
#org @ReleaseAll
releaseall
end
#org @BreakRock?
= This rock appears to be breakable.\nWould you like to use ROCK SMASH?
#org @UseRockSmash
= [buffer1] used [buffer2]!
#org @RuggedRock
= It's a rugged rock, but a POKéMON\nmay be able to smash it.
#org @RockAnimation
#raw 0x68
#raw 0xFE
I've indicated what lines to edit if you want to change the likely hood of getting items/ which one you can find.