Tutorial / Admin panels > Utilities
Day/Night & Weather
Run a day and night cycle with weather for everyone, set the time and weather, and choose your own rain, sound and clock options.
What it does
Day/Night & Weather gives the server a day and night cycle with weather. The screen gets darker at night, and fog, cloud, rain, thunderstorms or snow come and go. Maps with a painted sky, such as gm_construct and gm_flatgrass, also get a changing sky with stars at night.
Rain and snow fall only where there is open sky, and stop where they hit something. In a thunderstorm the screen flashes when you are outside, and thunder follows a moment later.
The panel has three parts. Superadmins set up the cycle. Admins and players with access set the time and the weather. Everyone sets their own view at the bottom.
Where to find it
Q menu > KGX's Admin Toolbox > Utilities > Day/Night & Weather.
- Cycle settings and the Automatic weather may pick list: superadmins only.
- Time of day and Weather now: admins, or players ticked for Day/Night & Weather in Player Access. Others see "Only admins (or players given access) can change the time and weather."
- Your own view: everyone.
The panel
A status line at the top shows the time and weather, for example "Now: 21:30, rain", with "(clock stopped)" when stopped. When the cycle is off it reads "The day/night cycle is off."
Cycle settings (superadmins)
| Option | Setting | Default | Range |
|---|---|---|---|
| Day/night cycle and weather on | kgxat_env |
Off | |
| Minutes for a whole day | kgxat_env_cycle |
30 | 2-240 |
| Night darkness (0-100) | kgxat_env_night |
70 | 0-100 |
| Weather changes by itself | kgxat_env_weather_auto |
Off | |
| Minutes between weather changes | kgxat_env_weather_minutes |
20 | 2-240 |
| Also darken the map's own light (short hitch when it changes) | kgxat_env_lighting |
Off | |
| Apply the numbers above | Sends the sliders to the server. |
Time of day
| Option | What it does | Range |
|---|---|---|
| Hour | The hour to set, in tenths. | 0-23.99 |
| Set this time | Sets the clock to the hour. | |
| Dawn, Noon, Dusk, Night | Set 06:00, 12:00, 18:30 or 23:00. | |
| Stop / start the clock | Stops the clock at the current hour, or starts it again. |
Weather now
| Option | What it does |
|---|---|
| Clear, Cloudy, Fog, Rain, Thunderstorm, Snow | Sets the weather at once. |
Automatic weather may pick (superadmins)
| Option | What it does | Default |
|---|---|---|
| Clear, Cloudy, Fog, Rain, Thunderstorm, Snow | Which kinds automatic weather may choose. | All on except Snow |
Your own view
| Option | What it does | Default | Range |
|---|---|---|---|
| Show rain, snow and lightning | kgxat_weather_effects. Darkness and fog always follow the server. |
On | |
| Rain and thunder sounds | kgxat_weather_sounds |
On | |
| Show the time of day at the top right | kgxat_env_clock. Shows the time and any weather while the cycle is on. |
Off | |
| Play sound/music zones | kgxat_zone_sounds |
On | |
| Sound/music zone volume | kgxat_zonesound_volume |
100 | 0-100 |
How to use it
Turn on a day and night cycle
- As a superadmin, open Utilities > Day/Night & Weather.
- Tick Day/night cycle and weather on.
- Set Minutes for a whole day, for example 60, and click Apply the numbers above.
- Tick Weather changes by itself if you want random weather.
Set up a night scene for an event
- Click Night under Time of day.
- Click Stop / start the clock so the night stays.
- Click Fog or Thunderstorm under Weather now.
- When the event ends, click Stop / start the clock again.
Allow snow in automatic weather
- As a superadmin, tick Snow under Automatic weather may pick.
- Untick kinds you do not want, such as Thunderstorm.
Settings and commands
| Command | Who | What it does |
|---|---|---|
kgxat_settime <hour> |
Superadmins, server console | Sets the time, for example kgxat_settime 21.5. |
kgxat_setweather <clear|cloudy|fog|rain|storm|snow> |
Superadmins, server console | Sets the weather. |
kgxat_fast_draw 0/1 |
Anyone, on their own game | 1 (default) = rain is drawn as one batch of lines; 0 = line by line (as before v3.6.11.4). |
The cycle settings are the console variables in the cycle settings table above.
Tips and limits
- Darkness is full from 20:00 to 05:00 and daylight is full from 08:00 to 17:00. Dawn and dusk blend in between.
- Changing the cycle length does not make the clock jump.
- Automatic weather favors clear weather; storms and snow come less often.
- Thunder only sounds in a thunderstorm, every 12 to 40 seconds.
- The hour and weather are saved when the server shuts down and come back on the next start. The allowed weather list is saved at once.
- Settings are stored in
data/kgx_admin_toolbox/environment.json. - Setting the time and weather is written to the Action Log.