Skip to content

Time of day and weather

All · 10 min read

XenoCore keeps a clock that runs while you play: the sun rises and sets, night falls with a moon and a starry sky, and each area rolls its own weather, from clear skies to rain and storms. The time and the weather sit on the minimap, and the menu's Change Time entry jumps the clock to any hour. The one idea: the clock and the weather are game-wide state; one placed actor per map turns them into light. A map with no director still has a clock and weather (anything that asks for them gets an answer); its sky just does not change.

What you can change

  • Day and night and weather on a map of yours: Give a map its time of day and weather.
  • How fast the clock runs, the phase hours, the start hour: Project Settings › Plugins › XenoCore Environment (Settings).
  • Which weather an area gets, and how often: the area's weather table (The weather).
  • What rain or a storm looks and sounds like: rows of World/DT_XenoCore_WeatherTypes.
  • How a day looks (sun arc, sky colour, fog, night brightness): a sky profile data asset.
  • Night music: Give a map its music.

How it fits together

Piece Class / asset Job
Clock Built in, game-wide The time, 00:00 to 23:59, and the phase. Survives map travel; saved with the game
Weather Built in, game-wide The current weather, rolled from the area's weather table. Saved with the game
Settings Project Settings › Plugins › XenoCore Environment Clock speed, phase hours, the hour a new game starts at, the Change Time fade, the weather types table
Weather types World/DT_XenoCore_WeatherTypes One row per kind of weather (Clear, Rain, Storm): its name and icon, how long it lasts, and how it changes the sky, lights, music and wind
Area weather odds A Data Table (row structure XenoCoreWeatherChanceRow) on the area's Area Definition, for example Maps/Areas/DT_XenoCore_Weather_GaurPlain on DA_XenoCore_Area_GaurPlain The chance of each weather in this area
Environment director XenoCore Environment Director (in Place Actors), one placed per map Moves the map's own sun, sky light, fog and clouds with the clock, and adds rain, lightning, ambience and the night sky
Sky profile World/DA_XenoCore_SkyProfile_Default (data asset) How a day looks: sunrise and sunset hours, the sun's and moon's arcs, per-hour curves for sky light, exposure, fog colour and saturation, the night exposure floor
Change Time screen XenoCoreChangeTimeScreen, the menu's Change Time entry A 24-hour dial; confirm and the screen fades while the clock jumps
Minimap The HUD's Minimap widget The sun or moon on the rim (noon at the top, midnight at the bottom) and the time and weather icon beside the area name

The clock

Pace. One real second is one in-game minute, so a whole day takes 24 minutes. Change it with Minutes Per Second. A new game starts at New Game Start Hour (10:00).

Phases.

Phase Hours (defaults)
Morning 05:00 to 06:00
Day 06:00 to 17:00
Evening 17:00 to 19:00
Night 19:00 to 05:00

Each start hour is a setting (Clock › Phases). Morning, Day and Evening count as daytime, Night as nighttime, which is what the night music asks.

When it stops. The clock runs on game time, so it stops whenever the game pauses (every menu) and slows with slow motion. It also stops during conversations (Pause During Dialogue) and whenever a Blueprint holds it with Add Clock Hold (XenoCore › Time), naming a Reason; Remove Clock Hold with the same reason releases it.

Change Time. From the menu, pick an hour on the dial and confirm. The screen fades out, the clock jumps to the start of that hour, the weather re-rolls, and the screen fades back in. The fade timings are in Clock › Change Time.

The screen draws in C++, so its look is on the class: Font Family (Orbitron by default, used by any of its fonts left without one) and the dial's Sun Texture / Moon Texture (the minimap rim's icons, used when Sun Icon / Moon Icon have no image). All three are soft references loaded when the screen is built. To change them, make a Blueprint child of XenoCoreChangeTimeScreen and point the menu's Change Time entry at it (see UI shell and HUD).

The weather

Per area. Each area's Area Definition (the one the map's XenoCore Map Area actor points at, see Minimap) has a Weather Table: rows of a weather and its Percent. Whatever the rows leave under 100 is Clear, so an area with no table is always clear. Gaur Plain rolls Rain 5% and Storm 2%. A row can be limited to some Phases (none ticked means any phase).

When it re-rolls. When the current weather's duration runs out (Duration Minutes, in in-game minutes), when the clock jumps, and when the phase changes to one the current weather is not allowed in. Travelling to another area keeps the weather if that area allows it.

What it changes. Every look field on a weather type is a scale on top of the time of day: rain at dusk is dusk and rain. A weather type can dim the sun and sky light, thicken the fog, close and darken the clouds, grey and darken the picture, and blow the grass harder (Wind Strength). Rain and Storm also:

  • lower the music (Music Volume Scale, applied to every area music track);
  • play an ambience loop (Ambient Sound);
  • spawn rain round the camera, which stops at the ground and at any roof above, and splashes where it lands;
  • (Storm only) flash lightning with thunder after it.

A change of weather blends in over Blend Seconds; a clock jump or arriving in a map snaps straight to it.

Night

At night the sun's light becomes the moon's: one directional light plays both. The director also draws a moon disc and a starry sky with the Milky Way, and lifts the darkest exposure the camera may pick (Night Exposure Floor EV100 on the sky profile), so night reads as night rather than as a dim afternoon. Area music can switch to a night field track at nightfall: see Give a map its music.

Settings

Setting Where What it does
Minutes Per Second Project Settings › Plugins › XenoCore Environment › Clock Clock speed. 1 is a 24-minute day; 0 stops the clock
New Game Start Hour same The time a new game starts at
Pause During Dialogue same Stop the clock while a conversation is open
Morning / Day / Evening / Night Start Hour … › Clock › Phases The phase boundaries
Change Time Fade Out / Hold / Fade In Seconds … › Clock › Change Time The Change Time fade
Weather Types … › Weather The weather types table. Defaults to DT_XenoCore_WeatherTypes
Weather Table The area's Area Definition › Weather That area's odds
Profile The placed director › Environment Which sky profile the map uses. Empty uses the C++ defaults, a complete day
Light Step Minutes The sky profile › Performance The sun rotates in steps of this many in-game minutes, because each rotation re-renders its shadows. Brightness, fog and sky colour refresh separately, at most every 0.1 s of real time
Sun Actor, Sky Light Actor, Fog Actor, Sky Atmosphere Actor, Cloud Actor The placed director › Environment › Lights / Clouds Which of the map's actors to drive. Empty finds the map's first of each
Wind Collection The placed director › Environment › Wind The material parameter collection your foliage's wind reads
Precipitation Spawn Rate, Rain Color, Splash Color and the Height Map settings The placed director › Environment › Weather How much rain, its colour, and the overhead capture that stops it under cover

Console commands

Command Does
XenoCore.Time.Set <hour> [fade] Set the clock (re-rolls the weather). fade runs the Change Time fade
XenoCore.Time.Scale <multiplier> Run the clock faster: 60 is an hour a second, 1 is normal
XenoCore.Time.Describe Log the time, phase and weather
XenoCore.Weather.Set <Clear\|Rain\|Storm> [lock] [snap] Force the weather. lock holds it until XenoCore.Weather.Reroll; snap skips the blend
XenoCore.Weather.Reroll Release a lock and roll the area's table
XenoCore.Weather.Lightning Flash lightning now
XenoCore.Weather.Tune [Field] [Value] List or change the current weather's and the director's numbers live
XenoCore.Environment.Freeze 1 Stop the director writing lights, to compare with the map as authored
XenoCore.Environment.NightFloor <EV100> Try a night exposure floor without editing the profile

See Console commands.

Events

The clock broadcasts XenoCore.Time.Message.PhaseChanged, XenoCore.Time.Message.HourBlockChanged (every three in-game hours) and XenoCore.Time.Message.Jumped; the weather broadcasts XenoCore.Weather.Message.Changed (old and new weather, and whether it snapped). A Blueprint that should react to nightfall or rain listens for these rather than polling. See Events you can listen to.

Fails silently: a sun that is not Movable

The director can only move a directional light whose Mobility is Movable. A Static or Stationary sun stays where it was placed: the clock runs, the minimap shows the right time, and the sky never changes. A warning is logged at Begin Play. Set the sun to Movable.

Fails silently: a weather name with no row

An area's Weather Table row whose weather has no row in the weather types table rolls, shows nothing on screen and lowers no music. The log shows only the ordinary XenoCoreWeather: … -> … line. Every weather an area can roll needs a row in DT_XenoCore_WeatherTypes, with the same Tag.

Not built yet

  • Different enemies at night (a night roster), and time-gated collectables and NPC schedules.
  • Wet surfaces and a distant rain curtain.
  • Haze at dusk still runs white toward a low sun.

Credits

The night sky uses imagery from the engine's CelestialVault plugin, copied into World/Sky: the Milky Way and the moon from NASA/Goddard Space Flight Center Scientific Visualization Studio, and star data from ESA/Gaia/DPAC (Gaia DR2, CC BY-SA 3.0 IGO). Keep these credits if you ship them.

Next: Give a map its time of day and weather · Give a map its music