The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Other Rock smash 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 February 5th, 2020 (9:08 AM). Edited February 5th, 2020 by DSieg.
DSieg DSieg is offline
 
Join Date: Jan 2010
Gender: Male
Posts: 9
Hi all.

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?

Thanks.
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old February 5th, 2020 (3:59 PM).
DrFuji's Avatar
DrFuji DrFuji is offline
Heiki Hecchara‌‌
 
Join Date: Sep 2009
Location: Aussie
Age: 30
Gender: Male
Nature: Jolly
Posts: 1,693
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.

Spoiler:
#dynamic 0x800000

#org @start
special 0x187
compare 0x800D 0x2
if 0x1 goto @ErrorChecker
lockall
checkflag 0x825
if 0x0 goto @Can'tSmash
checkattack 0xF9
compare 0x800D 0x6
if 0x1 goto @Can'tSmash
setanimation 0x0 0x800D
bufferpartypokemon 0x0 0x800D
bufferattack 0x1 0xF9
msgbox @BreakRock? 0x5
compare 0x800D 0x0
if 0x1 goto @No
msgbox @UseRockSmash 0x4
closeonkeypress
doanimation 0x25
waitstate
goto @Continue

#org @ErrorChecker
release
end

#org @Can'tSmash
msgbox @RuggedRock 0x3
end

#org @No
closeonkeypress
releaseall
end

#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.
__________________
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old February 5th, 2020 (8:12 PM).
DSieg DSieg is offline
 
Join Date: Jan 2010
Gender: Male
Posts: 9
I really thought there would be items in earlier Gens but nope...
Thanks a lot for the script!
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
Thread Tools

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:12 AM.