Weather: Difference between revisions

From PZwiki
(Modified to use Version notice template)
(Major rewrite of page based off LUA files)
Line 1: Line 1:
{{languages}}
{{languages}}
{{VersionNotice|0.2.0r RC2.9}}
{{VersionNotice|2.9.9.17 (14)}}


[[File:Weather UI.png|200px|thumb|right|Added in 0.2.0r RC2.9, nature is empowered once again. The empty black box above the Quest manager shows the current weather]]
[[File:Weather UI.png|200px|thumb|right|The empty black box above the Quest manager shows the current weather]]


As of the current build, weather change is almost completely random. The period of time before the change of weather ranges between a few hours to a few days. Weather effects the temperature of the game world and survivors may have to adapt to weather accordingly. Currently, weather has little effect on zombies other than rain causing slight noise.
Weather effects the temperature of the game world and survivors may have to adapt to weather accordingly. Currently, weather has little effect on zombies other than rain causing slight noise.  When the game loads, the max and minimum tempurature, the type of weather (but not its details), and the current moon phase are loaded from the save.  The moon phase is immediately recalculated to make sure it is accurate.


Currently, there are 4 types of weather: [[Rain|Rainy]], [[Sunny]], None, and [[Cloudy]].
Every 10 minutes the weather, moon phase, lighting, and tempurature get checked and if required updated.


In the night, there are 8 [[Moon Phases]] that affect how much light there is at that night.
==Weather==
Weather is updated every 10 minutes.  All weather lasts for 4 hours, with the exception of Rain, which may end abrutely at any time, but will still never last more than 4 hours.  There are four types of weather currently: [[Rain|Rainy]], [[Sunny]], Normal, and [[Cloudy]].
 
Weather is choosen randomly by picking a number between 1 and 100 and comparing it to a weather table for each month.  Whatever weather is randomly choosen becomes the current weather, unless the weather choosen is Rain or Sunny.  If the weather is Sunny, there is a check done to determine if it is night time.  If it is night time, then the Sunny weather just becomes normal weather as it can't be Sunny at night time.  If the weather selected is Rain, then a check is done against the sandbox's rain settings.
 
If the rain level in the Sandbox settings is set to Very Dry, then there is a 100% chance that the game will change the newly selected Rain weather to Normal weather.  If the rain level settings in Sandbox are Dry then the chance is instead 50% that Rain will be changed to Normal.
 
If anything other than Rain or Sunny is selected, then another check is performed against the Sandbox settings.  If the Sandbox settings are Rainy, then there is a 50% chance that the randomly choosen weather will instead become Rain.  If the Sandbox settings are Very Rainy, this chance is instead 100%.
 
The selected weather, along with the season, determines the minimum and maximum tempurature for the day.  It also determines the distance that the player character can see.
 
If anything other than Rain was choosen as the weather and it was raining, the rain obviously stops.  If it has already rained once that day, the chances of it raining again are significantly lower.  If Rain was choosen as the current weather and it has already Rain at least once today it randomly determines whether or not it will Rain again.  The chance for it to rain again is (1/((how many times it has rained * 5)-1).  So if it has already rained once today, there is a 3/4 chance that it will not rain again, or if it has already rained twice today, there is a 8/9 chance that it will not rain again.  If the game decides that it will not rain again, but Rain had been selected, it becomes Cloudy instead.
 
===Rain===
While it is raining, the intensity of the rain can vary considerably.  Rain intensity ranges 0 to 34.  When it first begins to rain a minimum and maximum intensity is randomly selected.  The minimum intensity is randomly selected from a range of 0 to 4.  The maximum intensity is randomly selected from a range of 9 to 34.
 
Every hour there is a random chance that the rain will stop.  By default this is a 20% chance, but the rain settings in Sandbox can change this chance.
 
{|class="wikitable"
!Sandbox Setting!!Random Abrute Rain Chance
|-
|Very Dry||100%
|-
|Dry||50%
|-
|Default||20%
|-
|Rainy||11%
|-
|Very Rainy||7%
|}
 
==Moon Cycle==
The moon cycle is based on a 30 day cycle.  There are 8 different moon phases.  Each moon phase provides a different amount of ambient light during the night time.  Ranging from 0.0 (New Moon) to 0.7 (Full Moon).
 
The moon progresses as follows:
{|class="wikitable"
!Day!!Moon Phase ID!!Ambient Light
|-
|1-4
|0
|0.0
|-
|5-8
|1
|0.2
|-
|9-12
|2
|0.4
|-
|13-15
|3
|0.5
|-
|16-18
|4
|0.7
|-
|19-22
|5
|0.5
|-
|23-26
|6
|0.4
|-
|27-30
|7
|0.2
|}
 
==Tempurature==
Every day there is a minimum and maximum tempurature.  These are determined by the month and the current weather.  The tempurature will go up a little bit at a time until it hits the maximum tempurature for the day, at which point it will begin to fall until it reaches the minimum tempurature.
 
Body tempurature is determined by your clothing and the ambient tempurature.


[[Category: The Game World]]
[[Category: The Game World]]
[[Category: Weather]]
[[Category: Weather]]
[[Category:Version 0.2.0r]]

Revision as of 16:04, 21 November 2013

Template:VersionNotice

The empty black box above the Quest manager shows the current weather

Weather effects the temperature of the game world and survivors may have to adapt to weather accordingly. Currently, weather has little effect on zombies other than rain causing slight noise. When the game loads, the max and minimum tempurature, the type of weather (but not its details), and the current moon phase are loaded from the save. The moon phase is immediately recalculated to make sure it is accurate.

Every 10 minutes the weather, moon phase, lighting, and tempurature get checked and if required updated.

Weather

Weather is updated every 10 minutes. All weather lasts for 4 hours, with the exception of Rain, which may end abrutely at any time, but will still never last more than 4 hours. There are four types of weather currently: Rainy, Weather, Normal, and Weather.

Weather is choosen randomly by picking a number between 1 and 100 and comparing it to a weather table for each month. Whatever weather is randomly choosen becomes the current weather, unless the weather choosen is Rain or Sunny. If the weather is Sunny, there is a check done to determine if it is night time. If it is night time, then the Sunny weather just becomes normal weather as it can't be Sunny at night time. If the weather selected is Rain, then a check is done against the sandbox's rain settings.

If the rain level in the Sandbox settings is set to Very Dry, then there is a 100% chance that the game will change the newly selected Rain weather to Normal weather. If the rain level settings in Sandbox are Dry then the chance is instead 50% that Rain will be changed to Normal.

If anything other than Rain or Sunny is selected, then another check is performed against the Sandbox settings. If the Sandbox settings are Rainy, then there is a 50% chance that the randomly choosen weather will instead become Rain. If the Sandbox settings are Very Rainy, this chance is instead 100%.

The selected weather, along with the season, determines the minimum and maximum tempurature for the day. It also determines the distance that the player character can see.

If anything other than Rain was choosen as the weather and it was raining, the rain obviously stops. If it has already rained once that day, the chances of it raining again are significantly lower. If Rain was choosen as the current weather and it has already Rain at least once today it randomly determines whether or not it will Rain again. The chance for it to rain again is (1/((how many times it has rained * 5)-1). So if it has already rained once today, there is a 3/4 chance that it will not rain again, or if it has already rained twice today, there is a 8/9 chance that it will not rain again. If the game decides that it will not rain again, but Rain had been selected, it becomes Cloudy instead.

Rain

While it is raining, the intensity of the rain can vary considerably. Rain intensity ranges 0 to 34. When it first begins to rain a minimum and maximum intensity is randomly selected. The minimum intensity is randomly selected from a range of 0 to 4. The maximum intensity is randomly selected from a range of 9 to 34.

Every hour there is a random chance that the rain will stop. By default this is a 20% chance, but the rain settings in Sandbox can change this chance.

Sandbox Setting Random Abrute Rain Chance
Very Dry 100%
Dry 50%
Default 20%
Rainy 11%
Very Rainy 7%

Moon Cycle

The moon cycle is based on a 30 day cycle. There are 8 different moon phases. Each moon phase provides a different amount of ambient light during the night time. Ranging from 0.0 (New Moon) to 0.7 (Full Moon).

The moon progresses as follows:

Day Moon Phase ID Ambient Light
1-4 0 0.0
5-8 1 0.2
9-12 2 0.4
13-15 3 0.5
16-18 4 0.7
19-22 5 0.5
23-26 6 0.4
27-30 7 0.2

Tempurature

Every day there is a minimum and maximum tempurature. These are determined by the month and the current weather. The tempurature will go up a little bit at a time until it hits the maximum tempurature for the day, at which point it will begin to fall until it reaches the minimum tempurature.

Body tempurature is determined by your clothing and the ambient tempurature.