FearlessStudios

Configure

Install and configure FS-Weather

Requirements

  • oxmysql
  • FS-Lib

Optional:

  • FS-Blackout 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-Weather

Open config.lua and adjust the weather, time, forecast, and permission settings for your server.

Restart your server, or restart the FS-Weather resource from the server console.

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

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.lua
Config.DefaultWeather = 'SNOW'
Config.DefaultGroundSnow = true
Config.DefaultFreezeWeather = true

Startup 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:

WeatherChance
CLEAR30%
EXTRASUNNY25%
CLOUDS25%
OVERCAST5%
SMOG5%
FOGGY5%
CLEARING2%
RAIN2%
THUNDER1%

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.

SettingDefaultDescription
EnabledtrueEnable the fog overlay.
TimecycleModifierfs_weather_fogBundled fog modifier name.
DefaultDensity0.0Starting and manual fallback density.
MinDensity / MaxDensity0.0 / 1.0Allowed density range.
TransitionSeconds30Fog fade duration.
RandomChance10Percent chance an automatic entry gets extra fog.
RandomMinDensity / RandomMaxDensity0.15 / 0.55Random 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 allow

Tab 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

  • /weather opens the weather dashboard.
  • /setweather <type> [instant] changes weather using the configured fade. Add instant to switch immediately.
  • /settime <HH:MM> manually sets time when real-time sync is disabled.
  • /noon sets time to 12:00 when real-time sync is disabled.
  • /morning sets time to 06:00 when real-time sync is disabled.
  • /night sets time to 00:00 when real-time sync is disabled.
  • /forecast opens the forecast HUD.
  • /closeforecast closes the forecast HUD.
  • /weatherdebug prints client weather and recovery diagnostics to F8.

Exports

See Exports for server and client exports.