Last updated
Last updated
In most zones, weather is pseudorandom and can be derived from the current time. Each zone has a weather table, which contains the possible weather states for the zone and the stacked probability of that weather being active.
The value that the pseudorandom number generator produces is referred to as the target value. This value can be calculated deterministically for any given instant. It will always be in the range [0, 99]
.
Given a UNIX timestamp unixSeconds
:
Once the target value has been calculated, the WeatherRate
row for the current TerritoryType
is retrieved. The rates of each entry in the row are accumulated until the target value is less than the current value of the rate accumulator. At this point, the current weather rate entry is selected, and the corresponding weather ID denotes the Weather
row that should be used.
Territories can be queried by name using their PlaceName
attribute. Territories have a WeatherRate
that describes the weather rate row they use. Using the process described above, the current Weather
being used can be determined.
Some zones, such as the original version of Diadem, use the message to control what weather the player experiences. It is not known what zones currently use this message for weather.