Thread: [Essentials Tutorial] Adding Hidden Grottos
View Single Post
Old March 8th, 2013 (1:56 PM). Edited March 9th, 2013 by Rayd12smitty.
Rayd12smitty's Avatar
Rayd12smitty Rayd12smitty is offline
Shadow Maker
Join Date: Dec 2011
Gender: Male
Posts: 647
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.

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.
# Make all wild Pokémon have their Dream World Ability while Switch 158 is ON.
# You can change what Switch is used in this script by changing the 158 below
# to whatever switch you want to use. Use this just like you would the 
# Always Shiny switch.
Events.onWildPokemonCreate+=proc {|sender,e|
   if $game_switches[158]

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.

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.

Please note that the variable called Route 2 Grotto should be called x Grotto, with x being the location of the Grotto. Same for the switch called Route 2 Grotto. EX. if your Grotto is located in Route 7 of your game, both your switch and your variable should be called Route 7 Grotto.

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.

Once again note that the switch called Route 2 Grotto should be called x Grotto, with x being the location of your Grotto.

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.

The event that this is effecting is Event C which we haven't gotten to yet. This is changing the graphics of Event C to the picture in Graphics/Characters called "012" which is Butterfree's overworld sprite.

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.

This goes on for however many options there are.

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.

Once again the variable this depends upon is the one you named x Grotto.

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.

Like I said many times before, the switch should be called x Grotto, where x is the location of the Grotto.

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.
Reply With Quote