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

[Essentials Tutorial] Adding Hidden Grottos

Rayd12smitty

Shadow Maker
645
Posts
12
Years
  • Seen Feb 21, 2016
If this belongs in Tutorials and Resources I apologize Maruno. Please move it there if you think it should be. I put it here as it relates directly to Pokemon Essentials.

Alright, so someone asked a question about Hidden Grottos like in BW2 so I decided to add them to my game once I figured out how to make one. This can probably be done in a much simpler, easier way, but this way works just fine, and I don't know much on scripting.

=====
Sprites
=====
First, you want to find a resource pack that has all the overworld sprites for any Pokemon you want to have in your Hidden Grottos. These have been posted multiple times and a part of quite a few kits. You can find those on your own. Put them and any item/berry sprites you may want in the Graphics/Characters folder.

=======
Script Edits
=======
Open up the Script Editor and find the script section called PokemonEncounterModifiers. Add this to the bottom of it.
Spoiler:
Like the commented out lines say, you can use whatever switch you like. Name the switch DW Wild Pokemon. This switch when turned on will make any wild Pokemon have their Dream World Ability.

===========
The Actual Grotto
===========
You need to make a map for your Hidden Grotto. Be creative. The event to enter your Hidden Grotto should say something like: "There's a small gap in between the trees! Go inside?" and then have a choice yes or no to enter it. This should be activated by the action button, NOT event touched.

The map should only have 3 events in it, plus the exit event(s). Mine looks like this.
Spoiler:

The exit events should obviously just transport you out of the Grotto, and be activated by Event Touch.

Events A, B, can C are what we need to look at now. A and B determine what will appear in the Grotto and handle when it should respawn. Event C is the actual Pokemon/Item that appears.

=====
Event A
=====
Event A has 3 pages.This event handles 2 things. First, it decides what will appear in your Hidden Grotto, and second it handles when the Grotto should Respawn. There are 2 switches and a variable used in this event. You will need a switch and variable for each grotto you make. The time count down switch is always used in all of them (It is switch 23). If you make a second Grotto, it needs its own set of these switch/variable. If you make 7 Grottos, you will need 7 sets of these. The random number picked in the first page of this event can be changed to whatever you like. If you pick (0...9) like me, there are 10 possible outcomes for your Grotto.

The first page has no conditions and is triggered by Parallel Process. It should look like this.
Spoiler:


The second page should be completely blank and have the condition "Self Switch A is ON"

The third page should be triggered by Autorun and have the conditions "Self Switch A is ON" and switch 23 which is called
"s:cooledDown?(86400) is ON" The page should look like this.
Spoiler:


=====
Event B
=====
The second event changes the graphics of what is in your Hidden Grotto, depending on the random number picked in Event A. This event only has one page, and is triggered by Parallel Process. There are no conditions for this event. The event first needs a Conditional Branch. This is dependent on the switch you made in Event A that was called x Grotto being OFF.
Everything else in this event goes inside this Conditional Branch.

Now, the next part is stackable, and you need one for each possible number picked in Event A for the variable called x Grotto. Remember that 0 counts as an option. Mine was set to (0...9) so there are 10 options. Each option needs a conditional branch that looks like this.
Spoiler:

These events can stack on top of each other. Remember, you need to make one of these for each outcome that your variable could be set to. You can have the graphic be a Pokemon, Item Ball, or nothing at all if you want there to be a chance the Grotto is empty. A full page of these could look like this.
Spoiler:


=====
Event C
=====
We are almost done. Event C is the actual event you interact with inside the Grotto. It has two pages. NEITER HAVE A GRAPHIC.

The first page has no conditions and is triggered by Action Button. This page contains many conditional branches, just like Event B. There is one for each possible outcome. Each one will look different depending on what you want. For each one that in Event B you set a graphic for a Pokemon, it should look like this. Make sure you do the same Pokemon as the Graphic, or clicking on a Butterfree could start a battle with a Dunsparce.

This is what a Wild Pokemon's should look like.
Spoiler:

The switch that is turned on before the battle and off after the battle makes the Pokemon have their Dream World Ability.

You can change these to do whatever you want. If you have the graphic set to an Itemball, make it give you an item. If its set to no graphics, make it blank. Use your creativity and imagination.

After you have all of them stacked on top of each other, which in my case is 10, add this line to the bottom of the event page.
Spoiler:


The second page of the event should be blank, and have the condition "x Grotto is ON"


Thats all :D Please try this out and let me know what you think. Also let me know if this is easy to understand or if I could explain it better.
 
Last edited:
378
Posts
10
Years
  • Seen Oct 18, 2017
Thank you so much, Rayd! This has helped tremendously!

Edit: I've encountered a problem. I did exactly as the instructions say, and yet Event C has no graphic nor does it provide me with an encounter upon pressing the action button. Help?
 
Last edited:

Rayd12smitty

Shadow Maker
645
Posts
12
Years
  • Seen Feb 21, 2016
This is from a long time ago. I would guess you did something wrong but I wouldn't worry about it. I'm working on a much better version that I'll release in a few days if you can wait.
 
378
Posts
10
Years
  • Seen Oct 18, 2017
This is from a long time ago. I would guess you did something wrong but I wouldn't worry about it. I'm working on a much better version that I'll release in a few days if you can wait.

Oh, I can wait. I look forward to it, Rayd!
 

Chrisario

Friend code :0018 2912 2366 let me know
108
Posts
10
Years
I when I tried to test it it gave me this long error message

Interpreter:276:in `pbExecuteScript'
Interpreter:1600:in `command_355'
Interpreter:494:in `execute_command'
Interpreter:193:in `update'
Interpreter:106:in `loop'
Interpreter:198:in `update'
Scene_Map:103:in `update'
Scene_Map:101:in `loop'
Scene_Map:114:in `update'
Scene_Map:68:in `main'
Exception: RuntimeError
Message: Script error within event 5, map 4 (Hidden Grotto):
Exception: NoMethodError
Message: (eval):1:in `pbExecuteScript'undefined method `PBSpecies' for #<Interpreter:0x9d9ee68>
***Full script:
pbWildBattle(PBSpecies:HERACROSS,24)

Interpreter:243:in `pbExecuteScript'
Interpreter:1600:in `eval'
Interpreter:243:in `pbExecuteScript'
Interpreter:1600:in `command_355'
Interpreter:494:in `execute_command'
Interpreter:193:in `update'
Interpreter:106:in `loop'
Interpreter:198:in `update'
Scene_Map:103:in `update'
Scene_Map:101:in `loop'

Interpreter:276:in `pbExecuteScript'
Interpreter:1600:in `command_355'
Interpreter:494:in `execute_command'
Interpreter:193:in `update'
Interpreter:106:in `loop'
Interpreter:198:in `update'
Scene_Map:103:in `update'
Scene_Map:101:in `loop'
Scene_Map:114:in `update'
Scene_Map:68:in `main'
Exception: RuntimeError
Message: Script error within event 5, map 4 (Hidden Grotto):
Exception: NoMethodError
Message: (eval):1:in `pbExecuteScript'undefined method `PBSpecies' for #<Interpreter:0x9d02160>
***Full script:
pbWildBattle(PBSpecies:SANDILE,29)

Interpreter:243:in `pbExecuteScript'
Interpreter:1600:in `eval'
Interpreter:243:in `pbExecuteScript'
Interpreter:1600:in `command_355'
Interpreter:494:in `execute_command'
Interpreter:193:in `update'
Interpreter:106:in `loop'
Interpreter:198:in `update'
Scene_Map:103:in `update'
Scene_Map:101:in `loop'

Interpreter:276:in `pbExecuteScript'
Interpreter:1600:in `command_355'
Interpreter:494:in `execute_command'
Interpreter:193:in `update'
Interpreter:106:in `loop'
Interpreter:198:in `update'
Scene_Map:103:in `update'
Scene_Map:101:in `loop'
Scene_Map:114:in `update'
Scene_Map:68:in `main'
Exception: RuntimeError
Message: Script error within event 5, map 4 (Hidden Grotto):
Exception: NoMethodError
Message: (eval):1:in `pbExecuteScript'undefined method `PBSpecies' for #<Interpreter:0x9d02ad8>
***Full script:
pbWildBattle(PBSpecies:PHANPY,29)

Interpreter:243:in `pbExecuteScript'
Interpreter:1600:in `eval'
Interpreter:243:in `pbExecuteScript'
Interpreter:1600:in `command_355'
Interpreter:494:in `execute_command'
Interpreter:193:in `update'
Interpreter:106:in `loop'
Interpreter:198:in `update'
Scene_Map:103:in `update'
Scene_Map:101:in `loop'

Interpreter:276:in `pbExecuteScript'
Interpreter:1600:in `command_355'
Interpreter:494:in `execute_command'
Interpreter:193:in `update'
Interpreter:106:in `loop'
Interpreter:198:in `update'
Scene_Map:103:in `update'
Scene_Map:101:in `loop'
Scene_Map:114:in `update'
Scene_Map:68:in `main'
Exception: RuntimeError
Message: Script error within event 5, map 4 (Hidden Grotto):
Exception: NoMethodError
Message: (eval):1:in `pbExecuteScript'undefined method `PBSpecies' for #<Interpreter:0x9d01c38>
***Full script:
pbWildBattle(PBSpecies:RATTATA,24)

Interpreter:243:in `pbExecuteScript'
Interpreter:1600:in `eval'
Interpreter:243:in `pbExecuteScript'
Interpreter:1600:in `command_355'
Interpreter:494:in `execute_command'
Interpreter:193:in `update'
Interpreter:106:in `loop'
Interpreter:198:in `update'
Scene_Map:103:in `update'
Scene_Map:101:in `loop'

Interpreter:276:in `pbExecuteScript'
Interpreter:1600:in `command_355'
Interpreter:494:in `execute_command'
Interpreter:193:in `update'
Interpreter:106:in `loop'
Interpreter:198:in `update'
Scene_Map:103:in `update'
Scene_Map:101:in `loop'
Scene_Map:114:in `update'
Scene_Map:68:in `main'

Is it when which switch is activated Do I need to Add the DW Pokemon Var to make it work
 

Maruno

Lead Dev of Pokémon Essentials
5,285
Posts
16
Years
You have this:

Code:
pbWildBattle(PBSpecies:RATTATA,24)
This is just wrong. You should use one of these instead:

Code:
pbWildBattle(PBSpecies::RATTATA,24)
pbWildBattle(:RATTATA,24)
Note where the colons are, and how many of them there are.
 

Florio

Pokemon Crimson Skies Owner
391
Posts
15
Years
Hey dude, I think something is wrong with your Hidden Grotto Script. Everything works fine except for respawning. My grotto won't respawn.
I'm thinking it has to do with the fact that nowhere in your tutorial, do I see the Route X Grotto switch being turned off. Gonna try something now.
Edit: I got the spawning working. On Event A, third page, the Route X Grotto switch is suppose to turn OFF, not ON.
Edit 2: NVM it has a lot of glitches still, such as the Grotto changing while you are on map, and right infront of you before you interact with it (because the timer starts before you interact with Event C). Right now I'm trying to fix it so that the timer doesn't start until after finishing interacting with the grotto, and so that the Grotto doesn't change until you leave the map.
 
Last edited:
Back
Top