Skip to main content

Configuration

All primary settings are located in ChaosMod/config.lua. Edit the file and restart the resource for configuration changes to be reloaded. Values ending in Ms are in milliseconds (1,000 ms = 1 second).

Config.Enabled = true
Config.IntervalMs = 120000
Config.EffectDurationMs = 30000
Config.LiveSafeMode = true
Config.AllowDestructiveEffects = false
Config.WeatherEffects = false

This preset limits the event pool to the six IDs listed in Config.LiveSafeEffects and keeps weather effects disabled. These are intended as visual/audio events; they may still obstruct players' views or alter lighting. Test before deploying.

Full chaos night​

Config.Enabled = true
Config.IntervalMs = 120000
Config.EffectDurationMs = 30000
Config.LiveSafeMode = false
Config.AllowDestructiveEffects = true
Config.WeatherEffects = false

This matches the shipped safety filters. It allows the full set of non-weather events, including events marked destructive. Only use it in situations where players understand that chaos can interfere with normal gameplay.

Admin-controlled / manual-only​

Config.Enabled = false
Config.LiveSafeMode = true
Config.AllowDestructiveEffects = false

The automatic timer starts off. Administrators may still explicitly trigger an eligible effect using /chaos force <id>. Use /chaos on to enable automatic rotation if needed.

Core settings​

SettingShipped defaultMeaning
Config.EnabledtrueWhether automatic chaos is enabled on startup.
Config.IntervalMs120000Time between automatic effect starts.
Config.EffectDurationMs30000Default runtime for timed effects.
Config.SkipWhenEmptytrueSkip effect rolls with zero players and reset the idle countdown.
Config.RecentHistory5Avoid recently used random effect IDs where alternatives are available.
Config.AdminAce'chaosmod.admin'ACE permission required for in-game commands.
Config.DebugfalseVerbose debug logging.

The server clamps the effective automatic interval to 5 seconds–60 minutes and individual effect durations to 0–120 seconds. Some registered effects specify their own duration; instant effects have 0.

Timer convar override​

The server reads chaosmod_eventtimer if set. For example, in server.cfg:

set chaosmod_eventtimer 90000

This overrides Config.IntervalMs and gives a 90-second start-to-start timer. If the convar is not set, the config value is used. To enable extra debug logging via convar:

set chaosmod_debug true

Effect selection and safety​

SettingShipped defaultMeaning
Config.LiveSafeModefalseIf enabled, only effect IDs with true in Config.LiveSafeEffects are eligible.
Config.AllowDestructiveEffectstrueIf false, block effects marked destructive in the shared catalog.
Config.WeatherEffectsfalseIf false, exclude all Weather-category effects.
Config.DisabledEffects{}Explicitly exclude IDs from random rotation and admin force/queue.

The current live-safe allowlist contains exactly:

Config.LiveSafeEffects = {
miscFireworks = true,
miscNightVision = true,
miscHeatVision = true,
miscBlackout = true,
miscPortraitMode = true,
miscIntenseMusic = true,
}

To remove effects from the pool entirely:

Config.DisabledEffects = {
['miscDVD'] = true,
['teleportSky'] = true,
['playerGiveWeapons'] = true,
}

If Config.LiveSafeMode = true, adding an ID to Config.LiveSafeEffects only permits that ID to pass the allowlist check; the destructive, weather, and disabled-ID checks still apply. Simply setting AllowDestructiveEffects = false is not the same as enabling live-safe mode: non-destructive effects that alter camera, UI, or gameplay may remain eligible.

:::warning Irreversible changes Several instant events can cause real gameplay consequences that are not restored when chaos ends, such as weapon grants, teleportation, wanted level changes, broken doors, or punctured tyres. Use explicit exclusions when necessary. The destructive marker is an author-supplied classification, not a guarantee that every unmarked effect is harmless. :::

Performance and entity limits​

SettingDefaultPurpose
Config.MaxNearbyVehicles12Maximum nearby vehicles considered by supported effects.
Config.MaxNearbyPeds12Maximum nearby peds considered by supported effects.
Config.NearbyRadius70.0Nearby search radius in game units.
Config.MaxSpawnedEntities5Per-effect-context limit for tracked spawned entities.
Config.ModelLoadTimeoutMs4000Time to wait for requested models or particle assets.
Config.CleanupSpawnedVehiclestrueTry to remove tracked spawned vehicles during cleanup when empty.

Some effects create local entities rather than persistent networked entities. Spawned vehicles may remain if occupied or if cleanup cannot obtain entity control. Choose cautious caps for busy servers.

Announcements​

SettingDefaultDescription
Config.AnnounceEffectsfalsePost a native GTA feed notification when an effect starts.
Config.UseChatMessagesfalseSend command replies/notifications to the FiveM chat resource when invoked by the script; requires the chat resource.

The UI's own effect announcement is controlled separately with Config.UI.ShowAnnouncements.

HUD settings​

SettingDefaultDescription
Config.UI.EnabledtrueEnable the local NUI overlay.
Config.UI.Title'CHAOS MODE'Short title displayed on the HUD.
Config.UI.Accent'#ef4444'Six-digit hex accent color.
Config.UI.WidthPx420HUD width (clamped by the JS renderer).
Config.UI.TopPx24Distance from the top of the screen.
Config.UI.ShowAnnouncementstrueShow a temporary effect card when an effect begins.
Config.UI.AnnouncementMs4200How long the effect card remains visible.
Config.UI.ShowWhenPausedtrueKeep HUD visible when chaos is paused or disabled.
Config.UI.RefreshMs5000Server state synchronization interval (minimum 1000 ms).

The UI is non-interactive and does not take cursor focus. Its source files are web/index.html, web/style.css, and web/app.js.

Example appearance changes:

Config.UI.Title = 'HSC CHAOS'
Config.UI.Accent = '#ff3b30'
Config.UI.WidthPx = 380
Config.UI.TopPx = 40

Weather synchronization​

Config.WeatherEffects = false is the shipped default. Leave it off if your server uses another weather manager, such as vSync or qb-weathersync. If enabled, weather-category effects use local client weather overrides, which may compete with existing weather scripts.