NX CreativeNX CreativeDocs
ScriptsFourseasons

Configuration

Every entry in shared/config.lua. Defaults, types, and purpose.

All settings live in shared/config.lua. The file is in escrow_ignore so it remains editable after install. Event name constants and locale strings live in shared/constants.lua and the Config.Locale table respectively.

Core

Config.Frameworkstringdefault: 'ESX'

Framework identifier. One of 'ESX', 'QB'.

Config.Targetstringdefault: 'OX'

Target resource identifier. One of 'OX', 'QB'.

Config.Languagestringdefault: 'en'

Active language for UI and notifications. Shipped: 'en', 'fi'.

Config.NotificationSystemstringdefault: 'ox_lib'

Notification backend. One of 'ox_lib', 'esx', 'qb', 'custom'.

Config.CustomNotifyfunction | nildefault: nil

Optional function invoked when NotificationSystem = 'custom'. Signature: function(title, message, type, duration).

Config.AdminIdentifiersstring[]default: {}

Optional list of raw identifiers (license, steam, discord) treated as admin outside the framework's group system.

Config.AdminKeybindtabledefault: { enabled = false, key = 'F7' }

Keybind that opens the admin menu. When enabled, registered through lib.addKeybind.

Config.Debugbooleandefault: false

Enables verbose debug logging and unlocks debug-only commands (see Commands page).

Config.EnableLoggingbooleandefault: true

When true, the optional analytics tables are created and weather changes are logged.

Weather system toggles

Config.EnableSeasonsbooleandefault: true

Master toggle for the seasonal cycle. If false, season stays fixed on Config.DefaultSeason.

Config.EnableWarningsbooleandefault: true

Broadcast in-world weather warnings during severe weather.

Config.EnableWarningSoundsbooleandefault: false

Play the warning sound FX alongside the text warning.

Config.EnableWeatherEffectsbooleandefault: true

Apply road traction, visual overlays, and weather-driven FX on clients.

Config.EnableTemperatureSystembooleandefault: true

Calculate and broadcast temperature. Required for shivering, cold breath, and heatwave effects.

Config.DefaultSeasonstringdefault: 'SUMMER'

Season used when EnableSeasons is false, or the initial season at first start.

Config.WeatherChanceMultiplierstabledefault: { WetWeather = 0.6, SpringThunderEvent = 0.5 }

0.01 to 1.0 multipliers. WetWeather tunes random RAIN/THUNDER frequency. SpringThunderEvent tunes the spring thunderstorm seasonal event.

Config.InitialSeasonalEventCheckDelayMinutesnumberdefault: 30

Minutes after resource start before the first seasonal event roll.

Gameplay flooding

Subtle low-street flooding tied to the weather cycle. Separate from the admin-only extreme flooding used for testing. Requires Config.StormSystems.Enabled = true.

Config.GameplayFlooding.Enabledbooleandefault: false

Master toggle for gameplay flooding.

Config.GameplayFlooding.AutoResetbooleandefault: true

Automatically reset water after the profile duration expires.

Config.GameplayFlooding.CooldownMinutesnumberdefault: 180

Minimum time between gameplay flood triggers.

Config.GameplayFlooding.DurationCheckIntervalSecondsnumberdefault: 30

How often the server checks whether the active flood should expire.

Config.GameplayFlooding.Profilestable

Flood profile definitions keyed by id. Shipped: subtle, moderate, strong. Each profile: { maxFloodHeight, increaseRate, threadWait, durationMinutes }.

Config.GameplayFlooding.ProfileWeightstabledefault: { subtle = 0.78, moderate = 0.20, strong = 0.02 }

Weighted selection when a profile is picked automatically.

Config.GameplayFlooding.SeasonRulestable

Per-season trigger rules. Shipped: SPRING (THUNDER, minIntensity 0.72, triggerChance 0.35) and FALL (RAIN or THUNDER, minIntensity 0.80, triggerChance 0.20).

Storm systems

Blackout pulses, lightning strike FX, and ocean wave simulation.

Config.StormSystems.Enabledbooleandefault: true

Master toggle for all storm systems.

Config.StormSystems.SyncIntervalSecondsnumberdefault: 2

Server to client cadence for storm state broadcasts.

Blackout

Config.StormSystems.Blackout.Enabledbooleandefault: true
Config.StormSystems.Blackout.MinIntensitynumberdefault: 0.72

Fallback intensity threshold for weather types not listed in EligibleWeather.

Config.StormSystems.Blackout.EligibleWeathertabledefault: { THUNDER = { minIntensity = 0.72 }, RAIN = { minIntensity = 0.88 }, BLIZZARD = { minIntensity = 0.72 } }

Per-weather minimum intensity required for blackout pulses to fire.

Config.StormSystems.Blackout.PulseMinSecondsnumberdefault: 6
Config.StormSystems.Blackout.PulseMaxSecondsnumberdefault: 14
Config.StormSystems.Blackout.CooldownMinSecondsnumberdefault: 20
Config.StormSystems.Blackout.CooldownMaxSecondsnumberdefault: 45
Config.StormSystems.Blackout.VehicleLightsbooleandefault: false

When false, vehicle lights are disabled during blackout pulses.

Strike FX

Config.StormSystems.StrikeFx.Enabledbooleandefault: true
Config.StormSystems.StrikeFx.MinIntensitynumberdefault: 0.65
Config.StormSystems.StrikeFx.ChancePerSyncnumberdefault: 0.18

Probability of a strike FX broadcast on each sync interval while storm logic is active.

Config.StormSystems.StrikeFx.MinIntervalSecondsnumberdefault: 6

Hard cooldown between strike FX broadcasts.

Config.StormSystems.StrikeFx.MinDistanceFromTargetnumberdefault: 25.0
Config.StormSystems.StrikeFx.MaxDistanceFromTargetnumberdefault: 120.0

Ocean

Config.StormSystems.Ocean.Enabledbooleandefault: true
Config.StormSystems.Ocean.Modestringdefault: 'coastal'

'coastal' applies only when the player is near water. 'global' always applies.

Config.StormSystems.Ocean.UpdateIntervalMsnumberdefault: 2500
Config.StormSystems.Ocean.DetectionRadiusnumberdefault: 90.0
Config.StormSystems.Ocean.ProbeDepthnumberdefault: 24.0
Config.StormSystems.Ocean.DefaultScalernumberdefault: 1.0
Config.StormSystems.Ocean.Presetstabledefault: { calm = 1.0, normal = 1.3, rough = 1.6, storm = 2.0, experimental = 4.0 }

Named scaler presets usable from the admin menu and the STORM_SET_OCEAN_OVERRIDE event.

Config.StormSystems.Ocean.WeatherScalerstable

Per-weather automatic scaler. Keys mirror GTA weather types (CLEAR, RAIN, THUNDER, SNOW, BLIZZARD, etc.). Values multiply the base wave height.

Config.StormSystems.Ocean.BoatPhysicstabledefault: { Enabled = true, RoughThreshold = 1.35, StormThreshold = 1.8, RoughMaxSpeedMultiplier = 0.88, StormMaxSpeedMultiplier = 0.75, TurbulenceForce = 0.15, TurbulenceIntervalMs = 850 }

Optional boat penalties under rough seas. Thresholds are scaler values, multipliers clamp max speed, TurbulenceForce adds periodic impulse.

UI

Config.UI.EnableForecastbooleandefault: true

Enable the /forecast command and the newspaper-stand forecast interaction.

Config.UI.EnableWeatherHudbooleandefault: true

Render the small weather HUD panel.

Config.UI.NotifyOnWeatherChangebooleandefault: true
Config.UI.NotifyOnTempChangebooleandefault: true

Notify when temperature changes by more than TempChangeThreshold.

Config.UI.TempChangeThresholdnumberdefault: 5

Minimum temperature delta (in degrees) that triggers a notification.

Config.UI.WarningDurationnumberdefault: 10

Seconds a warning banner stays on screen.

Config.UI.UseMetricbooleandefault: true

Display temperature in Celsius. Set false for Fahrenheit.

Config.UI.DisplayFormatstringdefault: 'both'

HUD display format. One of 'icon', 'text', 'both'.

Weather intervals

Config.WeatherUpdateIntervalnumberdefault: 2.5

Minutes between weather tick evaluations on the server.

Config.DefaultWeatherDurationnumberdefault: 8

Fallback duration (minutes) when Min/Max are not set.

Config.MinWeatherDurationnumberdefault: 5

Minimum random weather duration (minutes).

Config.MaxWeatherDurationnumberdefault: 15

Maximum random weather duration (minutes).

Config.ForecastDaysnumberdefault: 6

Number of days included in the forecast.

Config.ForecastRefreshIntervalnumberdefault: 60

Minutes between forecast regenerations.

Temperature

Config.BaseTemperaturenumberdefault: 10

Base temperature in Celsius. Modulated by season, time-of-day, and weather.

Config.ColdTemperaturenumberdefault: 4

At or below this, the player is flagged as 'cold'. Triggers shivering and cold-breath effects.

Config.HotTemperaturenumberdefault: 30

At or above this, heatwave effects apply.

Config.MaxTemperaturenumberdefault: 45
Config.MinTemperaturenumberdefault: -20

Seasons

Config.SeasonDurationnumberdefault: 30

Real-world minutes per season when UseRealtimeSeason is false.

Config.UseRealtimeSeasonbooleandefault: false

When true, season follows the real-world month (see RealtimeSeasonMonthMap) instead of SeasonDuration.

Config.RealtimeSeasonMonthMaptable

Month (1 to 12) to season ('SPRING', 'SUMMER', 'FALL', 'WINTER'). Shipped default maps Dec-Feb to winter, Mar-May to spring, Jun-Aug to summer, Sep-Nov to fall.

Time sync

Config.TimeSync.Enabledbooleandefault: true

Server-authoritative time sync. Ensures all players share the same clock.

Config.TimeSync.UseRealTimebooleandefault: false

Mirror real-world time when true.

Config.TimeSync.Freezebooleandefault: false

Freeze time progression when UseRealTime is false.

Config.TimeSync.StartHournumberdefault: 12
Config.TimeSync.StartMinutenumberdefault: 0
Config.TimeSync.StartSecondnumberdefault: 0
Config.TimeSync.TimeScalenumberdefault: 1.0

Minute progression multiplier when UseRealTime is false.

Config.TimeSync.SyncIntervalSecondsnumberdefault: 15

Server to client time broadcast cadence.

Config.TimeSync.RealtimeUtcOffsetMinutesnumber | nildefault: nil

Optional fixed UTC offset (minutes) for realtime mode.

Road traction

Config.RoadEffects.RainTractionReductionnumberdefault: 0.15

Traction reduction during RAIN. Range 0.0 to 1.0.

Config.RoadEffects.ThunderTractionReductionnumberdefault: 0.25
Config.RoadEffects.ClearingTractionReductionnumberdefault: 0.1
Config.RoadEffects.SnowTractionReductionnumberdefault: 0.35

Warnings

Config.WarningMessagestable

Per-weather warning message arrays. Keys: THUNDER (levels 1 to 4), RAIN (levels 1 to 3), SNOW (levels 1 to 3). Index selects by severity.

Config.WarningMessagesFitable

Finnish mirror of WarningMessages.

Config.WeatherMessagestable

Notification string per weather type (CLEAR, EXTRASUNNY, CLOUDS, OVERCAST, RAIN, THUNDER, CLEARING, SMOG, FOGGY, XMAS, SNOWLIGHT, BLIZZARD, SNOW).

Config.WeatherMessagesFitable

Finnish mirror of WeatherMessages.

Localization strings

Config.Localetable

Flat string table keyed by language code. Shipped keys: 'en', 'fi'. Each language maps UI labels, notification titles, warning copy, forecast labels, debug strings, and server-originated messages. Use Config.Language to select the active language.