I see on the Github repo that you have this note:
"The seasonal year does not start until after a "weather grace period." The grace period is hard-coded in the game"
Do you know how long this "Grace Period" is/lasts? I've been trying to find out more about the weather system ( that's getting some sort of an overhaul in a20 I hear) and I haven't heard of this info to date. I just though the global weather updated slowly, like every few hours in game.
Also, this note: "The global temperature cannot go over 101 degrees, or below 70 degrees (Fahrenheit)...."
Do you know what the vanilla global temperature "average" is supposed to be? I thought it was 70 F (based on observation, not facts). It would seem that it *should* be something like 85F given those numbers (like in the green forest). I'm looking to figure out what the "default" or "average" global temp is, or how much is swings/updates/etc. Since you made a seasonal weather mod, I kinda was wondering if the vanilla global temp was "random" or followed some algorithm, like the phases of the moon, and your season mod was just extending this in game cycle, or overriding the randomness, etc.
In the A19 code, the weather grace period is 30000 "ticks." I'm about 99% certain that 1000 "ticks" equals one in-game hour, so the weather grace period lasts 30 hours. The code is in WeatherManager.UpdateTargetsBasedOnBiomes.
In the grace period, the global temperature is set to 70 degrees, but I'm pretty sure that's just a placeholder value (since it doesn't matter anyway). The medium is indeed 85 degrees.
After the grace period, in vanilla, the global temperature goes up or down by 0.01 degrees per tick. Whether it goes up or down is determined by a "temperatureGoingUp" variable, that changes direction every 3000 ticks (3 hours). But the method where this happens, does not seem to be invoked every tick, so there is some randomness to it. The same method is the one that clamps the global temperature between 70 and 101 degrees, inclusive. The method is WeatherManager.GenerateWeather.
My modlet creates a new method that runs on every game update, which sets the global temperature before GenerateWeather runs. It basically uses a sine wave, which is pretty close to what happens in the real world. The sine wave's amplitude (temperature variation), frequency (meteorological year length), and phase shift (starting season) can be set as custom properties in worldglobal.xml.
Keep in mind that the global temperature is not the same as the temperature felt by a player. Each biome has its own local temperature, and that is influenced by cloud thickness, precipitation, and sun angle (time of day). This is done in WeatherManager.CombineGlobalTemperature, which is called by BiomeWeather.Update. The min and max temperatures for the biomes are set in biomes.xml.
Also, players themselves have buffs that increase their core temperatures (e.g. standing near a campfire).
And, you heard right, the whole thing is being reworked. I asked Faatal about this in the A20 thread. Here's the last comment about it, you can follow the quotes back to see the details (such as they are):