• 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] Weather-Dependent Events

285
Posts
5
Years
  • Age 21
  • Seen Oct 1, 2023
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
 
14
Posts
3
Years
  • Age 26
  • Seen May 23, 2022
I didn't understand step 1. Where exactly do you create this variable?
 
285
Posts
5
Years
  • Age 21
  • Seen Oct 1, 2023
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.
 
14
Posts
3
Years
  • Age 26
  • Seen May 23, 2022
could you give an explanation with prints? step number 1 i'm not getting it, i've tried a lot.
 
285
Posts
5
Years
  • Age 21
  • Seen Oct 1, 2023
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:
unknown.png
 
Back
Top