Skip to content

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

StateDescription
ClearNo precipitation, high visibility
OvercastCloud cover, reduced light, slight temperature drop
RainPrecipitation, reduced visibility, boosts plant regen
StormHeavy rain, lightning, wind, propagates to adjacent zones
SnowCold precipitation, slow movement effects, heavy snowfall reduces visibility
DroughtExtended dry period, suppresses plant regen, raises temperature
HeatwaveExtreme heat, raises resource consumption, stresses fauna
FogLow 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:

FieldTypeDescription
StateWeatherStateCurrent enum state
TemperaturefloatCurrent temperature in Celsius
Precipitationfloat0–1 normalised precipitation intensity
WindSpeedfloatkm/h
WindDirectionCompassDirectionEnum: N, NE, E, SE, S, SW, W, NW
Visibilityfloat0–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