Configuration
Overview
shared/config.lua: All settings in a single file
Weather temperature values define the "ambient" temperature. The "perceived" temperature is what the player feels after all modifiers stack.
General
1Config.Debug = false
2Config.Locale = 'en'
3Config.ForceShowWidget = true
4Config.DefaultUnit = 'C'
5Config.RequiredItem = false
6
7Config.Widget = {
8 DefaultScale = 1.0, -- Initial scale for new players (0.5 = half, 2.0 = double)
9 LockPosition = false, -- Force one position+scale for every player
10 LockedLeft = '25px', -- CSS left when locked (px or %)
11 LockedTop = '25px', -- CSS top when locked (px or %)
12 LockedScale = 1.0, -- Scale when locked
13}Debug: Prints state info to console. Enables the/tempclothesdebug commandLocale: Language code for translationsForceShowWidget: Whentrue(the default), the temperature HUD stays visible even whenml_hudor other scripts try to hide it via thehideweatherhudexportDefaultUnit: Default temperature unit.'C'for Celsius,'F'for Fahrenheit. Players can toggle with/tempunit; their choice persists via KVPRequiredItem: Item name required in inventory to see the HUD. Set tofalsefor always visible. Example:'survival_watch'Widget.DefaultScale: Initial HUD scale for new players.1.0= normal,0.5= half,2.0= doubleWidget.LockPosition: Whentrue, every player sees the HUD at the locked position/scale below and/movetempuiis disabledWidget.LockedLeft/Widget.LockedTop: CSSleft/topposition when locked (px or %)Widget.LockedScale: HUD scale applied whenLockPosition = true
Commands
1Config.Commands = {
2 moveUI = 'movetempui',
3 toggleUnit = 'tempunit',
4 hideHud = 'hidetemphud',
5 debugClothes = 'tempclothes',
6}moveUI: Opens drag mode to reposition the HUD widget. Press ESC to save and exittoggleUnit: Toggles between Celsius and Fahrenheit. Persists per player via KVPhideHud: Toggles the temperature HUD on/offdebugClothes: Prints current clothing drawable IDs and thermal bonuses to F8 console. Only active whenConfig.Debug = true
Sync & Persistence
1Config.SyncInterval = 30000
2Config.EnableDB = true
3Config.ForceLoadOnRestart = true
4Config.ForceLoadTimer = 1000
5Config.RequireGameplayReadyGate = falseSyncInterval: Milliseconds between server temperature sync cycles. Keep at 30000 or higherEnableDB: Save temperature to database between restarts. RequiresoxmysqlForceLoadOnRestart: Force player state reload when the resource restarts mid-sessionForceLoadTimer: Delay in ms before checking player state on resource restartRequireGameplayReadyGate: Optional spawn gate. Leavefalse(default) and the system starts on the framework player-load event (Bridge.IsPlayerLoaded), which works standalone with no extra dependency. Settrueonly if your spawn resource (e.g.ml_start) sets the player'sgameplayReadystate after spawn; the HUD then waits for that signal instead
Temperature & Weather
1Config.DefaultTemperature = 22.0
2Config.MinTemperature = -35.0
3Config.MaxTemperature = 55.0
4Config.MaxTempChangePerCycle = 0.1
5Config.TempVariation = 0.05DefaultTemperature: Starting temperature when the database is empty or disabledMinTemperature: Absolute minimum temperatureMaxTemperature: Absolute maximum temperatureMaxTempChangePerCycle: Maximum degrees the ambient temperature shifts per sync cycle. Lower = smoother transitionsTempVariation: Random fluctuation added each cycle
Weather Map
1Config.WeatherTemperature = {
2 ["EXTRASUNNY"] = { base = 32.0, min = 28.0, max = 38.0 },
3 ["CLEAR"] = { base = 26.0, min = 20.0, max = 32.0 },
4 ["SMOG"] = { base = 28.0, min = 22.0, max = 34.0 },
5 ["NEUTRAL"] = { base = 22.0, min = 15.0, max = 25.0 },
6 ["CLOUDS"] = { base = 18.0, min = 12.0, max = 22.0 },
7 ["CLEARING"] = { base = 20.0, min = 15.0, max = 24.0 },
8 ["OVERCAST"] = { base = 16.0, min = 10.0, max = 20.0 },
9 ["RAIN"] = { base = 14.0, min = 8.0, max = 18.0 },
10 ["THUNDER"] = { base = 12.0, min = 6.0, max = 16.0 },
11 ["FOGGY"] = { base = 10.0, min = 5.0, max = 15.0 },
12 ["SNOWLIGHT"] = { base = 0.0, min = -5.0, max = 5.0 },
13 ["SNOW"] = { base = -4.0, min = -10.0, max = 2.0 },
14 ["XMAS"] = { base = -6.0, min = -12.0, max = 0.0 },
15 ["BLIZZARD"] = { base = -15.0, min = -30.0, max = -5.0 },
16 ["HALLOWEEN"] = { base = 13.0, min = 5.0, max = 20.0 },
17}Each weather type defines:
base: Target temperature the system drifts towardsmin/max: Range within which temperature fluctuates
These are ambient temperatures. Perceived temperature differs based on all player-specific modifiers.
Damage & Survival
1Config.EnableDamageSystem = true
2Config.DamageInterval = 15000EnableDamageSystem: Apply health damage at extreme temperaturesDamageInterval: Milliseconds between damage ticks
Thresholds & Values
1Config.DamageThresholds = {
2 hot = 42.0,
3 cold = -5.0
4}
5
6Config.DamageValues = {
7 hot = 5,
8 cold = 5
9}DamageThresholds.hot: Perceived temperature above this triggers heatstroke damageDamageThresholds.cold: Perceived temperature below this triggers hypothermia damageDamageValues.hot: Health points removed per tick from heatDamageValues.cold: Health points removed per tick from cold
Status Degradation
1Config.StatusDamage = {
2 Enabled = true,
3 HungerRemoveCold = 2.0,
4 ThirstRemoveCold = 0.5,
5 HungerRemoveHot = 0.5,
6 ThirstRemoveHot = 4.0
7}Enabled: Drain hunger/thirst at extreme temperaturesHungerRemoveCold: Hunger drain per tick in cold (body burns calories)ThirstRemoveCold: Thirst drain per tick in coldHungerRemoveHot: Hunger drain per tick in heatThirstRemoveHot: Thirst drain per tick in heat (sweating)
Status damage is computed server-side from config values (zero-trust). Client sends only the condition string ('hot'/'cold'), server applies a 10-second per-player rate limit.
Visual Effects
1Config.EnableVisualEffects = true
2Config.Intensity = {
3 start = 0.2,
4 max = 0.8,
5 increment = 0.05
6}EnableVisualEffects: Show screen vignette effects at extreme temperaturesIntensity.start: Initial effect intensity when entering danger zoneIntensity.max: Maximum intensity cap (0.8 keeps gameplay usable)Intensity.increment: How much intensity increases per damage tick
Wetness & Water
1Config.EnableWetnessSystem = true
2Config.Wetness = {
3 IncreaseRate = 0.05,
4 DecreaseRate = 0.005,
5 HeatSourceDryRate = 0.08,
6 TemperatureMalus = -8.0,
7 ExposedVehicleClasses = {
8 [8] = true, -- Motorcycles
9 [13] = true, -- Cycles
10 [14] = true, -- Boats
11 }
12}IncreaseRate: How fast the player gets wet in rainDecreaseRate: Normal drying rateHeatSourceDryRate: Drying rate near fire/heat sourcesTemperatureMalus: Perceived temperature penalty at 100% wetness. Scales linearlyExposedVehicleClasses: Vehicle classes that do not protect from rain
Swimming
1Config.PlayerOnWater = {
2 Enabled = true,
3 TempMalus = -15.0,
4 WetnessIncrease = 0.05
5}Enabled: Apply temperature penalty when swimmingTempMalus: Instant perceived temperature reduction while in waterWetnessIncrease: Wetness increase rate while swimming
Vehicle Climate Control
Keybind
1Config.Keybinds = {
2 climateControl = {
3 defaultKey = 'J',
4 description = 'Open Vehicle Climate Control'
5 }
6}defaultKey: Default key to open climate panel. Rebindable via FiveM keybind settingsdescription: Label shown in FiveM keybind menu
Climate Settings
1Config.VehicleClimate = {
2 defaultTemp = 21.0,
3 defaultMode = 'auto',
4 minTemp = 16.0,
5 maxTemp = 28.0,
6 tempChangeStep = 0.5,
7 efficiency = 1.0,
8 dryingBonus = 0.08
9}defaultTemp: Default target temperaturedefaultMode: Default mode:'auto','heat', or'ac'minTemp: Minimum settable temperaturemaxTemp: Maximum settable temperaturetempChangeStep: Temperature step per clickefficiency: Climate control effectiveness.1.0= fast. Lower = slowerdryingBonus: Extra drying speed when heater is active
Blacklist
1Config.VehicleClimateBlacklist = {
2 classes = {
3 [8] = true, -- Motorcycles
4 [13] = true, -- Cycles
5 [14] = true, -- Boats
6 [21] = true -- Trains
7 },
8 models = {
9 [`caddy`] = true,
10 [`tractor`] = true
11 }
12}classes: Vehicle classes without climate controlmodels: Specific vehicle model hashes without climate control
Climate UI Themes
1Config.ClimateThemes = {
2 default = 'utility',
3 classes = {
4 [0] = 'utility', -- Compacts
5 [1] = 'utility', -- Sedans
6 [2] = 'utility', -- SUVs
7 [3] = 'utility', -- Coupes
8 [4] = 'retro', -- Muscle
9 [5] = 'retro', -- Sports Classics
10 [6] = 'minimal', -- Sports
11 [7] = 'luxury', -- Super
12 [9] = 'utility', -- Off-road
13 [10] = 'utility', -- Industrial
14 [11] = 'utility', -- Utility
15 [12] = 'utility', -- Vans
16 [14] = 'utility', -- Boats
17 [15] = 'utility', -- Helicopters
18 [16] = 'utility', -- Planes
19 [17] = 'utility', -- Service
20 [18] = 'utility', -- Emergency
21 [19] = 'utility', -- Military
22 [20] = 'utility', -- Commercial
23 [21] = 'utility', -- Trains
24 [22] = 'minimal' -- Open Wheel
25 },
26 models = {
27 [`torero`] = 'retro',
28 [`zentorno`] = 'luxury',
29 [`faggio`] = 'retro',
30 [`neon`] = 'luxury',
31 [`raiden`] = 'luxury',
32 [`cyclone`] = 'luxury',
33 [`voltic`] = 'luxury',
34 [`tezeract`] = 'luxury',
35 [`omnisegt`] = 'luxury'
36 }
37}Available themes: 'utility', 'minimal', 'luxury', 'retro'
default: Theme when no class or model match is foundclasses: Theme per vehicle class IDmodels: Theme override per model hash. Takes priority over class
Interior Bonus
1Config.InteriorBonus = {
2 targetTemp = 22.0,
3 strength = 0.5,
4}targetTemp: Target temperature inside MLOs/interiorsstrength: Pull strength towards the target.0.0= no effect,1.0= full pull to target temperature. At0.5, the perceived temperature moves halfway between current and target
Works both ways, warms the player when it's cold outside, cools when it's hot.
Temperature Objects
1Config.TemperatureObjects = {
2 ['prop_beach_fire'] = { radius = 12.0, bonus = 15.0, dynamic = true, force = 1.0 },
3 ['prop_hobo_stove_01'] = { radius = 6.0, bonus = 10.0, dynamic = true, force = 1.0 },
4 ['gr_prop_gr_hobo_stove_01'] = { radius = 6.0, bonus = 10.0, dynamic = true, force = 1.0 },
5 ['prop_rub_tyre_01'] = { radius = 8.0, bonus = 12.0, dynamic = true, force = 1.0 },
6 ['prop_fan_01'] = { radius = 4.0, bonus = -4.0, dynamic = true, force = 2.0 },
7 ['v_res_coolingfan'] = { radius = 4.0, bonus = -3.0, dynamic = true, force = 2.0 },
8}Each entry defines a GTA prop that radiates heat or cold:
radius: Detection range in game unitsbonus: Temperature modifier. Positive = heat, negative = colddynamic: Scale bonus by distance (closer = stronger). Whenfalse, flat bonus within radiusforce: Falloff exponent. Higher = steeper falloff near the edge
Vehicle Insulation
1Config.VehicleModifiers = {
2 excludeCategories = { 8, 13 },
3 categoryBonus = {
4 [0] = 3, -- Compact
5 [1] = 4, -- Sedan
6 [2] = 5, -- SUV
7 [18] = 4, -- Emergency
8 },
9 hashBonus = {
10 [`rhino`] = 10,
11 [`firetruk`] = 8,
12 }
13}excludeCategories: Vehicle classes with zero insulation (bikes, cycles)categoryBonus: Perceived temperature bonus per vehicle classhashBonus: Bonus override for specific vehicle model hashes
Zones & Blips
Blip Settings
1Config.BlipSettings = {
2 sprite = 441,
3 color = { hot = 1, cold = 3, neutral = 2 },
4 scale = 0.8,
5 shortRange = true,
6}sprite: Map blip sprite IDcolor: Blip color IDs for hot, cold, and neutral zonesscale: Blip sizeshortRange: Only show blip when nearby
Temperature Zones
1Config.TemperatureZones = {
2 {
3 type = 'poly',
4 modifier = -10.0,
5 points = { vec3(...), vec3(...), ... },
6 thickness = 20.0,
7 dynamic = true,
8 debug = false,
9 showNotification = true,
10 showBlip = false,
11 blipName = "Freezing Zone"
12 },
13 {
14 type = 'box',
15 modifier = 15.0,
16 coords = vec3(1093.1, -1999.5, 31.0),
17 size = vec3(20.0, 20.0, 10.0),
18 rotation = 0,
19 dynamic = true,
20 debug = false,
21 showNotification = true,
22 showBlip = false,
23 blipName = "Heat Zone"
24 }
25}type: Zone shape:'poly','box', or'sphere'modifier: Temperature offset. Positive = hotter, negative = colderpoints: Array of vec3 vertices (poly type)coords: Center position (box/sphere types)size: Dimensions vec3 (box type)radius: Detection radius (sphere type)rotation: Box rotation in degreesthickness: Vertical thickness (poly type)dynamic: Scale modifier by distance from center (box/sphere)debug: Draw zone boundaries (ox_lib debug)showNotification: Notify player on enter/exitshowBlip: Add a map blip at the zoneblipName: Label for the map blip
Usable Items
1Config.ItemBuffs = {
2 ['coffee'] = {
3 buff = 8.0,
4 duration = 10,
5 notification = "item_buff_bag",
6 progressBar = {
7 duration = 5000,
8 label = 'Drinking Coffee...',
9 useWhileDead = false,
10 canCancel = true,
11 disable = { move = false, car = true, combat = true },
12 anim = { dict = 'mp_player_intdrink', clip = 'loop_bottle' },
13 prop = { model = `prop_fib_coffee`, pos = vec3(0.01, 0.01, -0.06), rot = vec3(5.0, 5.0, -180.5) }
14 }
15 },
16 ['water'] = {
17 buff = -5.0,
18 duration = 5,
19 notification = "item_buff_icecream",
20 progressBar = {
21 duration = 3000,
22 label = 'Drinking Water...',
23 useWhileDead = false,
24 canCancel = true,
25 disable = { move = false, car = true, combat = true },
26 anim = { dict = 'mp_player_intdrink', clip = 'loop_bottle' },
27 prop = { model = `prop_ld_flow_bottle`, pos = vec3(0.03, 0.03, 0.02), rot = vec3(0.0, 0.0, -1.5) }
28 }
29 },
30}Each item entry:
buff: Temperature modifier in degrees. Positive = warming, negative = coolingduration: Buff duration in minutesnotification: Locale key for the notification on buff activationprogressBar: ox_lib progressBar config:duration(ms),label,useWhileDead,canCancel,disable,anim,prop
Items are registered as usable via Bridge.BindUsableItem on server start. The flow is: server triggers client → client runs progress bar → on completion, client sends confirmItemUse back to server → server verifies inventory, removes item, applies buff.
Clothing Thermal Bonus
1Config.ClothesBonus = {
2 ["male"] = {
3 ["hat"] = { [3] = 1, [5] = 1, ... },
4 ["torso"] = { [17] = 8, [34] = 6, ... },
5 ["pants"] = { [4] = 2, [31] = 2, ... },
6 ["shoes"] = { [12] = 2, [14] = 1, ... },
7 ["tops"] = { [466] = 2, [497] = 7, [15] = -2, [16] = -2 },
8 ["undershirt"] = {},
9 ["armor"] = {},
10 ["decals"] = {},
11 },
12 ["female"] = {
13 ["hat"] = {}, ["torso"] = {}, ["pants"] = {}, ["shoes"] = {},
14 ["undershirt"] = {}, ["armor"] = {}, ["decals"] = {}, ["tops"] = {}
15 }
16}Maps ped drawable variation IDs to temperature bonuses per clothing slot:
- Positive values = warmth (jackets, boots, winter hats)
- Negative values = cooling (tank tops, light shirts)
- Keys are the drawable variation index from
GetPedDrawableVariation - Slots map to ped component IDs:
hat(0),torso(3),pants(4),shoes(6),tops(11), etc.
Enable Config.Debug and use /tempclothes in-game to see every drawable ID and its thermal bonus for the current ped.