-
Notifications
You must be signed in to change notification settings - Fork 68
Weather
Carmina16 edited this page Mar 20, 2018
·
22 revisions
The weather is specific to each of 36 quadrants of the provinces, and changes every hour.
season <- getSeason() # March = Spring = 0
for i <- 0, 36
climate <- climates[i]
variant <- <40% for 2, 20% for 1 and 3, 10% for 0 or 4>
weather[i] <- weatherTable[climate*20 + season*5 + variant]
climates
is a 36 1-byte values @4295E
weatherTable
is 140 1-byte values @42990
0 clear
1 overcast, fog
2 rain
3 snow
4 snow overcast, fog
5 rain
6 same as 1?
7 snow overcast, if rnd()<16000 then fog (recalculate on each outside transition)
If rain and rnd()<24000, it is thunderstorm.
If fog and (day number & 8), it is heavy fog.
In terrain type 3
(different from climate
above), there is raining instead of snow/snow overcast.
Rain in cities uses W
tileset. Overcast and rain in the wilderness use R
tileset.
When it is snowing or snow overcast, the following NPCs are missing from cities: fire-eater, prostitutes, and snake enchanter (bugged in the original game).