Configuration

5 min readUpdated 3 weeks ago

Overview

  • shared/config.lua: Interaction, theme, limits, decay, weather, liquids, containers, jerry cans, fixed tanks
  • server/config_server.lua: Discord webhook URLs

General Settings

shared/config.lua
1Config.Interaction = nil
2Config.Theme = 'default'
3Config.Debug = false
4Config.Locale = 'en'
  • Interaction: Interaction mode. nil = auto-detect, 'textui' = force ox_lib text UI, 'target' = force targeting
  • Theme: UI theme. Options: 'default', 'wasteland', 'cyberpunk', 'noir', 'fantasy'
  • Debug: Print debug messages to server/client console
  • Locale: Language code for translations

Tank Limits & Placement

shared/config.lua
1Config.TANK_LIMIT_PER_PLAYER = 3
2Config.PROGRESS_INSTALL = 5000
3Config.ENABLE_DUI = true
  • TANK_LIMIT_PER_PLAYER: Maximum player-placed tanks per character
  • PROGRESS_INSTALL: Time in milliseconds to place a tank
  • ENABLE_DUI: Show the animated 3D circle UI above tanks displaying fill level

Auto-Deletion

shared/config.lua
1Config.DELETE_OLD_DAYS = 10
2Config.DELETE_OPTIONS = {
3    DeleteOnlyIfEmpty = true,
4    DeleteOnlyIfBroken = false,
5}
  • DELETE_OLD_DAYS: Delete inactive tanks after this many days. Set to false to disable
  • DeleteOnlyIfEmpty: Only auto-delete tanks with 0 liquid
  • DeleteOnlyIfBroken: Only auto-delete tanks with 0 health

Broken Tank Behavior

shared/config.lua
1Config.BrokenTank = {
2    AllowDismantleWhenBroken = true,
3    AutoDrainOnBreak = true,
4    AllowTakeFromBroken = true,
5    BrokenSpillagePercent = 0.5,
6    AllowFillBroken = false,
7}
8
9Config.FixedTankAutoHeal = {
10    Enabled = true,
11    HealPerMinute = 2.0,
12}
  • AllowDismantleWhenBroken: Allow dismantling a broken tank even if liquid remains (liquid is lost)
  • AutoDrainOnBreak: When health hits 0, the tank liquid level snaps to 0
  • AllowTakeFromBroken: Take / drain operations still work on a broken tank, with spillage
  • BrokenSpillagePercent: Fraction (0..1) of the transfer lost while broken. 0.5 = half wasted
  • AllowFillBroken: Allow filling a broken tank or pouring jerry cans into it
  • FixedTankAutoHeal.Enabled: Auto-heal fixed tanks (without infiniteHealth) so they never stay broken forever
  • FixedTankAutoHeal.HealPerMinute: Health restored every 60s tick. Set 0 to disable healing

Liquid Types

shared/config.lua
1Config.LiquidTypes = {
2    ['water'] = {
3        label = 'Water',
4        color = '#3498db',
5        colorDark = '#2980b9',
6        viscosity = 0.3,
7        waveSpeed = 1.0,
8        waveAmp = 5,
9        bubbles = 8,
10        shimmer = false,
11        transparency = 0.85,
12    },
13}
  • label: Display name in the UI
  • color: Primary liquid color (hex)
  • colorDark: Secondary/shadow liquid color (hex)
  • viscosity: Liquid thickness. Lower = more fluid movement in DUI
  • waveSpeed: Speed of wave animation in the DUI circle
  • waveAmp: Wave amplitude in pixels
  • bubbles: Number of bubble particles in the DUI
  • shimmer: Enable shimmer/sparkle effect on liquid surface
  • transparency: Liquid opacity. 1.0 = fully opaque, 0.0 = invisible

Weather Integration

shared/config.lua
1Config.EnableRainCollection = true
2Config.RainyFillableTypes = { 'water' }
  • EnableRainCollection: Tanks auto-fill during rain
  • RainyFillableTypes: Liquid types that accumulate during rain. Only types listed here are affected

Container Types

shared/config.lua
1Config.Containers = {
2    ['small_tank'] = {
3        prop = 'prop_air_watertank3',
4        item = 'small_water_tank',
5        capacity = 50.0,
6        maxHealth = 100.0,
7        decayRate = 0.5,
8        type = 'water',
9        interactionDistance = 2.5,
10        spawnDistance = 30.0,
11        duiDistance = 8.0,
12        duiScale = 0.04,
13        duiOffset = vec3(0.0, 0.0, -1.0),
14        rainFillAmount = 0.15,
15        repairItems = {
16            ['steel'] = { addHealth = 50.0 },
17        },
18    },
19}
  • prop: GTA prop model name
  • item: Inventory item that places this tank
  • capacity: Maximum liquid capacity in liters
  • maxHealth: Maximum tank durability
  • decayRate: Health lost per decay cycle (every 60 seconds)
  • type: Default liquid type (must match a key in Config.LiquidTypes)
  • interactionDistance: Maximum distance to interact with the tank
  • spawnDistance: Distance at which the prop is rendered client-side
  • duiDistance: Distance at which the 3D DUI circle appears
  • duiScale: Size of the DUI circle
  • duiOffset: Position offset of the DUI relative to the prop center (vec3)
  • rainFillAmount: Liquid added per rain cycle (every 60 seconds)
  • repairItems: Items that repair the tank. Each entry specifies addHealth (durability restored per use)

Item Conversions

Extracting from tanks

shared/config.lua
1Config.CollectItems = {
2    water = {
3        ['bottle_water'] = { amount = 1, add = 0.5, give = 'bottle_empty' },
4    },
5}
  • amount: Number of filled items to give the player
  • add: Liquid removed from tank per extraction
  • give: Empty container returned after extraction

Filling tanks

shared/config.lua
1Config.FillItems = {
2    water = {
3        ['bottle_empty'] = { remove = 1, take = 0.5, give = 'bottle_water' },
4    },
5}
  • remove: Number of empty items consumed
  • take: Liquid added to tank per fill
  • give: Filled item given to the player

Jerry Cans

shared/config.lua
1Config.JerryCans = {
2    ['jerrycan_small']     = { capacity = 10, acceptsLiquid = { 'fuel', 'diesel', 'biofuel' } },
3    ['jerrycan_medium']    = { capacity = 20, acceptsLiquid = { 'fuel', 'diesel', 'biofuel', 'ethanol' } },
4    ['jerrycan_large']     = { capacity = 50, acceptsLiquid = { 'fuel', 'diesel', 'biofuel', 'ethanol' } },
5    ['kerosene_container'] = { capacity = 25, acceptsLiquid = { 'kerosene' } },
6    ['fuel_barrel']        = { capacity = 200, acceptsLiquid = { 'fuel', 'diesel' } },
7}
  • capacity: Maximum liquid the jerry can holds
  • acceptsLiquid: List of liquid types this jerry can accepts

Jerry cans store dynamic fluid amounts via item metadata (fuelType, fuelAmount, maxCapacity).

Fixed Tanks

shared/config.lua
1Config.FixedTanks = {
2    {
3        id = 'sandy_shores_farm',
4        tankType = 'large_tank',
5        coords = vec3(-1414.2345, 5098.0386, 59.5271),
6        heading = 90.0,
7    },
8}
  • id: Unique identifier for the fixed tank (used in database)
  • tankType: Must match a key in Config.Containers
  • coords: World position (vec3)
  • heading: Rotation in degrees

Fixed tanks cannot be dismantled by players.

Discord Webhooks

server/config_server.lua
1Config.Log = {
2    saveTank      = 'YOUR_WEBHOOK',
3    fillTank      = 'YOUR_WEBHOOK',
4    takeWater     = 'YOUR_WEBHOOK',
5    repairTank    = 'YOUR_WEBHOOK',
6    dismantleTank = 'YOUR_WEBHOOK',
7    jerryCanFill  = 'YOUR_WEBHOOK',
8    jerryCanDrain = 'YOUR_WEBHOOK',
9    exploits      = 'YOUR_WEBHOOK',
10}
  • saveTank: Tank placement
  • fillTank: Liquid added to a tank
  • takeWater: Liquid extracted from a tank
  • repairTank: Tank repaired
  • dismantleTank: Tank dismantled and returned to inventory
  • jerryCanFill: Jerry can filled from a tank
  • jerryCanDrain: Jerry can drained into a tank
  • exploits: Anti-cheat alerts: rate limit, invalid coords, placement spoofing

Set any webhook to false to disable that log entirely.