Configuration

8 min readUpdated 2 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
4Config.MAX_DUI_SURFACES = 6
  • 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
  • MAX_DUI_SURFACES: tank displays drawn at the same time. Each one keeps a browser surface for the whole session, so they are reused between tanks
shared/config.lua
1Config.UiHints = {
2    ShowMissingRepairItem = true,
3    NotifyBlockedAction = true,
4}
5
6Config.Cleanup = {
7    BusyTanksOnPlayerDropped = true,
8}
9
10Config.Animations = {
11    dismantle = {
12        start = { duration = 5000, label = 'progress_dismantle', dict = 'amb@prop_human_bum_bin@base', clip = 'base' },
13        finish = { duration = 2000, label = 'progress_dismantle_done', dict = 'anim@mp_snowball', clip = 'pickup_snowball' },
14    },
15}
  • ShowMissingRepairItem: shows a tooltip on a repair card when the player lacks the item
  • NotifyBlockedAction: notifies the player who clicks a disabled card or action
  • BusyTanksOnPlayerDropped: frees a tank in use when its player disconnects
  • Animations.dismantle: progress bar time, label and animation of the two dismantle steps

Auto-Deletion

shared/config.lua
1Config.DELETE_OLD_DAYS = 10
2Config.DELETE_OPTIONS = {
3    DeleteOnlyIfEmpty = true,
4    DeleteOnlyIfBroken = false,
5}
  • DELETE_OLD_DAYS: deletes tanks whose level and health have not changed for this many days. Checked at resource start. 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: gives health back to a broken fixed tank without infiniteHealth
  • FixedTankAutoHeal.HealPerMinute: health added each minute while the tank is broken. Normal decay applies again once it is above zero. Set 0 to disable

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. The server caps it at 4 meters
  • 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

Pouring into tanks

shared/config.lua
1Config.CollectItems = {
2    water = {
3        ['bottle_water'] = { amount = 1, add = 0.5, give = 'bottle_empty' },
4    },
5}
  • key: the filled item the player pours into the tank
  • add: liquid added to the tank per item
  • give: empty container handed back
  • amount: not read by the script, leave it as it is

Filling containers from tanks

shared/config.lua
1Config.FillItems = {
2    water = {
3        ['bottle_empty'] = { remove = 1, take = 0.5, give = 'bottle_water' },
4    },
5}
  • key: the empty container the player fills
  • take: liquid removed from the tank per item
  • give: filled item given to the player
  • remove: empty items consumed

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 their content in item metadata (fuelType, fuelAmount, maxCapacity). Bottles, jugs and buckets use liquidType, liquidAmount and maxCapacity. The key names can be changed in shared/metadata.lua.

Jerry Can Items

The jerry can items are not in _INSTALL/ox_items.txt. Register them yourself, or use the ones a fuel resource already provides.

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        infiniteHealth = true,
8    },
9}
  • 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
  • infiniteHealth: optional. true keeps the tank at full health with no decay

Fixed tanks cannot be dismantled by players.

Base Building

These settings only apply when Outpost (ml_base_building) runs.

shared/config.lua
1Config.BaseBuilding = {
2    enabled = 'auto',
3    canPlaceOutsideBase = true,
4    permission = false,
5    blockDuringRaid = false,
6    whileLoading = 'deny',
7    protectTanksInsideBases = true,
8}
  • enabled: 'auto' uses the base rules when Outpost runs, true does the same and warns once if it is missing, false turns it off
  • canPlaceOutsideBase: true allows tanks anywhere except inside another player's base. false allows them only inside a base the player can build in
  • permission: false accepts any crew member in a base the player does not own. 'canBuild' also needs the build permission of the crew
  • blockDuringRaid: true blocks placing inside a base under raid
  • whileLoading: 'deny' or 'allow' while bases still load after a restart
  • protectTanksInsideBases: a tank inside a base can only be used by the player who placed it and by whoever holds the base
shared/config.lua
1Config.BaseMachines = {
2    enabled = true,
3    offeredByDefault = true,
4    tanks = {
5        ['small_tank'] = {
6            offeredByDefault = false,
7            label    = 'Small Water Tank',
8            category = 'utility',
9            tier     = 1,
10            life     = 3000.0,
11            bbox     = vec3(1.2, 1.2, 1.6),
12            cost     = { wood = 60, metal = 60 },
13            upkeep   = { metal = 2 },
14            useRange = 2.5,
15        },
16    },
17}

Players can also build a tank as a piece of their base. It is the same tank, with the same liquid, interface and recipes, but the base owns it: the base charges the materials and upkeep, raiders can break it, and it is repaired with the base tools. A built tank never decays here, is never removed by DELETE_OLD_DAYS and does not count toward TANK_LIMIT_PER_PLAYER. When it is destroyed, the liquid inside is lost.

  • enabled: false stops registering the pieces. Remove the built pieces first, or they freeze until you turn it back on
  • offeredByDefault: whether the pieces start as buildable, first run only. A piece can set its own value
  • tanks: one entry per container type of Config.Containers. The file ships small_tank, medium_tank and large_tank
  • label, category, tier, life, bbox, cost, upkeep, useRange: name, build wheel section, tier, health, footprint, build cost, upkeep and use range

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.