Home > Tutorials > RPG Maker 2003 > Seasons
You'll need to know how to make Day/Night, Time, and Random Weather. I think there's probably guides concerning these around here, so I'll just put the gist of it (in case you don't know all of it.
Make a parallel common event called Time, and make it universal by making if Switch Time ON. And KEEP IT ON, Time should be a constant.
<>Wait (0.1 - 1.0)
(however fast you want you clock to be).
<>Variable Minute +1
(don't bother with seconds)
<>If Minute is 60
<>Minute Set, 0
<>If Hour is 24
<>Hour Set, 0
So far this is just normal time.
Make a Day/Night common event, if Day/Night ON.
<>If Hour is Less than 6
<>If Hour is Greater than 18
<>If Hour is Greater than 6
So then you make a Weather common event, with the same deal having a switch be on).
You'll need to random numbers Weather Time (1-10) and WeatherType (1-10).
If WeatherTime is 1
If WeatherTime is 2
If WeatherTime is 3
If WeatherTime is 4
If WeatherTime is 5
If WeatherTime is 6
If WeatherTime is 7
If WeatherTime is 8
If WeatherTime is 9
Make the WeatherType rain for 3 of those ten (30%) chance. Make this fall, and have it be the default weather.
Now, make two call events, GoInside and GoOutside. This should turn the weather and lighting on and off when you head in an outdoors.
Pretty simple, disable weather, turn tinting to normal, weather to none, and both the Day/Night and the Weather switch get turned off. End event processing, and place this AFTER the teleport event (but before Show Screen) when entering any building. This is because the weather is dictated by the screen so you can't easily do two weather types on the same screen (and it will lag).
The GoOutside should be the same way, but turn on the Switches, and give some kind of random weather so it's not completely stopped whenever you go inside).
Okay.... that's the basics of what you need (YES, there's more)
Go back to the Time event, and add after latest line
<>If Hour is 24
<>Hour Set, 0
<>If Day is 7
<>Day Set, 0
<>If Week is 52
<>Week Set, 0
Unless you are planning some sort of real time situation (Harvest Moon knockoff), having year repeat itself is likely fine.
Now divide 52 weeks by 4, for 13. Make a name, called Season (trust me, it's easier than a variable at this point), and at Week 0, 13, 26, and 39 change the name of Season (0 is Fall)
Goto the Weather Event and around the Weather Type branches you originally created, make the following:
If Season name is Fall
(the default weather branch)
If Season name is Winter
(2 rain, 3 snow, 2 heavy snow, 3 none)
If Season name is Spring
(4 rain, 1 snow, 2 heavy rain, 3 none)
If Season name is Summer
(1 rain, 3 sandstorm, 6 none)
Voila, you have seasons! Unfortunately, I can't test this code for bugs, because it takes a million years. But the basic weather codes work, as do the day/night, time, and the common events to shut things off and on.
Sun, 09 Jan 2011 21:03:18 -0500