Scripts & Tutorials This forum is for scripts and code, as well as all kinds of tutorials, software, tools and so forth. Remember to give credit!
The thread revival limit does not apply here.

TrollandToad.com
Reply
 
Thread Tools
  #1    
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.

    =====
    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:
    Code:
    # 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|
       pokemon=e[0]
       if $game_switches[158]
         pokemon.setAbility(2)
       end
    }

    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:

    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.
    Spoiler:

    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.
    Spoiler:

    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.
    Spoiler:

    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.
    Spoiler:

    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.
    Spoiler:

    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

    Relevant Advertising!

      #2    
    Old February 23rd, 2014 (8:02 PM). Edited February 24th, 2014 by joeyhugg.
    joeyhugg's Avatar
    joeyhugg joeyhugg is offline
       
      Join Date: Apr 2013
      Gender: Male
      Posts: 384
      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?
      __________________
      This signature has been disabled.
      Signature exceeds height limit.
      Please review and fix the issues by reading the signature rules.

      You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

      Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
      Reply With Quote
        #3    
      Old February 24th, 2014 (12:14 PM).
      Rayd12smitty's Avatar
      Rayd12smitty Rayd12smitty is offline
      Shadow Maker
         
        Join Date: Dec 2011
        Gender: Male
        Posts: 647
        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.
        __________________
        Reply With Quote
          #4    
        Old February 24th, 2014 (2:19 PM).
        joeyhugg's Avatar
        joeyhugg joeyhugg is offline
           
          Join Date: Apr 2013
          Gender: Male
          Posts: 384
          Quote:
          Originally Posted by Rayd12smitty View Post
          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!
          __________________
          This signature has been disabled.
          Signature exceeds height limit.
          Please review and fix the issues by reading the signature rules.

          You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

          Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
          Reply With Quote
            #5    
          Old March 1st, 2014 (2:43 AM).
          Chrisario's Avatar
          Chrisario Chrisario is offline
          Friend code :0018 2912 2366 let me know
             
            Join Date: Jul 2013
            Location: In friend Safari
            Age: 21
            Gender: Male
            Nature: Adamant
            Posts: 113
            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)in `pbExecuteScript'undefined method `PBSpecies' for #
            Reply With Quote
              #6    
            Old March 1st, 2014 (5:22 AM).
            Maruno's Avatar
            Maruno Maruno is offline
            Lead Dev of Pokémon Essentials
               
              Join Date: Jan 2008
              Location: England
              Posts: 5,178
              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.
              __________________
              Go to the Pokémon Essentials Wiki

              | Downloads | Tutorials | Fangames |
              | All Animations Project |

              Follow me on Twitter: @maruno42


              Reply With Quote
                #7    
              Old February 19th, 2015 (10:33 PM). Edited February 20th, 2015 by Florio.
              Florio's Avatar
              Florio Florio is offline
              Pokemon Crimson Skies Owner
                 
                Join Date: Nov 2008
                Location: Canada
                Gender: Male
                Nature: Lax
                Posts: 390
                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.
                __________________
                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

                Sponsored Links
                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 5:13 AM.