Welcome to the Builder Academy

Question What is so rare as a day in June?

More
13 Jul 2013 23:31 #3425 by Parnassus
I've been working on a trigger that checks the weather. It's based on Random's trigger 41098. The thing is, over the many, many times I've checked the various parts of the trigger, it's never been sunny. Without taking statistics, I think I've seen mostly rainy, then lightning, then cloudy and never sunny. Is there a way to work out the statistics? Am I just a pessimist, overlooking the nice weather?

Please Log in or Create an account to join the conversation.

More
27 Jul 2013 13:32 #3592 by Parnassus
Ha, I've stayed in rooms for ages, watching the clouds change to rain, the rain to lightning and so on with no sunlight. When I whined to Rumble, he agreed to stand in a room to watch the weather change. The first weather change was to sunlight! So it's rare, but not impossible. Although I would prefer to wander around my park in the sunlight, I'm much relieved.

Please Log in or Create an account to join the conversation.

More
27 Jul 2013 20:40 - 27 Jul 2013 20:46 #3595 by Maximus
Maybe grep for "sunny" and change the probabilities in the code to make it sunny more often? I think I am going to try this right now and see what I come up with, so that I can set up regions, some zones that are particularly rainy or sunny, and desert zones that get almost no rain and suchlike. I'll probably have to copy the code that handles the probabilities for outdoor weather, and make different copies of it for different climates, and then figure out what I have to do to reference those climates in the area files.
Last edit: 27 Jul 2013 20:46 by Maximus. Reason: add more detail

Please Log in or Create an account to join the conversation.

More
07 Aug 2013 23:11 #3740 by atebyagrue
Back in '09 I did a major overhaul of the weather system for a project I was working on. Just about everything you need is in db.c: reset_time() and weather.c: weather_change(). I wish I didn't lose everything, otherwise I would upload the patch... Basically, depending on the time of year, there's a varying amount of pressure that gives a chance for a change in the weather. This change is caused by the pressure going up or down relative to the current condition.

"It's easier to ask forgiveness than it is to get permission."
-Grace Hopper

Please Log in or Create an account to join the conversation.

Time to create page: 0.183 seconds