# Configuration > Configuration reference for ML Camps Category: CAMPS · Source: https://miciomods.it/docs/ml-camps-configuration · Last updated: 2026-07-18 ## Overview - `shared/config/config.lua`: Global settings, raid HUD, loot key, presets, limits, permissions - `shared/config/camps.lua`: Example camps, seeded into the database once on first boot - `shared/config/peds.lua`: Ped models offered by the editor model picker (`pedModelList`) - `shared/config/weaponlist.lua`: Weapons offered by the editor weapon picker (`WeaponsList`) - `server/config_server.lua`: Log channels (Discord webhooks, FiveManage datasets). Never sent to clients Camps are created and edited in-game through the admin panel and stored in the database. The config values below are defaults: the settings modal inside the panel writes HUD and loot-key values to the database, and from then on the saved values win over `Config.HUD` and `Config.LootKey`. ## General **shared/config/config.lua** ```lua Config.Settings = { Locale = 'en', Debug = false, CreatorCommand = 'campsadmin', MoveHudCommand = 'raidhud', SyncRadius = 250.0, UnloadDelay = 120, CombatGrace = 60, CorpseCleanupDelay = 60, SeedExampleCamps = true, BlipsEnabled = true, NotifyOnEnter = true, } Config.Theme = 'default' ``` - `Locale`: Locale key from `locales/*.lua`. See that folder for the shipped files. - `Debug`: Console debug output - `CreatorCommand`: Chat command that opens the admin panel. Permission-gated through `Config.Permissions.Creator` - `MoveHudCommand`: Command any player runs to drag and scale their own raid HUD. Set `''` to disable - `SyncRadius`: Players within this range of a camp receive its peds and live blips - `UnloadDelay`: Seconds with no players inside `SyncRadius` before an active camp despawns back to idle - `CombatGrace`: Seconds after last contact before an engaged camp may reset to full strength - `CorpseCleanupDelay`: Seconds a dead camp ped stays in the world before cleanup - `SeedExampleCamps`: On first boot, if the `ml_camps` table is empty, insert the example camps from `shared/config/camps.lua` - `BlipsEnabled`: Master switch for world map blips - `NotifyOnEnter`: Notify a player when they enter an active camp zone - `Theme`: UI theme: 'default' | 'wasteland' | 'cyberpunk' | 'noir' | 'fantasy' ## Raid HUD **shared/config/config.lua** ```lua Config.HUD = { Enabled = true, Position = 'top-right', ResetVisibilityDefault = 'timer', } ``` - `Enabled`: Master switch for the raid HUD shown while inside a camp radius - `Position`: Default anchor: 'top-right' | 'top-center' | 'left-center' | 'bottom-right'. Each player can override their own position and size with the `MoveHudCommand` command - `ResetVisibilityDefault`: What the HUD shows after a camp is cleared: 'timer' (respawn countdown), 'status' (cleared badge, no countdown), 'hidden' (HUD disappears). 'status' and 'hidden' stop respawn-timer metagaming. Each camp can override this in the editor (Reset Info) > **INFO:** Database Override > > Saving the settings modal in the admin panel writes the HUD values to the `ml_camps_settings` table. From then on the database values are used and pushed live to every player; the config values only act as first-boot defaults. ## Loot Key **shared/config/config.lua** ```lua Config.LootKey = { Mode = 'virtual', Item = 'camp_key', ConsumeOnOpen = true, } ``` - `Mode`: 'virtual' (key tracked server-side, no inventory item) | 'item' (physical inventory item carrying camp metadata; the item must be registered, see the Installation page) - `Item`: Item mode only. Inventory item name handed out as the key - `ConsumeOnOpen`: Remove the key when the holder opens their first crate The key gate is enabled per camp in the editor (**Require key**). A random camp NPC carries the key; when it dies, the key is granted to the nearest raider. If the camp is cleared before the carrier drops it, the first credited raider receives it. One key unlocks every crate of that camp for its holder. In item mode the key carries `metadata.camp`, so it only opens the camp it was looted from. These values can also be changed from the settings modal in the admin panel and are then stored in the database. ## Camp Types **shared/config/config.lua** ```lua Config.CampTypes = { bandit = { label = 'Bandit Camp', blip = { sprite = 84, color = 1, scale = 0.9 } }, military = { label = 'Military Outpost', blip = { sprite = 489, color = 5, scale = 0.9 } }, scavenger = { label = 'Scavenger Den', blip = { sprite = 364, color = 47, scale = 0.9 } }, cartel = { label = 'Cartel Stronghold', blip = { sprite = 51, color = 1, scale = 0.9 } }, } ``` - Presets offered by the editor type field, driving the default blip look. Custom type strings are allowed; every camp can override its blip sprite, color and scale individually - `Config.CrateProps`: Loot crate prop presets ({ model, label }) offered by the editor crate picker. Admins can also type any custom prop model ## Aggression Presets **shared/config/config.lua** ```lua Config.Aggression = { defensive = { combatMovement = 1, combatAbility = 1, useCover = true, canCharge = false }, balanced = { combatMovement = 2, combatAbility = 1, useCover = true, canCharge = false }, aggressive = { combatMovement = 2, combatAbility = 2, useCover = true, canCharge = true }, berserk = { combatMovement = 2, combatAbility = 2, useCover = false, canCharge = true }, } ``` - `combatMovement`: 1 defensive, 2 will advance on the player - `combatAbility`: 1 average, 2 professional - `useCover`: NPC takes cover during firefights - `canCharge`: NPC may rush the player at close range Each NPC group picks one preset by name. Adding a new key here makes it selectable in the editor. ## Stealth **shared/config/config.lua** ```lua Config.Stealth = { crouchRangeMult = 0.55, sprintHearMult = 0.8, detectTicks = 2, alertRadius = 35.0, } ``` - `crouchRangeMult`: Crouched players are seen at this fraction of an NPC's seeing range - `sprintHearMult`: Sprinting players are heard within hearing range multiplied by this value - `detectTicks`: Detection cycles a player must stay in view before an NPC engages. Hearing alone needs one extra tick - `alertRadius`: When one NPC engages, other camp NPCs within this range also alert Shooting inside hearing range, damaging an NPC, or aiming directly at one triggers combat immediately. The per-NPC blip turns from neutral to suspicious to alerted as detection builds. ## NPC Defaults **shared/config/config.lua** ```lua Config.NpcDefaults = { health = 200, armor = 0, accuracy = 35, aggression = 'balanced', detectionRange = 40.0, fovAngle = 110.0, behavior = 'static', weaponMode = 'fixed', weapon = 'WEAPON_PISTOL', } ``` - Fallbacks applied when a camp NPC group omits a field. Field meanings are described under Camp Definition below ## Limits **shared/config/config.lua** ```lua Config.Limits = { maxNpcsPerCamp = 40, maxHealth = 5000, maxArmor = 500, maxRadius = 300.0, maxRaiders = 64, minRespawnDelay = 30, minResetDelay = 30, } ``` - Hard ceilings clamped server-side on every camp definition, including camps saved from the admin panel ## Permissions **shared/config/config.lua** ```lua Config.Permissions = { Creator = { useDefaultAdmins = true, ace = { 'ml_camps.creator', 'admin', 'god', 'superadmin', 'command', 'group.admin', 'group.superadmin' }, }, LiveActions = { useDefaultAdmins = true, ace = { 'ml_camps.admin', 'admin', 'god', 'superadmin', 'group.admin', 'group.superadmin' }, }, } ``` - `Creator`: Opens the admin panel, creates/edits/deletes camps, changes global settings - `LiveActions`: Force clear, force reset and teleport from the Live tab - `useDefaultAdmins`: Also accept anyone ml_bridge recognizes as a server admin - `ace`: ACE permissions accepted for the tier. Grant a single group with e.g. `add_ace group.mod ml_camps.creator allow` Permission checks are implemented in `open/handlers_server.lua` and can be replaced with custom logic. See the Developer page. ## Camp Definition Camps are normally built in the editor; the fields below are what the editor produces and what `shared/config/camps.lua` seeds on first boot. After the first boot the database is the source of truth and the file is no longer read. **shared/config/camps.lua** ```lua Config.Camps['bandit_grapeseed'] = { id = 'bandit_grapeseed', label = 'Grapeseed Bandit Camp', type = 'bandit', enabled = true, center = { x = 2447.0, y = 4968.0, z = 45.5 }, radius = 60.0, respawnEnabled = true, respawnDelay = 1800, resetDelay = 600, maxRaiders = 6, hud = { resetVisibility = 'inherit' }, blip = { enabled = true, sprite = 84, color = 1, scale = 0.9, showRadius = true }, npcs = { ... }, loot = { ... }, } ``` - `id`: Unique key, letters/numbers/underscore only - `type`: A `Config.CampTypes` key or any custom string - `enabled`: Disabled camps keep their data but never spawn - `center` / `radius`: The camp zone. A player crossing the radius activates the camp and is tracked as a raider - `respawnEnabled`: `false` makes the camp spawn-once: after a clear it goes to `depleted` and stays empty until a staff Force Reset - `respawnDelay`: Seconds a cleared camp stays on cooldown before it can spawn again - `resetDelay`: Seconds before an engaged-but-not-cleared camp respawns to full strength (combined with `Config.Settings.CombatGrace`) - `maxRaiders`: Players eligible for loot credit on clear, ordered by who entered the zone first - `hud.resetVisibility`: Per-camp override of the HUD reset info: 'inherit' | 'timer' | 'status' | 'hidden' - `blip`: Map blip. `showRadius` draws the zone circle. The blip color follows the live camp status ### NPC groups **shared/config/camps.lua** ```lua npcs = { { modelPool = { 'g_m_y_lost_01', 'g_m_y_lost_02', 'g_m_y_lost_03' }, count = 4, weaponMode = 'fixed', weapon = 'WEAPON_PISTOL', health = 200, armor = 0, accuracy = 30, aggression = 'balanced', detectionRange = 40.0, behavior = 'patrol', spawnMode = 'auto', }, } ``` - `model` / `modelPool`: Single ped model, or a pool one is picked from per spawn. Custom addon peds are allowed - `count`: NPCs spawned from this group - `weaponMode`: 'fixed' uses `weapon`, 'random' picks from `weaponPool` per spawn - `health` / `armor` / `accuracy`: Combat stats, clamped by `Config.Limits` - `aggression`: A `Config.Aggression` preset name - `detectionRange` / `fovAngle`: Seeing and hearing range in meters, and field of view in degrees - `behavior`: 'static' (holds position), 'patrol' (walks `patrolPoints` in order, or wanders the area when none are set), `'guard'` (defends a `guardRadius` around its spawn) - `spawnMode`: 'auto' scatters spawns around the camp center, 'fixed' cycles through `spawnPoints` - `patrolPoints`: The route a patrol NPC walks, in order, looping back to the start, placed in-game from the editor. Each waypoint carries a type: a `pass-through` point only shapes the walk, a `stop` parks the NPC there for a set number of seconds, and a `random stop` pauses it on some laps and walks it past on others. Cycle the type with `R` as you drop each point, or change it per point in the list. Random-stop odds default to `Config.NpcDefaults.patrolStopChance`, and a point with no set duration falls back to `patrolWaitDefault`. A stop, or a random stop when it fires, can also face a heading you set with the mouse wheel as you place it, so a paused guard looks where you want. ### Loot **shared/config/camps.lua** ```lua loot = { rewardType = 'both', delivery = 'prop', requireKey = false, props = { { model = 'prop_box_ammo04a' }, }, fixedLoots = { { items = { 'bandage' }, min = 1, max = 2 }, }, probabilityLoots = { loop = 3, items = { { items = { 'lockpick' }, min = 1, max = 1, probability = 40.0 }, { items = { 'weapon_pistol' }, min = 1, max = 1, probability = 8.0 }, }, }, moneyConfig = { account = 'cash', min = 200, max = 600 }, } ``` - `rewardType`: 'money' | 'items' | 'both' - `delivery`: 'direct' pays everything straight into eligible raiders' inventories on clear. 'prop' and 'both' put items into lootable crates while money is still paid directly on clear. When no crates are defined, items fall back to direct delivery - `requireKey`: Enables the loot key gate for this camp (see Loot Key above) - `props`: One lootable crate per entry. Optional `coords` (placed in-world from the editor); without coords crates spawn near the camp center. Each crate yields a full loot roll to the first eligible raider who searches it - `fixedLoots`: Guaranteed drops. Each entry picks one item from `items` and rolls `min`: `max` of it. Optional `itemMetadata` per item - `probabilityLoots`: Random tables. The whole set is rolled `loop` times (max 10); each group drops with `probability` percent per roll - `moneyConfig`: Account 'cash' or 'bank', random amount between `min` and `max` (capped at 100000) > **WARNING:** Item Names > > Every item name used in loot tables must exist in your inventory, or that drop is silently skipped. The editor item picker only offers registered items. ## Log Channels **server/config_server.lua** ```lua Config.Logs = { Enabled = true, Provider = 'discord', -- 'discord' | 'fivemanage' | 'ox_lib' | 'both' | 'all' Channels = { Activated = { webhook = '', dataset = 'ml_camps_activated' }, Cleared = { webhook = '', dataset = 'ml_camps_cleared' }, Loot = { webhook = '', dataset = 'ml_camps_loot' }, Key = { webhook = '', dataset = 'ml_camps_key' }, Reset = { webhook = '', dataset = 'ml_camps_reset' }, Despawn = { webhook = '', dataset = 'ml_camps_despawn' }, CampEdit = { webhook = '', dataset = 'ml_camps_campedit' }, LiveActions = { webhook = '', dataset = 'ml_camps_live' }, Settings = { webhook = '', dataset = 'ml_camps_settings' }, }, } ``` - `Enabled`: Master switch for all logging - `Provider`: 'discord' (webhooks), 'fivemanage' (datasets), 'ox_lib' (server console), 'both' (Discord + FiveManage), 'all' - `Activated`: A camp was activated (raid started) - `Cleared`: A camp was cleared, with the credited raider list - `Loot`: A player claimed loot from a crate, with the exact items and money - `Key`: A camp key was granted to a player - `Reset`: A camp reset to full strength - `Despawn`: A camp despawned with no players nearby - `CampEdit`: Staff created, edited or deleted a camp - `LiveActions`: Staff force clear, force reset or teleport - `Settings`: Staff changed the global HUD or key settings - `Exploit`: A player failed a server-side check (out-of-range activate/loot, or an unauthorized admin call) Each channel has its own webhook and its own FiveManage dataset. Leave a webhook empty to silence that channel on Discord, or point several channels at the same webhook for fewer destinations.