# Configuration > Configuration reference for ML LootZones Category: LOOT ZONES · Source: https://miciomods.it/docs/ml-lootzones-configuration · Last updated: 2026-07-05 ## Overview - `shared/config.lua`: General settings, interaction limits, dispatch, stash - `shared/lists.lua`: Available prop models and animations for the creator - `shared/config_minigames.lua`: Minigame integrations - `server/config_server.lua`: ml_skills integration and Discord webhook URLs Zone-level settings (loot tables, tools, cooldowns, minigames) are managed through the admin panel and stored in the database. ## General Settings **shared/config.lua** ```lua Config.Language = 'en' Config.Theme = 'default' Config.MainColor = nil Config.Command = 'mlloot' Config.Debug = false ``` - `Language`: Language code for translations - `Theme`: Admin UI theme. Options: `'default'`, `'wasteland'`, `'cyberpunk'`, `'noir'`, `'fantasy'` - `MainColor`: Hex color override for the UI accent. `nil` = use theme default - `Command`: Chat command to open the admin panel (requires admin permissions) - `Debug`: Enables verbose console output ## Interaction & Limits **shared/config.lua** ```lua Config.Settings = { Interaction = nil, InteractionDistance = 2.0, MaxLootDistance = 5.0, MaxSpawnAttempts = 50, } ``` - `Interaction`: Interaction method. `nil` = auto-detect (target system if available, otherwise TextUI), `'target'` = force target, `'textui'` = force TextUI - `InteractionDistance`: Target lock-on range in meters - `MaxLootDistance`: Server-side distance validation for loot claims - `MaxSpawnAttempts`: Maximum retries when placing dynamic props inside zones ## Dynamic System Zone rotation and the server-boot delay are managed from the **Settings** tab of the admin panel and stored in the database, not in a config file. - **Zone rotation**: Categories cycle their zones between active and inactive. Each category sets its own minimum and maximum active zone count and a rotation interval (a min, max range in seconds). An *Always Active* mode keeps every zone on and only refreshes their loot each cycle. - **Startup delay**: On every server start, all zones stay disabled for a random number of seconds picked between a minimum and a maximum. Players who interact during this window are told how long is left. Set both values to `0` to disable. > **TIP:** Why the startup delay matters > > Without it, the first players online after a restart can sweep every known loot spot before anyone else connects. A short randomized delay removes that head start. ## Stash When a zone is configured to spawn "Loot Boxes", it opens an `ox_inventory` stash instead of giving items directly. **shared/config.lua** ```lua Config.Stash = { Prefix = 'ml_loot', DefaultLabel = 'Loot', Slots = 20, MaxWeight = 50000, } ``` - `Prefix`: Stash ID prefix used in the inventory system - `DefaultLabel`: Display label for the stash UI - `Slots`: Number of inventory slots in the stash - `MaxWeight`: Maximum weight in grams (50000 = 50kg) **shared/config.lua** ```lua Config.AbandonedStashSeconds = 600 ``` - `AbandonedStashSeconds`: Seconds a loot box stash can sit idle before it is cleared and its prop marked collected. `0` disables the check ## Dispatch Police notifications when players loot zones. Zones and categories can override these defaults from the admin panel. **shared/config.lua** ```lua Config.Dispatch = { Enabled = true, DefaultCooldown = 180, DefaultChance = 50, Jobs = { 'police', 'sheriff' }, BlipSprite = 161, BlipColor = 1, BlipFlash = true, DefaultMessage = 'Suspicious Activity', } ``` - `Enabled`: Enable/disable dispatch alerts globally - `DefaultCooldown`: Seconds between alerts for the same zone - `DefaultChance`: Probability (0-100) of triggering per loot action - `Jobs`: Job names that receive dispatch alerts - `BlipSprite`: Map blip sprite ID - `BlipColor`: Map blip color ID - `BlipFlash`: Flash the blip on the map - `DefaultMessage`: Default dispatch message text ## Lists (Models & Animations) The creator UI pulls available props and animations from `shared/lists.lua`. **shared/lists.lua** ```lua Config.PropModelList = { 'prop_cash_crate_01', 'prop_tool_box_02', } Config.AnimationsList = { { label = _L('anim_search_bin'), anim = 'base', dict = 'amb@prop_human_bum_bin@base' }, } ``` - `PropModelList`: GTA prop model names available in the creator dropdown - `AnimationsList`: Animations available when looting. Each entry has `label`, `anim` (clip), and `dict` (dictionary) ## Minigames Defined in `shared/config_minigames.lua`. Selected per-zone or per-category in the admin panel. Supported resources: - `ox_lib`: Always available (easy, medium, hard, hard WASD skill checks) - [bd-minigames](https://github.com/kristiyanpts/bd-minigames): Lockpick (3 difficulties), thermite - [ps-ui](https://github.com/Project-Sloth/ps-ui): Scrambler **Adding a custom minigame** **shared/config_minigames.lua** ```lua Config.AvailableMiniGames["my_custom_game"] = { label = "My Custom Game", Start = function(params) local success = exports['my-minigames']:StartGame('hard') return success end } ``` The `Start` function must return `true` (pass) or `false` (fail). ## ml_skills Integration XP rewards and skill requirements are assigned to individual props in the loot editor. This block controls the integration globally. **server/config_server.lua** ```lua Config.Skills = { Enabled = true, Resource = 'ml_skills', MaxXpPerLoot = 500, } ``` - `Enabled`: Master switch. `false` disables both XP rewards and skill-requirement gating - `Resource`: Name of the skills resource. Rarely changes - `MaxXpPerLoot`: Server-side cap on XP granted per loot, applied on top of the per-prop value as an anti-exploit limit > **INFO:** Optional Dependency > > `ml_skills` is not required. When it is not running, looting works normally, no XP is awarded, and skill requirements are ignored. ## Discord Webhooks **server/config_server.lua** ```lua Config.DiscordWebhook = { ZoneEdit = 'INSERT_WEBHOOK_LINK_HERE', ZoneDelete = 'INSERT_WEBHOOK_LINK_HERE', CategoryEdit = 'INSERT_WEBHOOK_LINK_HERE', CategoryDelete = 'INSERT_WEBHOOK_LINK_HERE', SettingsChange = 'INSERT_WEBHOOK_LINK_HERE', LootCollect = 'INSERT_WEBHOOK_LINK_HERE', ExploitDetected = 'INSERT_WEBHOOK_LINK_HERE', PropEdit = 'INSERT_WEBHOOK_LINK_HERE', LootTypeEdit = 'INSERT_WEBHOOK_LINK_HERE', PropCategoryEdit = 'INSERT_WEBHOOK_LINK_HERE', } ``` - `ZoneEdit` / `ZoneDelete`: Admin creates, edits, or removes a zone - `CategoryEdit` / `CategoryDelete`: Admin edits or removes categories - `SettingsChange`: Admin changes global settings - `LootCollect`: Player loots a prop - `ExploitDetected`: Distance bypass or invalid input - `PropEdit`: World prop configuration changes - `LootTypeEdit`: Loot type definition changes - `PropCategoryEdit`: Prop category changes Set any webhook to `false` to disable that log entirely.