• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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] Weather-Dependent Events

  • 288
    Posts
    6
    Years
    • Seen Feb 3, 2025
    This is a very short yet hopefully useful tutorial for how to add events into your game that are based on the overworld weather. I haven't seen a tutorial like this yet, but it's something that's very important for most games (maybe because it's so simple, but it's still not quite common sense). It should work for both v17 and v18. If you wanted a certain event Pokemon to only appear when rainy, or an NPC to only come out when the weather is nice, this will accomplish that. I'm not going to go into too much detail with this since it's really simple, but here are the steps:

    1. Create a variable (under Control Variables) to be reserved for the current weather effect (I named mine "Overworld Weather"). Note the variable number.

    2. Find "def weather(type, power, duration)" in the Game_Screen script section and paste "$game_variables[XXX] = type" on the line below, replacing "XXX" with the number corresponding to your variable

    That's all there is to it. Remember that the event page only checks if a variable is at or above a certain value, so you'll have to manipulate this a bit to get the correct effect. Also, when checking for a certain weather effect, keep in mind these numbers which correspond to certain overworld weather effects (this is what the variable will be set to):
    Code:
        None        = 0
        Rain        = 1
        Storm       = 2
        Snow        = 3
        Blizzard    = 4
        Sandstorm   = 5
        HeavyRain   = 6
        Sun/Sunny   = 7
     
    I didn't understand step 1. Where exactly do you create this variable?
     
    I didn't understand step 1. Where exactly do you create this variable?

    It's just one of the variables you can get from the Event editor. Just make an event, click the "Control Variables" option, and make one here by typing in a name for it.
     
    could you give an explanation with prints? step number 1 i'm not getting it, i've tried a lot.
     
    could you give an explanation with prints? step number 1 i'm not getting it, i've tried a lot.
    Here's the pathway you have to do in the event editor:
    [PokeCommunity.com] Weather-Dependent Events
     
    Does this still work in v21? Or is there a different steps?
    If the method "def weather(type, power, duration)" still exists on v21, it should work fine still. Otherwise if it has been renamed or something you might have to find the new one, but it should just be adding that single line of code in 1 place. (Also I'm not sure if they changed how variables are handled, as in if it's still called "$game_variables" - you could do a Ctrl + Shift + F for that in the scripts and if it finds something it should still be good.)
     
    Back
    Top