Weather
Description
Weather controls rain, snow, clouds, standard and volumetric fog, wind speed and direction, lightning, sandstorms and temperature adjustments. Administrators can configure automatic profiles or select weather manually. Phenomena use native server forecasts and replication; their physical effects are shared with clients.
Configuration
Default configuration
Weather.json
{
"m_Enable": 0,
"m_Logging": 1,
"m_Events": {
"m_Chance": 5,
"m_ChangeTime": 120,
"m_IntervalMin": 1800,
"m_IntervalMax": 3000
},
"m_Fog": {
"m_Default": 3,
"m_VolFogDistance": -1,
"m_VolFogHeight": -1,
"m_VolFogBias": -9999
},
"m_Overcast": {
"m_Default": 20
},
"m_Rain": {
"m_Default": 0,
"m_Threshold": 0.65
},
"m_Snow": {
"m_Default": -1,
"m_Threshold": -1,
"m_UseSnowfallForRain": 0
},
"m_Wind": {
"m_Default": 15,
"m_Speed": 2.5,
"m_Direction": -999
},
"m_Temperature": {
"m_Offset": -1
},
"m_Storm": {
"m_Density": 0.3,
"m_Threshold": 0.9,
"m_Timeout": 90
},
"m_Weathers": [
{
"m_Name": "clear",
"m_Timing": {
"m_ChangeTime": 120,
"m_DurationMin": 2400,
"m_DurationMax": 3600
},
"m_Fog": {
"m_Min": 0,
"m_Max": 5,
"m_VolFogDistanceMin": -1,
"m_VolFogDistanceMax": -1,
"m_VolFogHeightMin": -1,
"m_VolFogHeightMax": -1,
"m_VolFogBiasMin": -9999,
"m_VolFogBiasMax": -9999
},
"m_Overcast": {
"m_Min": 0,
"m_Max": 15
},
"m_Rain": {
"m_Min": 0,
"m_Max": 0,
"m_Threshold": -1
},
"m_Snow": {
"m_Min": -1,
"m_Max": -1,
"m_Threshold": -1
},
"m_Wind": {
"m_Min": 4,
"m_Max": 18,
"m_SpeedMin": 0.5,
"m_SpeedMax": 2.5,
"m_DirectionMin": -180,
"m_DirectionMax": 180
},
"m_Temperature": {
"m_OffsetMin": 0,
"m_OffsetMax": 2
},
"m_Storm": {
"m_Density": 0,
"m_Threshold": -1,
"m_Timeout": -1
},
"m_Sandstorm": {
"m_Enable": 0
}
},
{
"m_Name": "mixed",
"m_Timing": {
"m_ChangeTime": 120,
"m_DurationMin": 1800,
"m_DurationMax": 3000
},
"m_Fog": {
"m_Min": 2,
"m_Max": 10,
"m_VolFogDistanceMin": -1,
"m_VolFogDistanceMax": -1,
"m_VolFogHeightMin": -1,
"m_VolFogHeightMax": -1,
"m_VolFogBiasMin": -9999,
"m_VolFogBiasMax": -9999
},
"m_Overcast": {
"m_Min": 20,
"m_Max": 55
},
"m_Rain": {
"m_Min": 0,
"m_Max": 0,
"m_Threshold": -1
},
"m_Snow": {
"m_Min": -1,
"m_Max": -1,
"m_Threshold": -1
},
"m_Wind": {
"m_Min": 11,
"m_Max": 29,
"m_SpeedMin": 1.5,
"m_SpeedMax": 4,
"m_DirectionMin": -180,
"m_DirectionMax": 180
},
"m_Temperature": {
"m_OffsetMin": 0,
"m_OffsetMax": 1
},
"m_Storm": {
"m_Density": 0,
"m_Threshold": -1,
"m_Timeout": -1
},
"m_Sandstorm": {
"m_Enable": 0
}
},
{
"m_Name": "overcast",
"m_Timing": {
"m_ChangeTime": 420,
"m_DurationMin": 1800,
"m_DurationMax": 2700
},
"m_Fog": {
"m_Min": 5,
"m_Max": 15,
"m_VolFogDistanceMin": -1,
"m_VolFogDistanceMax": -1,
"m_VolFogHeightMin": -1,
"m_VolFogHeightMax": -1,
"m_VolFogBiasMin": -9999,
"m_VolFogBiasMax": -9999
},
"m_Overcast": {
"m_Min": 70,
"m_Max": 95
},
"m_Rain": {
"m_Min": 0,
"m_Max": 0,
"m_Threshold": -1
},
"m_Snow": {
"m_Min": -1,
"m_Max": -1,
"m_Threshold": -1
},
"m_Wind": {
"m_Min": 14,
"m_Max": 36,
"m_SpeedMin": 2,
"m_SpeedMax": 5,
"m_DirectionMin": -180,
"m_DirectionMax": 180
},
"m_Temperature": {
"m_OffsetMin": -1,
"m_OffsetMax": 0
},
"m_Storm": {
"m_Density": 0,
"m_Threshold": -1,
"m_Timeout": -1
},
"m_Sandstorm": {
"m_Enable": 0
}
},
{
"m_Name": "windy",
"m_Timing": {
"m_ChangeTime": 420,
"m_DurationMin": 900,
"m_DurationMax": 1800
},
"m_Fog": {
"m_Min": 0,
"m_Max": 8,
"m_VolFogDistanceMin": -1,
"m_VolFogDistanceMax": -1,
"m_VolFogHeightMin": -1,
"m_VolFogHeightMax": -1,
"m_VolFogBiasMin": -9999,
"m_VolFogBiasMax": -9999
},
"m_Overcast": {
"m_Min": 35,
"m_Max": 70
},
"m_Rain": {
"m_Min": 0,
"m_Max": 0,
"m_Threshold": -1
},
"m_Snow": {
"m_Min": -1,
"m_Max": -1,
"m_Threshold": -1
},
"m_Wind": {
"m_Min": 50,
"m_Max": 86,
"m_SpeedMin": 7,
"m_SpeedMax": 12,
"m_DirectionMin": -180,
"m_DirectionMax": 180
},
"m_Temperature": {
"m_OffsetMin": -1,
"m_OffsetMax": 0
},
"m_Storm": {
"m_Density": 0,
"m_Threshold": -1,
"m_Timeout": -1
},
"m_Sandstorm": {
"m_Enable": 0
}
},
{
"m_Name": "mist",
"m_Timing": {
"m_ChangeTime": 480,
"m_DurationMin": 900,
"m_DurationMax": 1800
},
"m_Fog": {
"m_Min": 20,
"m_Max": 40,
"m_VolFogDistanceMin": 0.08,
"m_VolFogDistanceMax": 0.15,
"m_VolFogHeightMin": 0.1,
"m_VolFogHeightMax": 0.2,
"m_VolFogBiasMin": -9999,
"m_VolFogBiasMax": -9999
},
"m_Overcast": {
"m_Min": 35,
"m_Max": 65
},
"m_Rain": {
"m_Min": 0,
"m_Max": 0,
"m_Threshold": -1
},
"m_Snow": {
"m_Min": -1,
"m_Max": -1,
"m_Threshold": -1
},
"m_Wind": {
"m_Min": 4,
"m_Max": 14,
"m_SpeedMin": 0.5,
"m_SpeedMax": 2,
"m_DirectionMin": -180,
"m_DirectionMax": 180
},
"m_Temperature": {
"m_OffsetMin": -1,
"m_OffsetMax": 0
},
"m_Storm": {
"m_Density": 0,
"m_Threshold": -1,
"m_Timeout": -1
},
"m_Sandstorm": {
"m_Enable": 0
}
},
{
"m_Name": "fog",
"m_Timing": {
"m_ChangeTime": 600,
"m_DurationMin": 600,
"m_DurationMax": 1200
},
"m_Fog": {
"m_Min": 45,
"m_Max": 65,
"m_VolFogDistanceMin": 0.15,
"m_VolFogDistanceMax": 0.3,
"m_VolFogHeightMin": 0.2,
"m_VolFogHeightMax": 0.35,
"m_VolFogBiasMin": -9999,
"m_VolFogBiasMax": -9999
},
"m_Overcast": {
"m_Min": 50,
"m_Max": 80
},
"m_Rain": {
"m_Min": 0,
"m_Max": 0,
"m_Threshold": -1
},
"m_Snow": {
"m_Min": -1,
"m_Max": -1,
"m_Threshold": -1
},
"m_Wind": {
"m_Min": 2,
"m_Max": 11,
"m_SpeedMin": 0.3,
"m_SpeedMax": 1.5,
"m_DirectionMin": -180,
"m_DirectionMax": 180
},
"m_Temperature": {
"m_OffsetMin": -2,
"m_OffsetMax": -1
},
"m_Storm": {
"m_Density": 0,
"m_Threshold": -1,
"m_Timeout": -1
},
"m_Sandstorm": {
"m_Enable": 0
}
},
{
"m_Name": "drizzle",
"m_Timing": {
"m_ChangeTime": 420,
"m_DurationMin": 900,
"m_DurationMax": 1800
},
"m_Fog": {
"m_Min": 10,
"m_Max": 20,
"m_VolFogDistanceMin": -1,
"m_VolFogDistanceMax": -1,
"m_VolFogHeightMin": -1,
"m_VolFogHeightMax": -1,
"m_VolFogBiasMin": -9999,
"m_VolFogBiasMax": -9999
},
"m_Overcast": {
"m_Min": 65,
"m_Max": 85
},
"m_Rain": {
"m_Min": 5,
"m_Max": 20,
"m_Threshold": -1
},
"m_Snow": {
"m_Min": -1,
"m_Max": -1,
"m_Threshold": -1
},
"m_Wind": {
"m_Min": 14,
"m_Max": 29,
"m_SpeedMin": 2,
"m_SpeedMax": 4,
"m_DirectionMin": -180,
"m_DirectionMax": 180
},
"m_Temperature": {
"m_OffsetMin": -1,
"m_OffsetMax": 0
},
"m_Storm": {
"m_Density": 0,
"m_Threshold": -1,
"m_Timeout": -1
},
"m_Sandstorm": {
"m_Enable": 0
}
},
{
"m_Name": "rain",
"m_Timing": {
"m_ChangeTime": 480,
"m_DurationMin": 900,
"m_DurationMax": 1800
},
"m_Fog": {
"m_Min": 12,
"m_Max": 25,
"m_VolFogDistanceMin": -1,
"m_VolFogDistanceMax": -1,
"m_VolFogHeightMin": -1,
"m_VolFogHeightMax": -1,
"m_VolFogBiasMin": -9999,
"m_VolFogBiasMax": -9999
},
"m_Overcast": {
"m_Min": 80,
"m_Max": 95
},
"m_Rain": {
"m_Min": 30,
"m_Max": 60,
"m_Threshold": -1
},
"m_Snow": {
"m_Min": -1,
"m_Max": -1,
"m_Threshold": -1
},
"m_Wind": {
"m_Min": 21,
"m_Max": 50,
"m_SpeedMin": 3,
"m_SpeedMax": 7,
"m_DirectionMin": -180,
"m_DirectionMax": 180
},
"m_Temperature": {
"m_OffsetMin": -2,
"m_OffsetMax": -1
},
"m_Storm": {
"m_Density": 0,
"m_Threshold": -1,
"m_Timeout": -1
},
"m_Sandstorm": {
"m_Enable": 0
}
},
{
"m_Name": "storm",
"m_Timing": {
"m_ChangeTime": 600,
"m_DurationMin": 600,
"m_DurationMax": 1200
},
"m_Fog": {
"m_Min": 15,
"m_Max": 30,
"m_VolFogDistanceMin": -1,
"m_VolFogDistanceMax": -1,
"m_VolFogHeightMin": -1,
"m_VolFogHeightMax": -1,
"m_VolFogBiasMin": -9999,
"m_VolFogBiasMax": -9999
},
"m_Overcast": {
"m_Min": 95,
"m_Max": 100
},
"m_Rain": {
"m_Min": 65,
"m_Max": 90,
"m_Threshold": -1
},
"m_Snow": {
"m_Min": -1,
"m_Max": -1,
"m_Threshold": -1
},
"m_Wind": {
"m_Min": 57,
"m_Max": 100,
"m_SpeedMin": 8,
"m_SpeedMax": 14,
"m_DirectionMin": -180,
"m_DirectionMax": 180
},
"m_Temperature": {
"m_OffsetMin": -3,
"m_OffsetMax": -1
},
"m_Storm": {
"m_Density": 0.65,
"m_Threshold": 0.85,
"m_Timeout": 60
},
"m_Sandstorm": {
"m_Enable": 0
}
}
]
}All configuration groups are required. Missing groups or invalid values prevent initialization before the module takes over weather. Server and clients must use the same module version. Avoid other scripts changing the same phenomena.
Options
| Option | Type | Description |
|---|---|---|
m_Enable | bool | With 1, enables the module after validating configuration; with 0, disables it. |
m_Logging | bool | With 1, logs initialization, shutdown, weather changes and commands that change weather; with 0, disables these entries. Initialization failures, native sandstorm rejections and console responses are still logged. |
m_Events | object | Global selection and timing. |
m_Fog | object | Standard and volumetric fog. |
m_Overcast | object | Cloud cover. |
m_Rain | object | Rain and cloud threshold. |
m_Snow | object | Snow and global rain conversion. |
m_Wind | object | Wind speed and direction. |
m_Temperature | object | Native temperature adjustment. |
m_Storm | object | Lightning parameters. |
m_Weathers | array<object> | Profiles for random or manual selection. |
m_Events
| Option | Type | Description |
|---|---|---|
m_Chance | int | Percentage chance of selecting a profile per cycle, from 0 to 100. With 0, cycles use default weather. |
m_ChangeTime | int | Global transition in seconds, from 0 to 86400; 0 applies immediately. |
m_IntervalMin | int | Minimum hold time for default weather after transition, from 1 to 86400 seconds. |
m_IntervalMax | int | Maximum hold time for default weather after transition, from 1 to 86400 seconds. |
Intervals and durations use game timer seconds, independently of calendar acceleration. In automatic mode, each cycle lasts for the transition plus the randomly selected hold time. The next selection may choose another profile or default weather; there is no required sequence or additional persistence across restarts.
m_Fog
| Option | Type | Description |
|---|---|---|
m_Default | int | Default intensity from 0 to 100%. |
m_VolFogDistance | float | Volumetric fog distance density, from 0 to 1. With -1, uses the map calculation. |
m_VolFogHeight | float | Volumetric fog height density, from 0 to 1. With -1, uses the map calculation. |
m_VolFogBias | float | Volumetric fog reference height, from -10000 to 10000 metres. With -9999, uses the map calculation. |
m_Overcast
| Option | Type | Description |
|---|---|---|
m_Default | int | Default intensity from 0 to 100%. |
m_Rain
| Option | Type | Description |
|---|---|---|
m_Default | int | Default intensity from 0 to 100%. |
m_Threshold | float | Minimum cloud cover from 0 to 1; -1 uses the native map threshold. |
m_Snow
| Option | Type | Description |
|---|---|---|
m_Threshold | float | Minimum cloud cover from 0 to 1; -1 uses the native map threshold. |
m_Default | float | Default intensity from 0 to 100%. With -1, uses no snow or converts rain when m_UseSnowfallForRain is enabled. |
m_UseSnowfallForRain | bool | With 1, converts rain to snow when resolved snow intensity is -1 and clears converted rain; with 0, disables conversion. Also selects native snow references for volumetric fog and lightning. |
m_Wind
| Option | Type | Description |
|---|---|---|
m_Default | int | Percentage from 0 to 100 of the calculated wind maximum, used when m_Speed is -1. |
m_Speed | float | Speed from 0 to 100 m/s; -1 uses the m_Default percentage. |
m_Direction | float | Direction from -180 to 180 degrees; -999 preserves the current native direction. |
m_Temperature
| Option | Type | Description |
|---|---|---|
m_Offset | float | Adjustment from -100 to 100 °C relative to native temperature. With 0, preserves the native temperature curve. |
m_Storm
| Option | Type | Description |
|---|---|---|
m_Density | float | Lightning density from 0 to 1. |
m_Threshold | float | Cloud threshold from 0 to 1; -1 uses the native storm or snow threshold according to global conversion. |
m_Timeout | float | Minimum interval between lightning strikes from 1 to 86400 seconds. |
m_Weathers[]
| Option | Type | Description |
|---|---|---|
m_Name | string | Unique nonempty name, matched exactly by /weather set. |
m_Timing | object | Profile timing. |
m_Fog | object | Standard and volumetric fog. |
m_Overcast | object | Cloud cover. |
m_Rain | object | Rain and cloud threshold. |
m_Snow | object | Snow and global rain conversion. |
m_Wind | object | Wind speed and direction. |
m_Temperature | object | Native temperature adjustment. |
m_Storm | object | Lightning parameters. |
m_Sandstorm | object | Sandstorm request. |
All groups in each profile are required. Names must be unique and nonempty. Each minimum must be less than or equal to its maximum; to inherit values, both bounds must use the same special marker. When m_Events.m_Chance is greater than 0, keep at least one profile.
m_Weathers[].m_Timing
| Option | Type | Description |
|---|---|---|
m_ChangeTime | float | Transition in seconds, from 0 to 86400; -1 inherits m_Events.m_ChangeTime. |
m_DurationMin | int | Minimum hold time after transition, from 1 to 86400 seconds. |
m_DurationMax | int | Maximum hold time after transition, from 1 to 86400 seconds. |
m_Weathers[].m_Fog
| Option | Type | Description |
|---|---|---|
m_Min | int | Minimum random intensity, from 0 to 100%. |
m_VolFogDistanceMin | float | Bound for random distance density, from 0 to 1. Both bounds set to -1 inherit m_Fog.m_VolFogDistance. |
m_VolFogHeightMin | float | Bound for random height density, from 0 to 1. Both bounds set to -1 inherit m_Fog.m_VolFogHeight. |
m_VolFogBiasMin | float | Bound for random reference height, from -10000 to 10000 metres. Both bounds set to -9999 inherit m_Fog.m_VolFogBias. |
m_Max | int | Maximum random intensity, from 0 to 100%. |
m_VolFogDistanceMax | float | Bound for random distance density, from 0 to 1. Both bounds set to -1 inherit m_Fog.m_VolFogDistance. |
m_VolFogHeightMax | float | Bound for random height density, from 0 to 1. Both bounds set to -1 inherit m_Fog.m_VolFogHeight. |
m_VolFogBiasMax | float | Bound for random reference height, from -10000 to 10000 metres. Both bounds set to -9999 inherit m_Fog.m_VolFogBias. |
m_Weathers[].m_Overcast
| Option | Type | Description |
|---|---|---|
m_Min | int | Minimum random intensity, from 0 to 100%. |
m_Max | int | Maximum random intensity, from 0 to 100%. |
m_Weathers[].m_Rain
| Option | Type | Description |
|---|---|---|
m_Min | int | Minimum random intensity, from 0 to 100%. |
m_Max | int | Maximum random intensity, from 0 to 100%. |
m_Threshold | float | Overrides m_Rain.m_Threshold, from 0 to 1; -1 inherits the global value. |
m_Weathers[].m_Snow
| Option | Type | Description |
|---|---|---|
m_Min | float | Minimum random intensity, from 0 to 100%. Both bounds set to -1 inherit m_Snow.m_Default. |
m_Max | float | Maximum random intensity, from 0 to 100%. Both bounds set to -1 inherit m_Snow.m_Default. |
m_Threshold | float | Overrides m_Snow.m_Threshold, from 0 to 1; -1 inherits the global value. |
m_Weathers[].m_Wind
| Option | Type | Description |
|---|---|---|
m_Min | int | Minimum random percentage, from 0 to 100% of the calculated wind maximum, used when speed bounds are -1. |
m_SpeedMin | float | Bound for random speed, from 0 to 100 m/s. Both bounds set to -1 use this profile’s percentage. |
m_DirectionMin | float | Bound for random direction, from -180 to 180 degrees. Both bounds set to -999 inherit m_Wind.m_Direction. |
m_Max | int | Maximum random percentage, from 0 to 100% of the calculated wind maximum, used when speed bounds are -1. |
m_SpeedMax | float | Bound for random speed, from 0 to 100 m/s. Both bounds set to -1 use this profile’s percentage. |
m_DirectionMax | float | Bound for random direction, from -180 to 180 degrees. Both bounds set to -999 inherit m_Wind.m_Direction. |
m_Weathers[].m_Temperature
| Option | Type | Description |
|---|---|---|
m_OffsetMin | float | Minimum random adjustment, from -100 to 100 °C relative to native temperature. |
m_OffsetMax | float | Maximum random adjustment, from -100 to 100 °C relative to native temperature. |
m_Weathers[].m_Storm
| Option | Type | Description |
|---|---|---|
m_Density | float | Overrides m_Storm.m_Density, from 0 to 1; -1 inherits the global value. |
m_Threshold | float | Overrides m_Storm.m_Threshold, from 0 to 1; -1 inherits the global value. |
m_Timeout | float | Overrides m_Storm.m_Timeout, from 1 to 86400 seconds; -1 inherits the global value. |
m_Weathers[].m_Sandstorm
| Option | Type | Description |
|---|---|---|
m_Enable | bool | With 1, requests a sandstorm from the native controller; with 0, does not request one. Requires map support and the engine’s minimum wind speed. |
The wind maximum is the largest of the native maximum and configured global and profile speeds. Precipitation may raise cloud cover to the configured threshold above the randomly selected range. Explicit snow, including 0, preserves rain and does not trigger conversion. Volumetric fog requires terrain support; inherited values use map calculations.
Unsupported sandstorm profiles are excluded from random selection and /weather list. Sandstorms use the native lifecycle, adjust wind and clouds to engine requirements and clear rain and snow. The event completes its route even in manual mode. Temperature adjustments are relative to native temperature, preserving calendar, altitude, shelter and equipment rules. Manual watering requires unfrozen water and a dry garden slot without a plant.
On disable or reload, the module removes its temperature adjustment, ends sandstorms under its control and restores captured weather state. Precipitation thresholds and lightning parameters have no native getters, so earlier changes by other mods to these parameters cannot be restored exactly.
Commands
/weather start
Starts a random supported profile and enters manual mode, suspending automatic selection.
- Syntax:
/weather start - Permission:
command.weather - Example:
/weather start
/weather set
Selects exactly the profile supplied by the required <name> argument and enters manual mode. Unknown or unsupported names are rejected, preserving the previous weather and mode.
- Syntax:
/weather set <name> - Permission:
command.weather - Example:
/weather set storm
/weather stop
Returns to default weather from global groups and stays in manual mode. Use /weather auto to resume automatic selection.
- Syntax:
/weather stop - Permission:
command.weather - Example:
/weather stop
/weather auto
Resumes automatic selection and immediately starts a new cycle.
- Syntax:
/weather auto - Permission:
command.weather - Example:
/weather auto
/weather status
Reports the profile, mode, current values and forecasts, wind, temperature, temperature offset, remaining times, volumetric fog, lightning parameters and sandstorm state. When available, includes player environment temperature, heat comfort and thermal bias. Does not change weather. The player receives a 30-second notification; without a player, the report goes to the log.
- Syntax:
/weather status - Permission:
command.weather - Example:
/weather status
/weather list
Lists names of profiles supported by the map without changing weather.
- Syntax:
/weather list - Permission:
command.weather - Example:
/weather list
Permissions
The command.weather permission authorizes all subcommands for players and is checked on the server. Add it to the administrative group’s m_Groups[].m_Permissions in Permissions. To submit commands through Chat, enable that feature in the Chat module. The core console and command file can execute commands without a player. Weather must be enabled and initialized with valid configuration.
