Skip to content

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
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 ​

OptionTypeDescription
m_EnableboolWith 1, enables the module after validating configuration; with 0, disables it.
m_LoggingboolWith 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_EventsobjectGlobal selection and timing.
m_FogobjectStandard and volumetric fog.
m_OvercastobjectCloud cover.
m_RainobjectRain and cloud threshold.
m_SnowobjectSnow and global rain conversion.
m_WindobjectWind speed and direction.
m_TemperatureobjectNative temperature adjustment.
m_StormobjectLightning parameters.
m_Weathersarray<object>Profiles for random or manual selection.

m_Events ​

OptionTypeDescription
m_ChanceintPercentage chance of selecting a profile per cycle, from 0 to 100. With 0, cycles use default weather.
m_ChangeTimeintGlobal transition in seconds, from 0 to 86400; 0 applies immediately.
m_IntervalMinintMinimum hold time for default weather after transition, from 1 to 86400 seconds.
m_IntervalMaxintMaximum 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 ​

OptionTypeDescription
m_DefaultintDefault intensity from 0 to 100%.
m_VolFogDistancefloatVolumetric fog distance density, from 0 to 1. With -1, uses the map calculation.
m_VolFogHeightfloatVolumetric fog height density, from 0 to 1. With -1, uses the map calculation.
m_VolFogBiasfloatVolumetric fog reference height, from -10000 to 10000 metres. With -9999, uses the map calculation.

m_Overcast ​

OptionTypeDescription
m_DefaultintDefault intensity from 0 to 100%.

m_Rain ​

OptionTypeDescription
m_DefaultintDefault intensity from 0 to 100%.
m_ThresholdfloatMinimum cloud cover from 0 to 1; -1 uses the native map threshold.

m_Snow ​

OptionTypeDescription
m_ThresholdfloatMinimum cloud cover from 0 to 1; -1 uses the native map threshold.
m_DefaultfloatDefault intensity from 0 to 100%. With -1, uses no snow or converts rain when m_UseSnowfallForRain is enabled.
m_UseSnowfallForRainboolWith 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 ​

OptionTypeDescription
m_DefaultintPercentage from 0 to 100 of the calculated wind maximum, used when m_Speed is -1.
m_SpeedfloatSpeed from 0 to 100 m/s; -1 uses the m_Default percentage.
m_DirectionfloatDirection from -180 to 180 degrees; -999 preserves the current native direction.

m_Temperature ​

OptionTypeDescription
m_OffsetfloatAdjustment from -100 to 100 °C relative to native temperature. With 0, preserves the native temperature curve.

m_Storm ​

OptionTypeDescription
m_DensityfloatLightning density from 0 to 1.
m_ThresholdfloatCloud threshold from 0 to 1; -1 uses the native storm or snow threshold according to global conversion.
m_TimeoutfloatMinimum interval between lightning strikes from 1 to 86400 seconds.

m_Weathers[] ​

OptionTypeDescription
m_NamestringUnique nonempty name, matched exactly by /weather set.
m_TimingobjectProfile timing.
m_FogobjectStandard and volumetric fog.
m_OvercastobjectCloud cover.
m_RainobjectRain and cloud threshold.
m_SnowobjectSnow and global rain conversion.
m_WindobjectWind speed and direction.
m_TemperatureobjectNative temperature adjustment.
m_StormobjectLightning parameters.
m_SandstormobjectSandstorm 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 ​

OptionTypeDescription
m_ChangeTimefloatTransition in seconds, from 0 to 86400; -1 inherits m_Events.m_ChangeTime.
m_DurationMinintMinimum hold time after transition, from 1 to 86400 seconds.
m_DurationMaxintMaximum hold time after transition, from 1 to 86400 seconds.

m_Weathers[].m_Fog ​

OptionTypeDescription
m_MinintMinimum random intensity, from 0 to 100%.
m_VolFogDistanceMinfloatBound for random distance density, from 0 to 1. Both bounds set to -1 inherit m_Fog.m_VolFogDistance.
m_VolFogHeightMinfloatBound for random height density, from 0 to 1. Both bounds set to -1 inherit m_Fog.m_VolFogHeight.
m_VolFogBiasMinfloatBound for random reference height, from -10000 to 10000 metres. Both bounds set to -9999 inherit m_Fog.m_VolFogBias.
m_MaxintMaximum random intensity, from 0 to 100%.
m_VolFogDistanceMaxfloatBound for random distance density, from 0 to 1. Both bounds set to -1 inherit m_Fog.m_VolFogDistance.
m_VolFogHeightMaxfloatBound for random height density, from 0 to 1. Both bounds set to -1 inherit m_Fog.m_VolFogHeight.
m_VolFogBiasMaxfloatBound for random reference height, from -10000 to 10000 metres. Both bounds set to -9999 inherit m_Fog.m_VolFogBias.

m_Weathers[].m_Overcast ​

OptionTypeDescription
m_MinintMinimum random intensity, from 0 to 100%.
m_MaxintMaximum random intensity, from 0 to 100%.

m_Weathers[].m_Rain ​

OptionTypeDescription
m_MinintMinimum random intensity, from 0 to 100%.
m_MaxintMaximum random intensity, from 0 to 100%.
m_ThresholdfloatOverrides m_Rain.m_Threshold, from 0 to 1; -1 inherits the global value.

m_Weathers[].m_Snow ​

OptionTypeDescription
m_MinfloatMinimum random intensity, from 0 to 100%. Both bounds set to -1 inherit m_Snow.m_Default.
m_MaxfloatMaximum random intensity, from 0 to 100%. Both bounds set to -1 inherit m_Snow.m_Default.
m_ThresholdfloatOverrides m_Snow.m_Threshold, from 0 to 1; -1 inherits the global value.

m_Weathers[].m_Wind ​

OptionTypeDescription
m_MinintMinimum random percentage, from 0 to 100% of the calculated wind maximum, used when speed bounds are -1.
m_SpeedMinfloatBound for random speed, from 0 to 100 m/s. Both bounds set to -1 use this profile’s percentage.
m_DirectionMinfloatBound for random direction, from -180 to 180 degrees. Both bounds set to -999 inherit m_Wind.m_Direction.
m_MaxintMaximum random percentage, from 0 to 100% of the calculated wind maximum, used when speed bounds are -1.
m_SpeedMaxfloatBound for random speed, from 0 to 100 m/s. Both bounds set to -1 use this profile’s percentage.
m_DirectionMaxfloatBound for random direction, from -180 to 180 degrees. Both bounds set to -999 inherit m_Wind.m_Direction.

m_Weathers[].m_Temperature ​

OptionTypeDescription
m_OffsetMinfloatMinimum random adjustment, from -100 to 100 °C relative to native temperature.
m_OffsetMaxfloatMaximum random adjustment, from -100 to 100 °C relative to native temperature.

m_Weathers[].m_Storm ​

OptionTypeDescription
m_DensityfloatOverrides m_Storm.m_Density, from 0 to 1; -1 inherits the global value.
m_ThresholdfloatOverrides m_Storm.m_Threshold, from 0 to 1; -1 inherits the global value.
m_TimeoutfloatOverrides m_Storm.m_Timeout, from 1 to 86400 seconds; -1 inherits the global value.

m_Weathers[].m_Sandstorm ​

OptionTypeDescription
m_EnableboolWith 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.

Released under the MIT License.