Configuration
Every option in shared/config.lua - time, weather, commands, persistence, and store integration.
Updated 2026-07-02
Everything lives in shared/config.lua - plain language, sane defaults. The
resource runs out of the box without touching any of it. shared/config.lua
is the only file you edit; it stays readable under escrow.
Time
| Option | Default | What it does |
|---|---|---|
DayLengthRatio |
4.8 |
Game minutes per real minute. 4.8 = a full day in 5 real hours. 24 = a 1-hour day. 1.0 = real time. |
StartHour |
12 |
The hour (0-23) a brand-new server begins at. First boot only. |
DayStartsAt |
6 |
The hour the world counts as day (IsDay). |
NightStartsAt |
21 |
The hour the world counts as night (IsNight). |
RestartDrift |
false |
Advance one hour each server restart so daylight rotates across your restart schedule. |
Weather
| Option | Default | What it does |
|---|---|---|
StartWeather |
'CLEAR' |
First-boot weather type. |
StartIntensity |
'normal' |
First-boot intensity: light, normal, or heavy. |
WeatherTransitionSeconds |
45.0 |
How long a weather change takes to blend in. |
EnableBlackout |
true |
Enables the city power-cut feature (/env:blackout). |
Ownership
Turn one of these off to let another script own that half while dzr-environment keeps the rest.
| Option | Default | What it does |
|---|---|---|
ControlTime |
true |
false = another script owns the clock. |
ControlWeather |
true |
false = another script owns the weather. |
Commands for a disabled axis are not registered, and write exports for that
axis return false with a reason - read exports keep working either way.
Display
| Option | Default | What it does |
|---|---|---|
TemperatureUnit |
'F' |
'F' or 'C' for player-facing displays. Display only - the API always returns both. |
TemperatureOffset |
0 |
Nudge the whole temperature curve up or down (degrees F). |
Access and commands
| Option | Default | What it does |
|---|---|---|
AdminAce |
'dzr.environment' |
The ACE that grants admin control. Works on any framework. |
Commands.enabled |
true |
Register the /env:* command set at all. |
Commands.openPanelCommand |
'environment' |
The command that opens the control panel. |
Commands.shortAliases |
false |
Also register bare /time and /weather. Off by default - they often clash with other resources. |
Commands.playerForecast |
false |
Register the player-facing /forecast command. |
Behavior
| Option | Default | What it does |
|---|---|---|
WarnOnConflicts |
true |
Warn in the console when a competing sync script (or vMenu sync) is detected. |
BroadcastEvents |
true |
Fire the event API (including store and audit events). Turning this off silences every event this resource emits. |
Persist |
true |
Save time and weather across restarts via FiveM KVP. |
Debug |
false |
Verbose logging plus an on-screen debug HUD. |
Store integration
Settings for timed overrides and store events.
| Option | Default | What it does |
|---|---|---|
StoreIntegration.enabled |
true |
Master switch for timed overrides. |
StoreIntegration.minMinutes |
1 |
Shortest allowed timed event. Requests below are clamped. |
StoreIntegration.maxMinutes |
180 |
Longest allowed timed event. Requests above are clamped. |
StoreIntegration.announce |
true |
Broadcast a player-facing notice when an event starts. |
StoreIntegration.persistReferences |
false |
Remember processed purchase references across restarts. |
StoreIntegration.referenceCacheMax |
200 |
Idempotency cache size (references held). |
StoreIntegration.referenceTTLMinutes |
1440 |
Forget a reference after this long (24 hours). |
Presets
Config.Presets defines the named environment presets that automation, the
store command, and ApplyEnvironmentPreset can apply. A preset spec can set
any of weather, intensity, hour, blackout, and a player-facing
label.
Six ship out of the box:
| Preset | What it applies |
|---|---|
storm_event |
Thunderstorm. |
clear_skies |
Extra sunny reset. |
heavy_rain |
Heavy rain. |
fog_event |
Dense fog. |
blackout |
City lights out. |
night_event |
Jump to night. |
ImportantOutside callers (store commands, automation) can only apply named presets from this table - never raw weather or time values. You stay in control of what an external trigger is allowed to do.
Add your own by copying an existing entry:
Config.Presets['midnight_fog'] = {
weather = 'FOGGY',
hour = 0,
label = 'A strange fog rolls in...',
}
Need help with this? Open a ticket on Discord or read the support guide.