Configuration

19 min readUpdated Today

Overview

  • shared/config.lua: all gameplay settings: fuel types, items, jerry cans, consumption, tank size, scavenging, siphoning, upgrades, conversions, electric vehicles, HUD
  • shared/config_server.lua: Discord webhooks and admin permission groups
  • shared/config/minigames/*.lua: minigame provider files (ox_lib, MGC, PS-UI). Each self-skips when its resource is missing
  • open/shared.lua: HRS Base Building fuel type mapping

Item names in the shipped config are working defaults. Rename them to match your inventory and keep the keys consistent across Config.FuelItems, Config.JerryCans and your inventory item registry.

General

shared/config.lua
1Config.Debug              = false
2Config.Locale             = 'en'
3Config.FuelMode           = 'advanced'
4Config.DefaultFuelType    = 'fuel'
5Config.GlobalLootCooldown = 60
  • Debug: console debug output. Also enables the /mlfueldebug admin menu
  • Locale: 'en' | 'it' (shipped locale files)
  • FuelMode: 'advanced' = refillable jerry cans tracked in item metadata. 'simple' = one-use fuel items only. 'auto' = picks 'advanced' when the inventory supports metadata
  • DefaultFuelType: fallback fuel type. Must be a key of Config.FuelTypes
  • GlobalLootCooldown: shared cooldown in seconds across siphoning, wreck scavenging and pump scavenging. Any consumed loot action starts it. 0 disables

Feature Toggles

shared/config.lua
1Config.Features = {
2    Consumption = true,
3    RealisticConsumption = true,
4    DynamicTankSize = true,
5    Siphoning = true,
6    WreckScavenging = true,
7    PumpScavenging = true,
8    TankUpgrades = true,
9    FuelConversion = true,
10    WeatherEffects = true,
11    FuelGaugeUI = true,
12}
  • Consumption: fuel drains while driving
  • RealisticConsumption: drain derived from handling data (mass, acceleration, drivetrain) instead of a flat rate
  • DynamicTankSize: tank capacity in liters calculated from vehicle mass and class
  • Siphoning: steal fuel from parked vehicles into a jerry can
  • WreckScavenging: search wreck props for leftover fuel
  • PumpScavenging: extract fuel from abandoned gas station pumps
  • TankUpgrades: install capacity upgrades, persisted per plate
  • FuelConversion: convert a vehicle to another fuel type with a kit, persisted per plate
  • WeatherEffects: weather multiplies consumption
  • FuelGaugeUI: fuel gauge HUD while driving

Interaction

shared/config.lua
1Config.Interaction = {
2    mode = 'target',
3    key = 'E',
4}
  • mode: 'hybrid' (target + textui + item use), 'target' (ox_target + item use), 'textui' (text prompt + keybind + item use), 'item' (inventory item use only)
  • key: default key for the textui interaction. Registered as the ml_fuel_interact key mapping, so players can rebind it in the GTA keybind settings
Item use always works

Using a jerry can or fuel item from the inventory triggers the refuel flow in every interaction mode.

Fuel Types

shared/config.lua
1Config.FuelTypes = {
2    ['fuel'] = {
3        label = 'Gasoline',
4        color = '#2ecc71',
5        consumptionRate = 1.0,
6    },
7    ['diesel'] = {
8        label = 'Diesel',
9        color = '#f1c40f',
10        consumptionRate = 0.85,
11    },
12    ['kerosene'] = {
13        label = 'Kerosene',
14        color = '#90CAF9',
15        consumptionRate = 0.9,
16    },
17    -- 'biofuel', 'ethanol' and 'electricity' ship commented out. Uncomment to enable.
18}
  • key: fuel type id. Stored on the vehicle state and inside jerry can metadata
  • label: display name used in the HUD, notifications and item tooltips
  • color: hex color in the HUD and Transfer UI
  • consumptionRate: drain multiplier for vehicles running this fuel

Fuel Type per Vehicle

shared/config.lua
1Config.VehicleCategories = {
2    [0]  = 'fuel',   -- Compacts
3    [1]  = 'fuel',   -- Sedans
4    [7]  = 'diesel', -- Super
5    [10] = 'diesel', -- Industrial
6    [12] = 'diesel', -- Vans
7    [14] = 'diesel', -- Boats
8    [15] = 'diesel', -- Helicopters
9    [16] = 'diesel', -- Planes
10    [19] = 'diesel', -- Military
11    [20] = 'diesel', -- Commercial
12    -- one entry per GTA vehicle class index (0-21)
13}
14
15Config.VehicleOverrides = {
16    [`wapoc3`] = 'diesel',
17    -- [`insurgent`] = 'diesel',
18}
  • VehicleCategories: fuel type per GTA vehicle class index. Used when a vehicle has no override
  • VehicleOverrides: force a fuel type for specific models. Keys are model hashes (backtick syntax)

Fuel Items (Simple Consumables)

One-use containers. The item is removed on use and its liters go into the tank.

shared/config.lua
1Config.FuelItems = {
2    ['fuel_liter'] = {
3        fuelType = 'fuel',
4        liters = 1.0,
5        label = 'Gasoline (1L)',
6        propKey = 'bottle',
7    },
8    ['fuel_canister'] = {
9        fuelType = 'fuel',
10        liters = 5.0,
11        label = 'Gasoline Canister (5L)',
12        propKey = 'jerrycan',
13    },
14    ['diesel_liter']    = { fuelType = 'diesel', liters = 1.0, label = 'Diesel (1L)', propKey = 'bottle' },
15    ['diesel_canister'] = { fuelType = 'diesel', liters = 5.0, label = 'Diesel Canister (5L)', propKey = 'jerrycan' },
16    ['biofuel_bottle']  = { fuelType = 'biofuel', liters = 2.0, label = 'Biofuel Bottle (2L)', propKey = 'bottle' },
17    ['kerosene_can']    = { fuelType = 'kerosene', liters = 5.0, label = 'Kerosene Can (5L)', propKey = 'jerrycan' },
18    ['fuel_sample']     = { fuelType = 'fuel', liters = 0.5, label = 'Fuel Sample (0.5L)', propKey = 'bottle' },
19}
  • fuelType: must match a key in Config.FuelTypes. The vehicle must run the same type
  • liters: liters added when the item is consumed
  • label: display name in menus and notifications
  • propKey: optional. References Config.Props to override the in-hand prop during the refuel animation
  • skipUseItem: optional, default false. Set true when another resource registers the same item name; ml_fuel then skips its use-item hook and the item still works through the vehicle target

Jerry Cans (Advanced Mode)

Refillable containers. Fuel amount and type live in item metadata; the item itself is never consumed. Requires FuelMode = 'advanced' and a metadata-capable inventory.

shared/config.lua
1Config.JerryCans = {
2    ['jerrycan_empty'] = {
3        skipUseItem = true,
4        label = 'Jerry Can',
5        capacity = 25,
6        acceptsFuel = { 'fuel', 'diesel' },
7        propKey = 'prop_jerrycan_01a',
8    },
9    ['plastic_bottle_empty'] = {
10        skipUseItem = true,
11        label = 'Plastic Bottle',
12        capacity = 0.5,
13        acceptsFuel = { 'fuel', 'diesel' },
14        propKey = 'dgm_bottle2',
15    },
16    -- ['fuel_barrel'] = { label = 'Fuel Barrel', capacity = 200, acceptsFuel = { 'fuel', 'diesel' } },
17}
  • capacity: maximum liters the container holds. Written to the maxCapacity metadata key
  • acceptsFuel: fuel types the container accepts. A can holding one type refuses a different one until emptied
  • label: display name in the Transfer UI and notifications
  • propKey: optional in-hand prop override for the pour/hold/siphon animations
  • skipUseItem: optional. Skip the use-item registration when another resource owns the same item name (the vehicle target still works)

Consumption

shared/config.lua
1Config.Consumption = {
2    tickInterval = 1000,
3    baseRate = 0.02,
4    damageMultiplier = 2.0,
5    tankHealthThreshold = 700,
6    replicationInterval = 15,
7    globalMultiplier = 4.0,
8    onlyWhenEngineRunning = true,
9
10    idleDrain = {
11        enabled = true,
12        tickInterval = 10000,
13        ratePercent = 0.05,
14    },
15}
  • tickInterval: ms between drain ticks while driving
  • baseRate: percent drained per tick when RealisticConsumption is disabled
  • damageMultiplier: drain multiplier when the petrol tank is damaged
  • tankHealthThreshold: petrol tank health below this value counts as damaged (leak)
  • replicationInterval: fuel is replicated to other clients every N ticks; between replications the level is local to the driver
  • globalMultiplier: scales all drain. 1.0 = realistic, higher = faster economy
  • onlyWhenEngineRunning: drain only while the engine runs. Keep true
  • idleDrain: server-side drain for vehicles left running with no driver: ratePercent of the tank every tickInterval ms. The engine shuts off at 0

Realistic Consumption

Used when Config.Features.RealisticConsumption = true. Drain is computed per tick from class base consumption, distance, speed band, handling data, engine state and environment.

shared/config.lua
1Config.RealisticConsumption = {
2    baseLitersPerKm = 1.2,
3    handlingFactors = {
4        massWeight = 0.6,
5        accelerationWeight = 0.5,
6        maxSpeedWeight = 0.2,
7        drivetrainWeight = 0.1,
8    },
9    drivetrainMultipliers = { FWD = 0.9, RWD = 1.0, AWD = 1.25 },
10    speedModifiers  = { idle = 0.2, city = 1.0, highway = 0.8, racing = 1.5 },
11    speedThresholds = { idle = 5, city = 60, highway = 120, racing = 150 },
12    engineStateModifiers = { accelerating = 1.3, braking = 0.5, coasting = 0.3, reversing = 1.2 },
13    environmentModifiers = { offroad = 1.4, water = 1.8, incline = 1.2 },
14    classBaseConsumption = {
15        [0]  = 0.05, -- Compacts
16        [6]  = 0.15, -- Sports
17        [7]  = 0.20, -- Super
18        [8]  = 0.04, -- Motorcycles
19        [10] = 0.25, -- Industrial
20        [15] = 0.50, -- Helicopters
21        [16] = 0.80, -- Planes
22        -- one entry per GTA vehicle class index (0-21)
23    },
24}
  • baseLitersPerKm: global base before modifiers
  • handlingFactors: weights for mass, acceleration, top speed and drivetrain read from the vehicle handling file
  • drivetrainMultipliers: multiplier by drive layout
  • speedModifiers / speedThresholds: consumption band by current speed (km/h)
  • engineStateModifiers: accelerating burns more, coasting burns less
  • environmentModifiers: extra cost offroad, in water, on an incline
  • classBaseConsumption: liters-per-km base by vehicle class

Tank Size

shared/config.lua
1Config.TankSize = {
2    defaultTankLiters = 60.0,
3    classMultipliers = {
4        [0]  = 0.7, -- Compacts
5        [8]  = 0.6, -- Motorcycles
6        [12] = 2.0, -- Vans
7        [15] = 2.5, -- Helicopters
8        [16] = 5.0, -- Planes
9        [19] = 3.0, -- Military
10        -- one entry per GTA vehicle class index (0-21)
11    },
12    overrides = {
13        [`zentorno`]  = 75.0,
14        [`insurgent`] = 200.0,
15    },
16    handlingBasedCalculation = {
17        enabled = true,
18        massMultiplier = 0.04,
19        minTankLiters = 25.0,
20        maxTankLiters = 600.0,
21    },
22}
  • defaultTankLiters: base tank when mass-based calculation is disabled
  • classMultipliers: scales the tank by vehicle class
  • overrides: exact tank size in liters for specific models
  • handlingBasedCalculation: when enabled, tank = vehicle mass × massMultiplier × class multiplier, clamped between minTankLiters and maxTankLiters

Refuel

shared/config.lua
1Config.Refuel = {
2    tickInterval = 250,
3    refillRate = 0.5,
4    maxDistance = 3.0,
5    fuelCapBones = { 'petrolcap', 'petroltank', 'petroltank_l', 'hub_lr', 'engine' },
6    animation = { dict = 'weapon@w_sp_jerrycan', clip = 'fire' },
7}
  • tickInterval / refillRate: pour speed: percent added per tick
  • maxDistance: max distance from the vehicle to refuel
  • fuelCapBones: bones probed to locate the fuel cap. Falls back to the entity position when none exist
  • animation: refuel animation dictionary and clip

Tank Upgrades

shared/config.lua
1Config.TankUpgrades = {
2    ['tank_expansion_small'] = {
3        label = 'Small Tank Expansion',
4        bonusLiters = 15.0,
5        maxStacks = 2,
6        duration = 20000,
7        requiredTool = 'siphon_hose',
8        animation = { dict = 'mini@repair', clip = 'fixing_a_ped' },
9    },
10    ['tank_expansion_medium'] = {
11        label = 'Medium Tank Expansion',
12        bonusLiters = 30.0,
13        maxStacks = 2,
14        duration = 35000,
15        requiredTool = 'siphon_hose',
16        animation = { dict = 'mini@repair', clip = 'fixing_a_ped' },
17    },
18    ['tank_expansion_large'] = {
19        label = 'Large Tank Expansion',
20        bonusLiters = 100.0,
21        maxStacks = 1,
22        duration = 50000,
23        requiredTool = 'siphon_hose',
24        vehicleClasses = { 7, 10, 12, 19, 20 },
25        animation = { dict = 'mini@repair', clip = 'fixing_a_ped' },
26    },
27}
  • key: the upgrade item name. The item is consumed on install
  • bonusLiters: liters added to the tank. Persisted per plate in the database
  • maxStacks: how many of this upgrade a single vehicle can hold
  • duration: install time in ms
  • requiredTool: item the player must carry (not consumed)
  • vehicleClasses: optional. Restrict the upgrade to these class indexes

Fuel Conversion

shared/config.lua
1Config.ConversionKits = {
2    ['diesel_conversion_kit'] = {
3        targetFuel = 'diesel',
4        duration = 30000,
5        animation = { dict = 'mini@repair', clip = 'fixing_a_ped' },
6    },
7    ['biofuel_conversion_kit'] = {
8        targetFuel = 'biofuel',
9        duration = 45000,
10        animation = { dict = 'mini@repair', clip = 'fixing_a_ped' },
11    },
12    ['ethanol_conversion_kit'] = {
13        targetFuel = 'ethanol',
14        duration = 40000,
15        animation = { dict = 'mini@repair', clip = 'fixing_a_ped' },
16    },
17}
  • targetFuel: fuel type the vehicle runs after conversion. Must exist in Config.FuelTypes to be usable
  • duration: conversion time in ms. The kit is consumed

Conversions are stored per plate in ml_fuel_conversions and reapplied when the vehicle spawns. Electric vehicles cannot be converted.

Siphoning

shared/config.lua
1Config.Siphoning = {
2    requiredItem = 'siphon_hose',
3    degradeItem = true,
4    degradeAmount = 5,
5
6    minigame = {
7        enabled = true,
8        minigame = nil,
9        difficulty = 'medium',
10        onFail = {
11            notifyPlayer = true,
12            alertDispatch = false,
13            dispatch = {
14                jobs = { 'police' },
15                code = '10-31',
16                messageKey = 'dispatch_siphon',
17                descriptionKey = 'dispatch_siphon_desc',
18                blip = { sprite = 361, scale = 1.0, color = 1, flash = true },
19            },
20        },
21    },
22
23    maxSiphonPercent = 50,
24    maxLitersPerAttempt = 20,
25    siphonRate = 3.0,
26    duration = 30000,
27    cooldownSeconds = 60,
28    perPlayerCooldown = 90,
29    alertOwner = false,
30    blockOwnedVehicles = false,
31
32    animation = {
33        dict = 'timetable@gardener@filling_can',
34        clip = 'gar_ig_5_filling_can',
35        flags = 49,
36        propKey = nil,
37    },
38
39    protectedVehicles = {
40        models = { `whelix`, `whelix1`, `whelix2` },
41        plates = {},
42    },
43}
  • requiredItem: tool the player must carry (siphon hose)
  • degradeItem / degradeAmount: durability lost by the hose per siphon
  • maxSiphonPercent: at most this percent of the fuel currently in the tank can be drawn per attempt
  • maxLitersPerAttempt: hard liter cap per attempt
  • cooldownSeconds: per-vehicle cooldown between siphons
  • perPlayerCooldown: per-player cooldown across all vehicles
  • blockOwnedVehicles: block siphoning from player-owned vehicles (checked against the vehicle database)
  • protectedVehicles: model hashes and plates that can never be siphoned
Occupied vehicles

Siphoning a vehicle with someone inside is always blocked. Only one player can siphon a given vehicle at a time.

Vehicle Wrecks

shared/config.lua
1Config.VehicleWrecks = {
2    enabled = true,
3    requiredItem = 'siphon_hose',
4    cooldownMinutes = 30,
5    maxDistance = 2.0,
6
7    findChance = 65,
8    minLiters = 0.5,
9    maxLiters = 5.0,
10
11    fuelTypeWeights = {
12        fuel = 70,
13        diesel = 30,
14    },
15
16    minigame = { enabled = true, difficulty = 'medium', --[[ same shape as Siphoning.minigame ]] },
17
18    animation = {
19        dict = 'timetable@gardener@filling_can',
20        clip = 'gar_ig_5_filling_can',
21        flags = 49,
22        duration = 8000,
23        propKey = 'prop_jerrycan_01a',
24    },
25
26    props = {
27        [`prop_rub_carwreck_13`] = { multiplier = 1.0 },
28        [`prop_rub_buswreck`] = {
29            multiplier = 1.5,
30            fuelType = 'diesel',
31            maxLiters = 10.0,
32        },
33        -- 25 vanilla wreck props ship enabled; add your MLO/addon wreck props here
34    },
35}
  • cooldownMinutes: per-wreck cooldown shared by all players. Resets on server restart
  • findChance / minLiters / maxLiters: global roll, overridable per prop
  • fuelTypeWeights: probability per fuel type, must sum to 100
  • props: wreck models that can be searched. Per-prop keys: multiplier, fuelType, minLiters, maxLiters, findChance

Pump Scavenging

shared/config.lua
1Config.PumpScavenging = {
2    requiredItem = 'electric_pump',
3
4    models = {
5        `prop_gas_pump_old2`, `prop_gas_pump_1a`, `prop_vintage_pump`,
6        `prop_gas_pump_old3`, `prop_gas_pump_1c`, `prop_gas_pump_1b`,
7        `prop_gas_pump_1d`,
8    },
9
10    detectionRadius = 100.0,
11    interactionDistance = 2.0,
12    perPlayerCooldown = 120,
13    duration = 8000,
14    failChance = 20,
15
16    minigame = { enabled = true, difficulty = 'easy', --[[ same shape as Siphoning.minigame ]] },
17
18    -- Advanced mode: fuel goes into jerry can metadata via the Transfer UI
19    fuel = {
20        findChance = 75,
21        minLiters = 2.0,
22        maxLiters = 20.0,
23        availableFuelTypes = { 'fuel', 'diesel' },
24    },
25
26    -- Simple mode: give items directly (no metadata)
27    rewards = {
28        { item = 'plastic_bottle_empty', min = 7, max = 10, chance = 80 },
29        { item = 'jerrycan_empty',       min = 1, max = 2,  chance = 20 },
30    },
31
32    availability = {
33        enabled = true,
34        minActiveStations = 10,
35        maxActiveStations = 18,
36        minStationCharges = 2,
37        maxStationCharges = 5,
38        refreshMinMinutes = 15,
39        refreshMaxMinutes = 30,
40    },
41
42    stationLockTimeoutMs = 12000,
43
44    staffCommand = {
45        command = 'showpumps',
46        blipDuration = 30,
47        blipSprite = 361,
48        blipColor = 2,
49    },
50
51    zoneRadius = 30.0,
52    locations = {
53        vec3(49.4187, 2778.793, 58.043),
54        vec3(263.894, 2606.463, 44.983),
55        -- 27 gas station coordinates ship by default
56    },
57}
  • requiredItem: tool needed to work a pump (electric pump)
  • models: pump prop models detected inside station zones
  • perPlayerCooldown: seconds after a successful scavenge before the same player can scavenge any station
  • fuel: advanced mode yield: chance, liter range, and the fuel types a pump can produce (picked at random per scavenge)
  • rewards: simple mode yield: physical items with quantity ranges and chances
  • failChance: percent chance an attempt yields nothing (both modes)
  • availability: station rotation. A random subset of stations is active with a random number of charges; each successful scavenge consumes one charge; depleted stations stay empty until the next rotation. Disable to keep every station always active
  • stationLockTimeoutMs: a station is locked while someone scavenges it; the lock auto-releases after this many ms if the player disconnects
  • staffCommand: admin command name and blip settings for showing active stations
  • zoneRadius / locations: detection zones built around each gas station coordinate

Minigames

Pump scavenging, wreck scavenging and siphoning can each require a minigame. Every feature carries the same minigame block:

shared/config.lua
1minigame = {
2    enabled    = true,
3    minigame   = nil,      -- explicit ID from Config.AvailableMiniGames, nil = use difficulty
4    difficulty = 'medium', -- 'easy' | 'medium' | 'hard' | 'extreme'
5    onFail = {
6        notifyPlayer  = true,
7        alertDispatch = false,
8        dispatch = {
9            jobs = { 'police' },
10            code = '10-31',
11            messageKey = 'dispatch_siphon',
12            descriptionKey = 'dispatch_siphon_desc',
13            blip = { sprite = 361, scale = 1.0, color = 1, flash = true },
14        },
15    },
16}
  • minigame: pin one specific minigame ID. When nil, the ID is resolved from difficulty through Config.DefaultMinigameByDifficulty
  • onFail.notifyPlayer: show the failure notification
  • onFail.alertDispatch: send a dispatch alert to the configured jobs with the given code and blip
shared/config.lua
1Config.DefaultMinigameByDifficulty = {
2    easy    = 'ox_skillcheck_easy',
3    medium  = 'ox_skillcheck_medium',
4    hard    = 'ox_skillcheck_hard',
5    extreme = 'ox_skillcheck_hard_wasd',
6}

Available IDs are registered by the provider files in shared/config/minigames/. The ox_lib provider always registers ox_skillcheck_easy, ox_skillcheck_medium, ox_skillcheck_hard, ox_skillcheck_hard_wasd and ox_skillcheck_easy_medium. The MGC and PS-UI providers register their own IDs only when those resources are running. Open the provider files for the full list.

Fuel Gauge HUD

shared/config.lua
1Config.UI = {
2    enabled = true,
3    showFuelType = true,
4    showPercentage = true,
5    gaugeStyle = 'survival',
6}
  • enabled: show the gauge while driving
  • showFuelType: show the fuel type label on the gauge
  • showPercentage: show the numeric percentage
  • gaugeStyle: 'survival' | 'modern' | 'minimal'

Transfer UI

shared/config.lua
1Config.TransferUI = {
2    enabled = true,
3    maxFlowRate = 0.8,
4    easingTime = 1.0,
5    tickRate = 50,
6
7    sounds = {
8        enabled = true,
9        pourStart = 'NAV_UP_DOWN',
10        pourLoop = nil,
11        pourStop = 'BACK',
12        complete = 'WEAPON_PURCHASE',
13    },
14}
  • maxFlowRate: liters per second at full flow while holding to pour or siphon
  • easingTime: seconds for the flow to ramp up to full speed
  • sounds: GTA frontend sound names per phase. Set enabled = false to mute

Props and Animations

shared/config.lua
1Config.Props = {
2    jerrycan = {
3        model = 'prop_jerrycan_01',
4        bone = 57005,
5        pos = vec3(0.11, 0.03, 0.05),
6        rot = vec3(0.0, -90.0, 0.0),
7    },
8    bottle = {
9        model = 'dgm_bottle2',
10        bone = 57005,
11        pos = vec3(0.12, 0.03, 0.02),
12        rot = vec3(-90.0, 0.0, 0.0),
13    },
14}
15
16Config.Animations = {
17    holdJerryCan      = { dict = 'weapon@w_sp_jerrycan', clip = 'idle', flags = 49, propKey = 'jerrycan' },
18    pourIntoVehicle   = { dict = 'weapon@w_sp_jerrycan', clip = 'fire', flags = 49, propKey = 'jerrycan' },
19    siphonFromVehicle = { dict = 'anim@amb@clubhouse@tutorial@bkr_tut_ig3@', clip = 'machinic_loop_mechandplayer', flags = 49, propKey = nil },
20    useFuelBottle     = { dict = 'weapon@w_sp_jerrycan', clip = 'fire', flags = 49, propKey = 'bottle' },
21}
  • Props: reusable in-hand prop presets attached to the right hand (bone 57005). Items and animation presets reference them via propKey
  • Animations: animation presets for holding, pouring, siphoning and one-shot bottle use. Flag 49 = loop + upper body + player control

Weather Effects

shared/config.lua
1Config.WeatherEffects = {
2    enabled = true,
3    modifiers = {
4        [`RAIN`] = 1.15,
5        [`THUNDER`] = 1.20,
6        [`SNOW`] = 1.25,
7        [`BLIZZARD`] = 1.30,
8        [`SNOWLIGHT`] = 1.15,
9        [`FOGGY`] = 1.05,
10        [`SMOG`] = 1.08,
11    },
12    default = 1.0,
13}
  • modifiers: consumption multiplier per weather type hash
  • default: multiplier for any weather not listed

No-Loot Zones

shared/config.lua
1Config.NoLootZones = {
2    enabled = true,
3    zones = {
4        {
5            type = 'sphere',
6            coords = vec3(2203.33, 3185.1, 49.01),
7            radius = 150.0,
8            blockWreckScavenge = true,
9            blockPumpScavenge = true,
10            blockSiphon = true,
11        },
12        -- { type = 'box', coords = vec3(100, 200, 30), size = vec3(50, 50, 10), rotation = 0, blockSiphon = true },
13    },
14}
  • zones: sphere or box areas where looting is blocked. Each zone picks which actions it blocks: blockWreckScavenge, blockPumpScavenge, blockSiphon

Electric Vehicles

shared/config.lua
1Config.ElectricVehicles = {
2    'voltic', 'voltic2', 'tezeract', 'cyclone', 'cyclone2',
3    'raiden', 'neon', 'imorgon', 'dilettante', 'dilettante2',
4    'surge', 'khamelion', 'caddy', 'caddy2', 'caddy3',
5    'airtug', 'rcbandito', 'omnisegt',
6}

On game build 3258 or newer, electric detection uses the native flag and this list is ignored. On older builds the list decides which models count as electric.

Charging Stations

shared/config.lua
1Config.ChargingStations = {
2    enabled = true,
3    model = `prop_electricbox_02a`,
4    interactionDistance = 2.5,
5
6    canChargeVehicle = true,
7    canChargePowerCell = true,
8
9    storageEnabled = true,
10    maxCapacityKwh = 500.0,
11    rechargeRatePerMinute = 5.0,
12
13    vehicleChargeRatePerSecond = 4.0,
14    cellChargeRatePerSecond = 2.0,
15    kwhPerVehiclePercent = 0.5,
16    kwhPerCellPercent = 0.3,
17
18    animation = {
19        dict = 'anim@heists@prison_heiststation@cop_reactions',
20        clip = 'cop_b_idle',
21    },
22
23    locations = {
24        -- { coords = vec3(x, y, z), heading = 0.0, storage = 500.0 },
25    },
26}
  • locations: charging station spots. Empty by default: add coordinates to enable charging in the world
  • storageEnabled: stations hold a kWh reserve that depletes as players charge and refills at rechargeRatePerMinute
  • vehicleChargeRatePerSecond / cellChargeRatePerSecond: percent gained per second by vehicles and power cells
  • kwhPerVehiclePercent / kwhPerCellPercent: kWh drained from the station per percent charged

Power Cells

shared/config.lua
1Config.PowerCells = {
2    ['power_cell'] = {
3        label = 'Power Cell',
4        maxCapacity = 100,
5        chargePerPercent = 1.0,
6        weight = 3000,
7    },
8    ['power_cell_heavy'] = {
9        label = 'Heavy Power Cell',
10        maxCapacity = 200,
11        chargePerPercent = 1.0,
12        weight = 8000,
13    },
14    ['solar_cell'] = {
15        label = 'Solar Power Cell',
16        maxCapacity = 50,
17        chargePerPercent = 1.0,
18        weight = 2000,
19        rechargesFromSun = true,
20        solarRechargeRate = 0.5,
21    },
22}
  • maxCapacity: charge units the cell holds. The current charge lives in the item metadata
  • chargePerPercent: cell units spent per vehicle percent when used on an electric vehicle
  • rechargesFromSun / solarRechargeRate: solar cells slowly recharge on their own

HRS Generators

open/shared.lua
1Config.HRS = {
2    enabled = true,
3    fuelTypeMapping = {
4        ['fuel']     = 'fuel',
5        ['gasoline'] = 'fuel',
6        ['diesel']   = 'diesel',
7        ['kerosene'] = 'kerosene',
8        ['biofuel']  = 'biofuel',
9    },
10}
  • enabled: auto-detect hrs_base_building at startup
  • fuelTypeMapping: maps the fuelItem value set on an HRS generator to an ML Fuel type. Only jerry cans holding that type can refuel the generator

Discord Webhooks

shared/config_server.lua
1Config.Logger = 'discord'
2
3Config.Log = {
4    FuelActions    = false,
5    Conversions    = false,
6    PumpScavenging = false,
7    Exploits       = false,
8    JerryCanRefuel = false,
9    JerryCanSiphon = false,
10    TankUpgrades   = false,
11    WreckScavenge  = false,
12    AdminActions   = false,
13}
14
15Config.LogSettings = {
16    Interval = 60000,
17    Color = 3447003,
18    ExploitColor = 15158332,
19    AuthorName = 'ML Fuel',
20    AuthorIcon = 'https://i.imgur.com/IG2pTbK.png',
21}
22
23Config.AdminPermissions = {
24    'command',
25    'admin',
26    'god',
27    'superadmin',
28}
  • Log: one webhook URL per category: refuels, conversions, pump scavenges, exploit warnings, jerry can refuels and siphons, tank upgrades, wreck scavenges, admin actions
  • AdminPermissions: permission groups accepted by the admin commands and debug tools

Set any webhook to false to disable that log entirely.