Configuration

5 min readUpdated 3 weeks ago

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
1Config.Language = 'en'
2Config.Theme = 'default'
3Config.MainColor = nil
4Config.Command = 'mlloot'
5Config.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
1Config.Settings = {
2    Interaction = nil,
3    InteractionDistance = 2.0,
4    MaxLootDistance = 5.0,
5    MaxSpawnAttempts = 50,
6}
  • 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.
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
1Config.Stash = {
2    Prefix = 'ml_loot',
3    DefaultLabel = 'Loot',
4    Slots = 20,
5    MaxWeight = 50000,
6}
  • 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
1Config.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
1Config.Dispatch = {
2    Enabled = true,
3    DefaultCooldown = 180,
4    DefaultChance = 50,
5    Jobs = { 'police', 'sheriff' },
6    BlipSprite = 161,
7    BlipColor = 1,
8    BlipFlash = true,
9    DefaultMessage = 'Suspicious Activity',
10}
  • 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
1Config.PropModelList = {
2    'prop_cash_crate_01',
3    'prop_tool_box_02',
4}
5
6Config.AnimationsList = {
7    { label = _L('anim_search_bin'), anim = 'base', dict = 'amb@prop_human_bum_bin@base' },
8}
  • 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: Lockpick (3 difficulties), thermite
  • ps-ui: Scrambler
shared/config_minigames.lua
1Config.AvailableMiniGames["my_custom_game"] = {
2    label = "My Custom Game",
3    Start = function(params)
4        local success = exports['my-minigames']:StartGame('hard')
5        return success
6    end
7}

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
1Config.Skills = {
2    Enabled      = true,
3    Resource     = 'ml_skills',
4    MaxXpPerLoot = 500,
5}
  • 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
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
1Config.DiscordWebhook = {
2    ZoneEdit         = 'INSERT_WEBHOOK_LINK_HERE',
3    ZoneDelete       = 'INSERT_WEBHOOK_LINK_HERE',
4    CategoryEdit     = 'INSERT_WEBHOOK_LINK_HERE',
5    CategoryDelete   = 'INSERT_WEBHOOK_LINK_HERE',
6    SettingsChange   = 'INSERT_WEBHOOK_LINK_HERE',
7    LootCollect      = 'INSERT_WEBHOOK_LINK_HERE',
8    ExploitDetected  = 'INSERT_WEBHOOK_LINK_HERE',
9    PropEdit         = 'INSERT_WEBHOOK_LINK_HERE',
10    LootTypeEdit     = 'INSERT_WEBHOOK_LINK_HERE',
11    PropCategoryEdit = 'INSERT_WEBHOOK_LINK_HERE',
12}
  • 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.