Installation & Configuration
Install and configure FS-Weather
Choose the setting that matches what you want players to see:
| Goal | Setting |
|---|---|
| Keep the same weather after a restart | Startup weather and Config.DefaultFreezeWeather |
| Match a real-world time zone | Time synchronization |
| Give staff access without opening controls to everyone | Permissions |
| Trigger blackouts during storms | Storm blackout |
| Find a chat or console command | Commands |
Requirements
oxmysqlFS-Lib
Optional integration
FS-Blackout, only for storm-triggered blackouts.
Installation
Copy the FS-Weather resource folder into your server's resources directory.
Start the required dependencies before FS-Weather in server.cfg:
ensure oxmysql
ensure FS-Lib
ensure FS-WeatherOpen config.lua and adjust the weather, time, forecast, and permission settings for your server.
Restart your server, or restart FS-Weather from the server console. Run /weather and compare the clock and weather with another connected player before adding optional features.
Database
FS-Weather uses sql/fs_weather.sql for weather patterns, pattern state, and weather history. When oxmysql is running, the resource attempts to create or migrate these tables automatically.
If automatic schema creation fails in your environment, import fs_weather.sql manually.
During a database outage, time and random weather continue syncing. The resource retries storage initialization and failed pattern state saves. Saved sequences restore when storage becomes available, unless weather has already been changed or startup weather is frozen.
Weather settings
To slow automatic weather changes, increase Config.WeatherIntervalMinutes (default 20). To slow the game clock, increase Config.TimeMinuteDurationSeconds (default 2, before the time-scale multiplier).
For example, restrict weather controls and change the weather every 30 minutes. Edit the existing settings in config.lua:
Config.UseAcePerms = true
Config.WeatherIntervalMinutes = 30Then grant the ACEs to the groups that should have access. By default, Config.UseAcePerms is false.
Full weather settings reference
Prop
Type
Supported weather types: CLEAR, EXTRASUNNY, CLOUDS, OVERCAST, RAIN, CLEARING, THUNDER, SMOG, FOGGY, XMAS, SNOW, SNOWLIGHT, BLIZZARD, HALLOWEEN, and NEUTRAL.
Startup weather
Choose any supported weather type with Config.DefaultWeather. Config.AllowSnow only controls random selection.
To keep snowy weather with no upcoming forecasts:
Config.DefaultWeather = 'SNOW'
Config.DefaultGroundSnow = true
Config.DefaultFreezeWeather = trueStartup freeze also prevents a saved sequence from replacing your chosen weather. Manual weather changes still work. Turn off Freeze Weather in the dashboard, or call the server export setFreezeWeather(false), to resume forecasts. Freezing weather does not freeze time.
Leave Config.DefaultFreezeWeather = false for automatic weather. A previously active saved sequence can then resume after startup. XMAS always displays ground snow because of GTA's weather behavior.
Random weather chances
The default non-snow chances are:
| Weather | Chance |
|---|---|
| CLEAR | 30% |
| EXTRASUNNY | 25% |
| CLOUDS | 25% |
| OVERCAST | 5% |
| SMOG | 5% |
| FOGGY | 5% |
| CLEARING | 2% |
| RAIN | 2% |
| THUNDER | 1% |
Keep Config.WeatherChances at a total of 100. When Config.AllowSnow is enabled, Config.SnowChance is rolled first; the table applies when snow is not selected. Saved sequences use their own weather and durations. NEUTRAL remains available for startup, manual changes, and patterns, but is excluded from random selection.
Forecasts and syncing
Freezing weather pauses automatic changes and the forecast countdown. Unfreezing resumes the remaining time. The forecast HUD still shows current conditions while frozen, with no upcoming entries.
Players joining during a weather transition use the remaining fade duration. Missed updates and weather drift recover automatically. Recovery timings are internal and need no configuration.
Forecast fog
Config.FogDensity controls the bundled fog overlay. It is separate from the weather type and is ignored for FOGGY. Another resource's active timecycle modifier is left in place.
| Setting | Default | Description |
|---|---|---|
Enabled | true | Enable the fog overlay. |
TimecycleModifier | fs_weather_fog | Bundled fog modifier name. |
DefaultDensity | 0.0 | Starting and manual fallback density. |
MinDensity / MaxDensity | 0.0 / 1.0 | Allowed density range. |
TransitionSeconds | 30 | Fog fade duration. |
RandomChance | 10 | Percent chance an automatic entry gets extra fog. |
RandomMinDensity / RandomMaxDensity | 0.15 / 0.55 | Random fog density range. |
Permissions
Prop
Type
Set Config.UseAcePerms = true to use these permissions. Example server.cfg:
add_ace group.admin fs.weather.admin allow
add_ace group.mod fs.weather.view.weather allow
add_ace group.mod fs.weather.change.weather allowTab permissions grant access to a tab; action permissions control changes.
Time synchronization
Prop
Type
When Config.RealTimeSync.Enabled = true, manual time changes and the time preset commands are ignored.
Daylight saving time is calculated for the supported regions independently of the server host timezone. For a local character creator clock, use the client clock exports. Other players keep the server time.
Temperature settings
Prop
Type
Storm blackout
Storm blackout requires FS-Blackout.
Prop
Type
Weather history
Prop
Type
Debug
Prop
Type
Commands
/weatheropens the weather dashboard./setweather <type> [instant]changes weather using the configured fade. Addinstantto switch immediately./settime <HH:MM>manually sets time when real-time sync is disabled./noonsets time to 12:00 when real-time sync is disabled./morningsets time to 06:00 when real-time sync is disabled./nightsets time to 00:00 when real-time sync is disabled./forecastopens the forecast HUD./closeforecastcloses the forecast HUD./weatherdebugprints client weather and recovery diagnostics to F8.
Exports
See Exports for server and client exports.