The Veil — Climate and Weather
The Veil is the climate and weather simulation layer of the Living World. It models long-term biome climate, short-term weather states, and the propagation of storm systems across adjacent zones. Weather states affect The Flow (resource regeneration) and The Age (faction migration and crop yields). Your game reads weather state and subscribes to changes.
Climate zones
Each zone has a climate configuration that defines its baseline behaviour. Climate is authored in the Weather Authoring Panel or as JSON:
{ "zoneId": "zone_highland_pass", "biome": "Alpine", "annualTemperatureRange": [-10, 18], "annualPrecipitationRange": [0.1, 0.9], "dominantWindDirection": "Northwest", "weatherEventProbabilities": { "Storm": 0.15, "Snow": 0.25, "Fog": 0.20, "Clear": 0.30 }, "seasonalModifiers": { "Winter": { "snowProbabilityMultiplier": 3.0 }, "Summer": { "droughtProbabilityMultiplier": 1.5 } }}The Veil chooses weather transitions based on these probabilities, current season, and whether a storm is propagating from an adjacent zone. Manual override values set in the editor take precedence over probability tables and are useful for testing.
Weather states
| State | Description |
|---|---|
Clear | No precipitation, high visibility |
Overcast | Cloud cover, reduced light, slight temperature drop |
Rain | Precipitation, reduced visibility, boosts plant regen |
Storm | Heavy rain, lightning, wind, propagates to adjacent zones |
Snow | Cold precipitation, slow movement effects, heavy snowfall reduces visibility |
Drought | Extended dry period, suppresses plant regen, raises temperature |
Heatwave | Extreme heat, raises resource consumption, stresses fauna |
Fog | Low visibility, no precipitation effect |
Storm propagation
When a zone enters the Storm state, it has a configurable probability of propagating to adjacent zones on the next Pulse tick. Propagation direction is biased by the zone’s dominantWindDirection. A storm spawned in a coastal zone can travel inland across three or four zones over the course of a game-day, then dissipate.
Adjacent zones receiving a propagated storm immediately transition to Overcast for one tick before moving to Storm, creating a realistic approaching-front effect.
Reading weather from game code
var worldState = Services.Get<IWorldStateQuery>();
WeatherSnapshot weather = worldState.GetWeather(zoneId);
Logger.Info($"Weather: {weather.State}, Temperature: {weather.Temperature:F1}°C");Logger.Info($"Precipitation: {weather.Precipitation:P0}, Wind: {weather.WindSpeed} km/h {weather.WindDirection}");WeatherSnapshot fields:
| Field | Type | Description |
|---|---|---|
State | WeatherState | Current enum state |
Temperature | float | Current temperature in Celsius |
Precipitation | float | 0–1 normalised precipitation intensity |
WindSpeed | float | km/h |
WindDirection | CompassDirection | Enum: N, NE, E, SE, S, SW, W, NW |
Visibility | float | 0–1 normalised visibility |
Subscribing to weather changes
var cache = Services.Get<WorldStateCache>();cache.Changed += (sender, change) =>{ if (change is WeatherChangedEvent wx && wx.ZoneId == myZoneId) { Logger.Info($"Weather changed from {wx.PreviousState} to {wx.NewState}"); UpdateWeatherVisuals(wx.NewState); }};The Changed event fires on the game thread after The Signal delivers a delta frame containing a weather update. You are safe to call game-code methods from the handler.
Changing music based on weather — C# example
A common use case is switching the music or ambience track when weather changes:
private readonly MusicDirector _music;private readonly IWorldStateQuery _worldState;private readonly ZoneId _currentZone;
public void OnWeatherChanged(WeatherChangedEvent e){ if (e.ZoneId != _currentZone) return;
float intensity = e.NewState switch { WeatherState.Storm => 1.0f, WeatherState.Rain => 0.6f, WeatherState.Overcast => 0.3f, WeatherState.Clear => 0.1f, WeatherState.Snow => 0.4f, _ => 0.2f, };
_music.SetParameter("WeatherIntensity", intensity);
// Trigger a rain ambience layer bool isWet = e.NewState is WeatherState.Rain or WeatherState.Storm or WeatherState.Snow; _music.SetParameter("Wet", isWet ? 1f : 0f);}Weather Authoring Panel
The Weather Authoring Panel (View → Living World → Weather) provides:
- Per-zone climate configuration editor
- Live preview: simulate N days of weather forward and display the weather sequence
- Manual override: force a specific weather state for testing without affecting the live world
- Adjacency graph: visualise which zones can propagate storms to each other