Scriptsnx_fourseasons
Changelog
Version history for nx_fourseasons.
3.0.0 (2026-07-06)
Breaking
-
The config was restructured — an old
config.luacannot be copy-pasted onto 3.0. The loose top-level flags were grouped into nested tables and there is no back-compat shim, so an old config silently misses the new keys and falls back to defaults. Start from the shippedshared/config.luaand re-apply your values by hand. The file is now ordered Quick setup → Features → Advanced tuning. Defaults and behavior are unchanged — only the names and grouping moved. Old → new map:Old (2.x) New (3.0) Config.EnableSeasonsConfig.Seasons.EnabledConfig.DefaultSeasonConfig.Seasons.DefaultConfig.SeasonDurationConfig.Seasons.DurationDaysConfig.UseRealtimeSeasonConfig.Seasons.Realtime.EnabledConfig.RealtimeSeasonMonthMapConfig.Seasons.Realtime.MonthMapConfig.InitialSeasonalEventCheckDelayMinutesConfig.Seasons.FirstEventDelayMinutesConfig.EnableWeatherEffectsConfig.Weather.EffectsConfig.WeatherUpdateIntervalConfig.Weather.UpdateIntervalConfig.MinWeatherDurationConfig.Weather.MinDurationConfig.MaxWeatherDurationConfig.Weather.MaxDurationConfig.DefaultWeatherDurationConfig.Weather.DefaultDurationConfig.WeatherChanceMultipliersConfig.Weather.ChanceMultipliersConfig.ForecastDaysConfig.Forecast.DaysConfig.ForecastRefreshIntervalConfig.Forecast.RefreshIntervalConfig.EnableTemperatureSystemConfig.Temperature.EnabledConfig.BaseTemperatureConfig.Temperature.BaseConfig.ColdTemperatureConfig.Temperature.ColdConfig.HotTemperatureConfig.Temperature.HotConfig.MinTemperatureConfig.Temperature.MinConfig.MaxTemperatureConfig.Temperature.MaxConfig.EnableWarningsConfig.Warnings.EnabledConfig.EnableWarningSoundsConfig.Warnings.SoundsConfig.AdminIdentifiersConfig.Admin.IdentifiersConfig.AdminKeybind.enabled/.keyConfig.Admin.Keybind.Enabled/.Key -
Removed the deprecated
Config.Exposure.HeatSources.VehicleBonusCand.IndoorBonusC(nothing read them — climate pull handles interiors and vehicles).
Added
- Body-temperature exposure system. A felt-temperature model shifts the ambient temperature by altitude, worn clothing warmth, nearby fires and shelter, and wetness, then drives non-lethal hypothermia and heatstroke. Danger tiers apply stamina drain, reduced sprint, and aim shake. It never drains health. Everything lives under
Config.Exposure, behind the single master switchConfig.Exposure.Enabled. - All vanilla clothing mapped out based on how warm or cold they are affecting body-temperature.
- Optional body-temperature thermometer on the weather HUD. Shows the felt temperature, a warming or cooling trend arrow, and the active source glyph. Opt in with
Config.Exposure.Hud.EnabledandConfig.UI.EnableWeatherHud. - Weather Platform API. Server exports read weather, season, temperature, forecast, intraday slots, blackout, snow depth, and player exposure. Control exports (
RequestWeather,LockWeather,ReleaseWeather,GetWeatherControlOwner) let other resources drive the weather with a priority lock that reverts when the owning resource stops. Configured underConfig.API. - Shared state for a poll or subscribe model: the
nxWeather,nxSnowDepth, andnxWeatherLockOwnerGlobalState keys, and thenxExposureplayer statebag. - Public server events
nx_fourseasons:onWeatherChanged,onSeasonChanged,onTemperatureChanged,onForecastUpdated,onStormStateChanged, andplayerTemperatureDanger. - Weather betting kiosk. Players wager on the next forecast slot at the newspaper stand through ox_target. Bets settle on the server's own weather roll and pay out through the framework money API. Offline winners reconcile on next login. Configured under
Config.Betting. - Snow accumulation affecting temperature and gameplay. Snow accumulates during snow weather, slows players on foot in deep drifts, and kicks up wheel FX. Configured under
Config.SnowDepth. - Real forecast stats. Server-computed humidity, wind, UV, dew point, and feels-like using Wind Chill and Heat Index math. Exposed on each forecast day's
statstable. - Discord webhooks for daily forecasts, severe-weather warnings, and betting payouts. Configured under
Config.Webhooksor the matching convars. - Altitude cooling. Higher ground feels colder and feeds exposure, with no effect on the displayed ambient temperature. Configured under
Config.LapseRate. - Inert weather. Fog, smog, and light Christmas snow now spawn on per-season weights inside time windows. Configured under
Config.InertWeather. - Client export
GetExposureLevelreturns the local player's exposure tier and kind. - Four-framework bridge money API (ESX, QBCore, QBox, standalone) with ox_inventory-first item grants. Betting payouts run through it.
- The weather tables are now editable in the config.
Config.WeatherChances(per-season spawn weights),Config.WeatherVariations(transition chains), andConfig.WeatherIntensity(per-weather strength ranges) each override-merge over the built-in defaults, so a partial edit changes only what you list. The betting kiosk prices its odds offConfig.WeatherVariations, so retuning the chains re-balances betting automatically.
Changed
- Exports now span both sides. Earlier versions registered client exports only. The Weather Platform API adds a set of server exports (see the Exports page).
- Summer heatwaves raise the ambient temperature by
Config.Exposure.HeatwaveBoostCwhile active, so heat danger is reachable. - Forecast payloads and the forecast exports now carry a
statstable per day. The old client-side random feels-like values were removed. - Weather and temperature notifications (weather-change, temperature-change, and severe-weather warnings) are held for 15 seconds after a player spawns, so the initial sync no longer fires a burst of toasts on connect. The weather HUD still updates during that window.
- Temperature-change notifications now round to a whole degree instead of printing the raw float.
Notes
- Two optional tables ship in
sql/install.sql:nx_fourseasons_betsandnx_fourseasons_bettor_stats. Fresh installs create them automatically.
2.2.0 (2026-06-15)
Added
- Multi-language support. All in-game text, including the admin menu, now loads from editable per-language files under
locales/<code>.jsonand is chosen withConfig.Language. Eleven languages ship: English, Finnish, German, French, Brazilian Portuguese, Spanish, Turkish, Dutch, Italian, Polish, and Chinese. - UI customization panel. New Customize and Help buttons let players rescale the forecast and weather widget, switch glass presets (liquid or frosted), and reposition or resize the UI in a live edit mode.
Changed
- Refreshed the liquid glass look with a brighter, more reflective surface and subtle edge color.
- In-game time now advances smoothly between server syncs.
- Wind speed follows the
UseMetricsetting instead of the active language. - Bundled the UI fonts locally, so the interface no longer depends on an external CDN.
Removed
- The old
Config.Locale,Config.WarningMessages, andConfig.WeatherMessagestables (and their*Fimirrors) are replaced by thelocales/<code>.jsonfiles. If you customized any of that text, move your wording into the matching locale file and keep the keys and the%sand{placeholder}tokens intact.
Fixed
- Gameplay flooding now triggers and recedes reliably.
- Slippery-road traction applies consistently in wet and icy weather.
- The forecast window always closes correctly and reads properly in clear weather.
- Players joining mid-session now sync the current weather, flood, and forecast state.
Security
- Hardened server-side validation and time and weather sync against abuse.
Performance
- Lower resource usage, smoother weather and rain transitions, and reduced network traffic.
2.1.1 (2026-05-03)
Changed
- Ped shivering animation disabled. Other cold-weather effects (screen FX, breath, notifications) still apply.
Fixed
TriggerEmergencyAlertis now forward-declared soBroadcastWeatherWarningcan call it before its definition.
2.1.0 (2026-04-29)
Added
Config.StormSystems.Blackout.DurationTiersfor opt-in weighted blackout duration tiers per weather type. Pulses can roll fixed values or random ranges, useful for dramatic multi-minute thunderstorm outages alongside the default short pulses.
Changed
- Temperature calculation is now weather-aware on every weather type. Snow and blizzard enforce hard physics caps below freezing, rain and thunder require above-freezing, and seasonal bounds apply only when they don't contradict the active weather. Forecast generation mirrors the same rules.
EnsureSeasonalTemperatureno longer applies temperature overrides. The base calculation drives temperature end to end. Only the admin menu can set a manual override.- THUNDER and BLIZZARD odds reduced across all seasons. Storm weather is now noticeably rarer.
Fixed
- Stale
seasonalandforecasttemperature overrides are dropped on resource load instead of leaking through restarts. Onlymanualadmin overrides persist. - Winter blizzards no longer display positive temperatures from the old
+5°Ccap.
2.0.0 (2026-04-25)
Added
- Liquid Glass HUD pipeline and redesigned forecast UI with hover-expand day cards.
- Intra-day prediction timeline rendered on the Today forecast card (vertical sidebar layout).
- Sliding-window forecast refresh that preserves future entries instead of regenerating.
- Wind debris system with weight-class physics, particle layers, and intensity tiers.
- Storm systems: blackout weather rules (per-weather eligibility for
RAINandBLIZZARD), gradual ocean wave transitions (~5s lerp), strike FX distance culling, production ocean/boat tuning. - Admin experimental "high" ocean option.
- Framework bridge with centralized event constants (ESX/QBCore/QBox-ready).
Changed
- Flattened visual effects into a single toggle list.
- Simplified weather intensity to 4 steps; simplified slipperiness and visibility test steps.
- Merged storm and flood admin tools into a single menu; moved effects testing under system tools.
- Unified day cards with hover-expand intraday forecast.
- Forecast now uses intraday prediction slots on expiry instead of random weather.
- Fahrenheit toggle removed from forecast UI (kept as config-only option).
- Localized flood strings and added missing locale keys.
Fixed
- Particle cloud first-frame indoor flash, variety, drifting offsets, and indoor check.
- Wind effect registration timing and angular spin range; wind data tables incorrectly scoped inside
falling_leavesbranch. - Wind sound volume clamping and burst thread cancellation latency.
- Season briefly showing "Unknown" when opening the forecast.
- Seasonal temp overrides leaking on load.
- Config defaults:
TimeSyncon, duration range 5–15, intraday locale keys. LoadPtfxAssetinfinite loop (added timeout).Database:SetSettingand other DB calls wrapped inpcall.- Removed lightning strike "nearby" notification.
- Warning system removed from admin menu; ghost
ApplyIntervalMsconfig reference removed.
Internal
- Deobfuscated
gamerenderand added design doc. - Consolidated duplicated client
GetLocaleand server helpers intoutils. - Made internal
sync.luaglobals local; removed dead code (LastWeather, unreachableHALLOWEENweather type, dead branches insync.lua). - Cleaned up config dead code and compat aliases.
- Polish + optimize pass: thread lifecycle, dedup, SQL schema, debug logs.
1.3.0 (2026-04-17)
Initial documentation.