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

Finding items with Rock Smash

78
Posts
10
Years
  • Seen Sep 7, 2015
Hi,
Does anyone know how to make it so when you smash a rock using rock smash , you have a chance to find a item when you break the rock. ( Kinda like in 6th gen,where you can find fossils, rare candies, and such?)
Thanks :)
 

Derxwna Kapsyla

Derxwna "The Badman" Kapsyla
437
Posts
12
Years
It's not exactly like how it is in the games proper, but I tested this method and it works.
HNu2M4s.png

The second page is just the normal Rock Smash Event, so it doesn't continue to pick up the item every time. You may also need to change the event name to Hidden Item so the Item Finder can find it.
 

Nickalooose

--------------------
1,309
Posts
16
Years
  • Seen Dec 28, 2023
You know I actually made a script like this a long time ago... I obviously edit slightly to do what you want... I think lol... It worked a while back I don't see why it won't work in v15+.
Add this to the settings section:
Code:
#===============================================================================
# * Probability can be anything. (recommend 100)
# * Length always needs to be: totalItems-1
# * Items is the list of items you want to encounter.
#     Here you can see Dome Fossil is there multiple times.
#     This just means the chance will be higher to encounter the item.
# * Item, Probability
#     This is the likelihood of you actually getting the item.
#     In these cases: 5/100.
#     The higher this number, the more chance to find it.
#     If you have 100 and the item is found at all, you should receive it.
# * I suggest adding multiple of an item that you want to be more common than
#     than others.  But your choice.
# * Credit "Nickalooose" if used.
#===============================================================================
PROBABILITY=100
ROCKSMASHITEMSLENGTH=7
ROCKSMASHITEMS = [   # Item, probability
     [:DOMEFOSSIL,5],
     [:DOMEFOSSIL,5],
     [:HELIXFOSSIL,5],
     [:OLDAMBER,5],
     [:ROOTFOSSIL,5],
     [:SKULLFOSSIL,5],
     [:ARMORFOSSIL,5],
     [:CLAWFOSSIL,5]
  ]
Then go to HiddenMoves script section and add red bits:
Code:
def pbRockSmashRandomEncounter
  if rand(100)<25
    pbEncounter(EncounterTypes::RockSmash)[COLOR=Red]
  elsif rand(100)<25 # prevents both encounter and finding an item
    pbRandomItem[/COLOR]
  end
end

[COLOR=Red]def pbRandomItem
  newrnd=rand(ROCKSMASHITEMSLENGTH)
  prob=rand(PROBABILITY)
  if prob<=ROCKSMASHITEMS[newrnd][1]
    Kernel.pbMessage(_INTL("There's an item here.")) # Change this message to what you want
    item=ROCKSMASHITEMS[newrnd][0]
    Kernel.pbItemBall(item)
  end
end[/COLOR]
ATTENTION: Go thread tools and 'show printable version' before you copy the script.
 
14
Posts
9
Years
  • Age 33
  • Seen Sep 25, 2023
I came up with my own method of this too, a while back. It isn't as elegant as Nickalooose's solution, but it does have its advantages.

b59eade5d344c3a6c05a46b6c9e3bbb5.png

As you can tell, there's a one-in-three chance of finding an item in this setup. Because the chance is so high and the items are potentially valuable, I have the second and third pages set-up so the same rock can only be smashed once per day.

You can see I used a script called gRockSmash_Seaside. This is just for example purposes, but that script would look something like this:
3f66188357d32c8f571562a0d1b5b6d1.png

Needless to say those items don't really make any sense, but this is just an example. There's a very small chance of getting a Comet Shard, but meanwhile it's pretty likely the player will get one of those Gems.

The primary advantage to this method is that RockSmash events in different areas can yield different items. All you have to do is make a different version of gRockSmash_Seaside. Maybe near a fossil excavation site, you have a really high chance of finding fossils? Maybe near Mt. Moon you have a high chance of finding Moon Stones? It has possibilities.
 
Back
Top