Configuration
All configuration is done in the config/ folder. Changes made via the admin panel are saved to the database and take priority over file values.
| File | Purpose |
config/config.lua | Main configuration |
config/seasons.lua | Season presets and cycle |
config/zones.lua | Default weather zones |
config/weather_types.lua | Weather type properties |
config/locales/en.lua | English translations |
config/locales/fr.lua | French translations |
General
Config.Debug = false
Config.Locale = 'en'
Config.AdminPermission = 'hz_weather.admin'
Config.TemperatureUnit = 'C'
| Parameter | Type | Default | Description |
Debug | boolean | false | Detailed logs in server/client console |
Locale | string | 'en' | Language file from config/locales/ |
AdminPermission | string | 'hz_weather.admin' | ACE permission for admin access |
TemperatureUnit | string | 'C' | Display unit: 'C' (Celsius) or 'F' (Fahrenheit) |
Weather
Config.DefaultWeather = 'CLEAR'
Config.DynamicWeather = true
Config.WeatherChangeInterval = 600
Config.TransitionDuration = 25.0
Config.ZoneTransitionDistance = 800.0
Config.ZoneCheckInterval = 500
Config.PredictiveLoadDistance = 500.0
Config.FreezeWeather = false
| Parameter | Type | Default | Description |
DefaultWeather | string | 'CLEAR' | Weather type on first start (before DB load) |
DynamicWeather | boolean | true | Automatic weather changes over time |
WeatherChangeInterval | number | 600 | Seconds between automatic weather changes |
TransitionDuration | number | 25.0 | Seconds for each transition step (GTA native fade) |
ZoneTransitionDistance | number | 800.0 | Meters to complete a full zone weather transition |
ZoneCheckInterval | number | 500 | Milliseconds between zone boundary checks (client) |
PredictiveLoadDistance | number | 500.0 | Meters before zone border to start preloading weather |
FreezeWeather | boolean | false | Freeze weather at startup (no automatic changes) |
Available weather types: EXTRASUNNY, CLEAR, CLOUDS, OVERCAST, RAIN, THUNDER, CLEARING, FOGGY, SMOG, SNOW, SNOWLIGHT, BLIZZARD, XMAS
Weather Influence (Zone Blending)
Config.WeatherInfluence = {
enabled = true,
maxDiff = 2,
}
| Parameter | Type | Default | Description |
enabled | boolean | true | Neighboring zones blend their weather naturally |
maxDiff | number | 2 | Max steps on the weather scale between neighbors |
Weather scale: EXTRASUNNY(1) > CLEAR(2) > CLOUDS(3) > OVERCAST(4) > RAIN(5) > THUNDER(6). With maxDiff = 2, if one zone has THUNDER, the neighbor can be at most OVERCAST.
Time
Config.TimeScale = 1.0
Config.FreezeTime = false
Config.StartTime = { hour = 8, minute = 0 }
Config.NightSpeedMultiplier = 2.0
Config.UseNightSpeedMultiplier = false
Config.SyncInterval = 60
Config.UseRealTime = false
Config.NightTime = { beginning = 22, ending = 6 }
| Parameter | Type | Default | Description |
TimeScale | number | 1.0 | Time speed. 1.0 = real-time, 2.0 = 2x faster |
FreezeTime | boolean | false | Freeze time at startup |
StartTime | table | {hour=8, minute=0} | Time on first start (then loaded from DB) |
NightSpeedMultiplier | number | 2.0 | Night passes X times faster than day |
UseNightSpeedMultiplier | boolean | false | Enable faster nights |
SyncInterval | number | 60 | Seconds between full time syncs to all clients |
UseRealTime | boolean | false | Use server's real clock instead of game time |
NightTime | table | {beginning=22, ending=6} | Hours defining the night period |
Temperature
Config.TemperatureEnabled = true
Config.TemperatureMode = 'hybrid'
Config.TemperatureUpdateInterval = 5
Config.TemperatureRandomVariation = 2.0
Config.HeatPeakHour = 14
| Parameter | Type | Default | Description |
TemperatureEnabled | boolean | true | Enable temperature system |
TemperatureMode | string | 'hybrid' | Calculation mode (see below) |
TemperatureUpdateInterval | number | 5 | Seconds between recalculations |
TemperatureRandomVariation | number | 2.0 | Random variation in degrees |
HeatPeakHour | number | 14 | Hour of peak temperature (24h format) |
Temperature modes:
'zone' — Based only on zone min/max settings
'weather' — Based only on the current weather type modifier
'hybrid' — Combines zone base + weather modifier + time-of-day curve (recommended)
Hour Modifiers (Day/Night Curve)
Config.TemperatureHourModifiers = {
[0] = -8, -- Midnight
[4] = -10, -- 4 AM (coldest)
[8] = -3, -- 8 AM (sunrise)
[12] = 3, -- Noon
[14] = 5, -- 2 PM (peak)
[20] = 1 -- 8 PM (evening)
}
Values are added to the base temperature. Hours in between are interpolated automatically.
Seasons
Config.SeasonsEnabled = true
Config.SeasonAutoStart = true
Config.DefaultSeasonPreset = 'summer'
Config.SyncRealWorldSeasons = false
| Parameter | Type | Default | Description |
SeasonsEnabled | boolean | true | Enable season system |
SeasonAutoStart | boolean | true | Start season cycle automatically |
DefaultSeasonPreset | string | 'summer' | Default season on first start |
SyncRealWorldSeasons | boolean | false | Map real calendar months to seasons |
Full season presets are configured in config/seasons.lua — see Season Presets below.
Gameplay Effects
All effects are configured under Config.Effects:
Vehicle Traction
vehicleTraction = {
enabled = false,
rainModifier = 0.7,
snowModifier = 0.5,
blizzardModifier = 0.3,
}
| Parameter | Type | Default | Description |
enabled | boolean | false | Enable traction modification |
rainModifier | number | 0.7 | 70% grip in rain |
snowModifier | number | 0.5 | 50% grip in snow |
blizzardModifier | number | 0.3 | 30% grip in blizzard |
Reduced Visibility
reducedVisibility = {
enabled = true,
fogDensity = 0.5,
rainDensity = 0.2,
blizzardDensity = 0.6,
}
| Parameter | Type | Default | Description |
enabled | boolean | true | Enable visibility effects |
fogDensity | number | 0.5 | Fog density (FOGGY weather) |
rainDensity | number | 0.2 | Rain fog density |
blizzardDensity | number | 0.6 | Blizzard fog density |
Auto Wipers
autoWipers = { enabled = true }
Automatically activates vehicle wipers during rain and snow.
Auto Headlights
autoLights = {
enabled = false,
nightStart = 20,
nightEnd = 6,
}
| Parameter | Type | Default | Description |
enabled | boolean | false | Enable automatic headlights |
nightStart | number | 20 | Hour when headlights turn on |
nightEnd | number | 6 | Hour when headlights turn off |
Player Effects (Cold / Heat)
playerEffects = {
enabled = true,
notifications = true,
freezing = true,
heatStroke = true,
coldThreshold = 10,
heatThreshold = 30,
screenFx = true,
}
| Parameter | Type | Default | Description |
enabled | boolean | true | Enable player weather effects |
notifications | boolean | true | Show a notification when entering a cold / heat state. Throttled to one notification per 2 minutes per state (v1.1.5+), so rapid temperature oscillation around the threshold can't spam the feed. Set to false to disable. |
freezing | boolean | true | Shivering animation, screen frost |
heatStroke | boolean | true | Sweat animation, screen distortion |
coldThreshold | number | 10 | Below this temperature = cold effects. v1.1.5+ adds a 2 °C hysteresis buffer — once in the Cold state, the temperature must rise to coldThreshold + 2 before effects switch off. |
heatThreshold | number | 30 | Above this temperature = heat effects. v1.1.5+ adds a 2 °C hysteresis buffer — once in the Heat state, the temperature must drop to heatThreshold − 2 before effects switch off. |
screenFx | boolean | true | Enable screen post-processing effects |
Speed Reduction
speedReduction = {
enabled = false,
blizzardModifier = 0.85,
}
Players sprint at 85% speed during blizzard conditions.
Ambient Sounds
ambientSounds = {
enabled = true,
sounds = {
RAIN = 'rain_loop',
THUNDER = 'thunder_loop',
WIND = 'wind_loop',
},
}
Weather-specific ambient sounds with automatic indoor attenuation.
Synced Lightning
syncedLightning = {
enabled = true,
flashDuration = 0.5,
thunderDelay = 2.0,
minInterval = 5,
maxInterval = 15,
}
| Parameter | Type | Default | Description |
enabled | boolean | true | Enable synchronized lightning |
flashDuration | number | 0.5 | Flash duration in seconds |
thunderDelay | number | 2.0 | Delay between flash and thunder sound |
minInterval | number | 5 | Min seconds between lightning strikes |
maxInterval | number | 15 | Max seconds between strikes |
Wind
Config.WindEnabled = true
Config.WindUpdateInterval = 10
Config.WindGustsEnabled = true
Config.WindGustsProbability = 0.2
Config.WindGustsMultiplier = 1.5
| Parameter | Type | Default | Description |
WindEnabled | boolean | true | Enable wind system |
WindUpdateInterval | number | 10 | Seconds between wind updates |
WindGustsEnabled | boolean | true | Enable random wind gusts |
WindGustsProbability | number | 0.2 | 20% chance of gust each interval |
WindGustsMultiplier | number | 1.5 | Gust strength multiplier |
Blackout
Config.BlackoutEnabled = true
Config.BlackoutAffectsVehicles = false
Config.BlackoutAutoThunder = true
Config.BlackoutThunderProbability = 0.3
Config.BlackoutMinDuration = 5
Config.BlackoutMaxDuration = 10
Config.BlackoutExceptions = { 'Pillbox Hospital', 'Mission Row PD' }
| Parameter | Type | Default | Description |
BlackoutEnabled | boolean | true | Enable blackout system |
BlackoutAffectsVehicles | boolean | false | Vehicle headlights also turn off |
BlackoutAutoThunder | boolean | true | Auto-trigger blackout during THUNDER |
BlackoutThunderProbability | number | 0.3 | 30% chance per thunderstorm |
BlackoutMinDuration | number | 5 | Min blackout duration (minutes) |
BlackoutMaxDuration | number | 10 | Max blackout duration (minutes) |
BlackoutExceptions | string[] | {...} | Zone names that keep lights during blackout |
Tornado
Config.Tornado = { ... }
General
| Parameter | Type | Default | Description |
Enabled | boolean | true | Enable tornado system |
Command | string | 'tornado' | Admin command name |
WarningDuration | number | 30 | Alert before touchdown (seconds) |
ActiveDuration | number | 180 | Active on ground (seconds) |
DissipatingDuration | number | 30 | Dissipation fadeout (seconds) |
IntensityRampUp | number | 30 | Seconds to reach 100% intensity |
TickInterval | number | 50 | Server update interval (ms) |
Movement
| Parameter | Type | Default | Description |
MovementEnabled | boolean | true | Tornado moves across the map |
MoveSpeed | number | 0.3 | Movement speed (units/tick) |
DestinationMinDist | number | 80.0 | Min distance for next waypoint |
DestinationMaxDist | number | 250.0 | Max distance for next waypoint |
Visual (Particle System)
| Parameter | Type | Default | Description |
ParticleLayers | number | 8 | Vertical particle layers |
ParticlesPerLayer | number | 2 | Particles per layer |
BaseRadius | number | 9.4 | Base funnel radius |
LayerSeparation | number | 22.0 | Vertical spacing between layers |
RotationSpeed | number | 2.0 | Rotation speed (rad/s) |
GirthModifier | number | 5.0 | Top-of-funnel flare |
DebrisLayers | number | 2 | Dark debris layers at base |
CloudTopLayers | number | 2 | Wide cloud layers at top |
Physics (3-Force Vortex Model)
| Parameter | Type | Default | Description |
HorizontalPullForce | number | 1.2 | Attraction toward center |
VerticalForce | number | 1.0 | Upward lift force |
TangentialForce | number | 0.8 | Spinning/rotational force |
ForceScale | number | 2.0 | Global force multiplier |
MaxEntitySpeed | number | 35.0 | Speed cap for thrown entities |
EntityCollectRadius | number | 45.0 | Radius to detect entities |
MaxTrackedEntities | number | 20 | Max simultaneous tracked entities |
ThrowVehicles | boolean | true | Throw NPC vehicles |
ThrowPeds | boolean | true | Throw NPCs |
ThrowObjects | boolean | false | Throw world props (disabled — may crash GTA) |
AffectPlayer | boolean | true | Player gets pulled (ragdoll + forces) |
PlayerForceMultiplier | number | 1.2 | Force multiplier on player |
Debris Props
| Parameter | Type | Default | Description |
SpawnDebris | boolean | true | Spawn flying debris objects |
MaxDebrisProps | number | 5 | Max simultaneous debris |
DebrisSpawnMin | number | 3000 | Min spawn interval (ms) |
DebrisSpawnMax | number | 6000 | Max spawn interval (ms) |
DebrisLifetime | number | 6500 | Debris lifetime (ms) |
DebrisModels | string[] | {...} | Prop model names to use |
Tsunami
Config.Tsunami = { ... }
General
| Parameter | Type | Default | Description |
Enabled | boolean | true | Enable tsunami system |
Command | string | 'tsunami' | Admin command name |
WarningDuration | number | 30 | Alert duration before water rises (s) |
MaxWaterHeight | number | 200.0 | Maximum water height (meters) |
RiseSpeed | number | 0.08 | Meters per tick while rising |
RecedeSpeed | number | 0.04 | Meters per tick while receding |
TickInterval | number | 100 | Milliseconds between ticks |
PeakDuration | number | 300 | Seconds at max height (5 min) |
DisableTraffic | boolean | true | Disable NPC traffic during tsunami |
PedsDieInWater | boolean | true | NPCs die when submerged |
Visual Effects
| Parameter | Type | Default | Description |
CameraShake | boolean | true | Camera shake during event |
ShakeIntensity | number | 0.3 | Shake intensity (0.0–1.0) |
ScreenOverlay | boolean | true | Blue/cyan screen overlay |
OverlayAlpha | number | 40 | Overlay opacity (0–255) |
Timecycle | boolean | true | Dark atmosphere timecycle |
ForceWeather | boolean | true | Force THUNDER weather |
ForceWind | boolean | true | Increase wind speed |
WindSpeed | number | 12.0 | Wind speed during tsunami |
Notification Messages
| Parameter | Default | Trigger |
WarningMessage | '~r~TSUNAMI ALERT~s~ — Evacuate to high ground!' | Warning start |
PeakMessage | '~b~TSUNAMI~s~ — Maximum level reached' | Peak reached |
RecedeMessage | '~g~TSUNAMI~s~ — Waters are receding' | Receding start |
EndMessage | '~g~END TSUNAMI~s~ — Back to normal' | Event end |
Database
Config.DatabasePrefix = 'hz_weather'
Config.UseDatabaseConfig = true
Config.SaveConfigToDB = true
| Parameter | Type | Default | Description |
DatabasePrefix | string | 'hz_weather' | Table name prefix |
UseDatabaseConfig | boolean | true | Load config overrides from database |
SaveConfigToDB | boolean | true | Admin panel changes persist to database |
Compatibility
Config.EnableQBCompat = true
Config.EnableCDCompat = true
| Parameter | Type | Default | Description |
EnableQBCompat | boolean | true | Expose qb-weathersync exports and events |
EnableCDCompat | boolean | true | Expose cd_easytime exports and events |
Set to false if you don't use scripts that depend on these resources.
HUD
Config.HUD = {
Enabled = true,
UpdateInterval = 5000,
}
| Parameter | Type | Default | Description |
Enabled | boolean | true | Show in-game weather HUD |
UpdateInterval | number | 5000 | HUD refresh rate (milliseconds) |
Config.MaxZones = 50
Config.MaxHistoryDays = 30
Config.CleanHistoryOnStart = true
| Parameter | Type | Default | Description |
MaxZones | number | 50 | Maximum number of weather zones |
MaxHistoryDays | number | 30 | Days of history to keep in database |
CleanHistoryOnStart | boolean | true | Clean old history on resource start |
Season Presets (config/seasons.lua)
This file defines the 4 season presets and the cycle behavior.
Cycle Mode
cycleMode = 'auto' -- 'disabled', 'auto', 'realtime'
disabled — No automatic season cycle. Use admin panel or commands.
auto — Rotate through seasons based on cycleDuration.
realtime — Map real calendar months to seasons (January = Winter, etc.).
Cycle Duration
cycleDuration = 120 -- Minutes for a full 4-season cycle (30 min per season)
Preset Structure
Each season defines a weather sequence, temperature modifiers, wind profile, and effects:
spring = {
label = { fr = "Printemps", en = "Spring" },
icon = "...",
weatherSequence = {
{ weather = 'CLEAR', duration = 8 },
{ weather = 'CLOUDS', duration = 6 },
{ weather = 'RAIN', duration = 4 },
{ weather = 'CLEARING', duration = 3 },
},
temperatureModifiers = {
base = 16.0,
morning = -3,
afternoon = 5,
night = -6,
},
windModifiers = {
base = 15.0,
gusts = 25.0,
},
effects = {
roadWetness = 0.3,
snowOnGround = false,
visibility = 0.95,
},
}
Season Transitions
transitions = {
enabled = true,
duration = 2, -- Transition duration (minutes)
transitionWeather = {
['spring_to_summer'] = 'CLEAR',
['summer_to_autumn'] = 'CLOUDS',
['autumn_to_winter'] = 'OVERCAST',
['winter_to_spring'] = 'CLEARING',
},
}
Locales (config/locales/)
Set the active locale in config/config.lua:
Config.Locale = 'en' -- or 'fr'
Adding a New Language
- Copy
config/locales/en.lua to config/locales/xx.lua (e.g. de.lua)
- Translate all string values
- Set
Config.Locale = 'xx'
return {
['key_name'] = 'Translated string',
['weather_changed'] = 'Weather changed to %s',
}
After modifying config files, restart the resource with ensure HZ-Weather or restart the server.