- 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):
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