Configuration

5 min readUpdated 2 weeks ago

Overview

  • shared/config.lua: language, theme, interaction, stash, dispatch and claim safety
  • shared/lists.lua: search animations offered in the editor
  • shared/lists_models.lua: model catalog of the editor (animals, peds, props)
  • shared/weapons.lua: weapons offered in the kill and butcher rules
  • shared/config_minigames.lua: minigame definitions
  • server/config_server.lua: skills, battlepass and Discord webhooks

Props, categories, loot tables, tools, cooldowns, weapon rules and no-loot zones live in the database and are edited from the admin panel.

General

shared/config.lua
1Config.Language = 'en'
2Config.Theme = 'default'
3Config.Debug = false
4Config.Interaction = nil
5Config.Command = 'mllootprops'
6Config.Admin.MinimizeKey = 'F9'
  • Language: language file loaded from the locales/ folder
  • Theme: admin panel theme. 'default', 'wasteland', 'cyberpunk', 'noir' or 'fantasy'
  • Debug: prints extra console output
  • Interaction: nil uses the target resource when one is running and a press-E prompt otherwise. 'target' or 'textui' forces one of the two
  • Command: opens the admin panel. Admin permission required
  • MinimizeKey: hides and restores the admin panel. F1 to F12, or a single letter or digit

UI Theme

shared/config.lua
1Config.UITheme = {
2    preset = nil,
3    colors = {
4        primary = nil,
5        accent = nil,
6        background = nil,
7        surface = nil,
8        text = nil,
9    },
10}
  • preset: theme preset for this resource. nil follows the shared theme set in ml_bridge
  • colors: CSS hex values for single colors. Any nil value follows the shared theme

Lootbox Stash

A prop set as a lootbox opens a stash instead of giving the items straight away.

shared/config.lua
1Config.Stash = {
2    Prefix = 'ml_proploot',
3    DefaultLabel = 'Loot',
4    Slots = 20,
5    MaxWeight = 50000,
6}
7
8Config.AbandonedStashSeconds = 600
  • Prefix: prefix of the stash IDs
  • DefaultLabel: stash title when the prop has no label of its own
  • Slots: stash slots
  • MaxWeight: maximum weight in grams
  • AbandonedStashSeconds: an opened stash left idle this long is cleared and its prop counts as looted. 0 turns the check off

Claim Safety

shared/config.lua
1Config.MaxMoneyPerClaim = 50000
2Config.StrictKillWeapon = true
3Config.MinSharedCooldown = 30
  • MaxMoneyPerClaim: highest cash or bank amount one loot can pay, whatever the prop says
  • StrictKillWeapon: the server reads the cause of death of the ped itself when a prop has kill weapon rules. Leave it on
  • MinSharedCooldown: seconds a prop stays locked for everyone after a claim when it has no global cooldown, no delete on loot and no one-time setting. Two players on the same prop cannot both roll the loot. 0 turns it off

Dispatch

Props and categories can override every default below 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: turns police alerts on or off for every prop
  • DefaultCooldown: seconds between two alerts from the same spot
  • DefaultChance: chance from 0 to 100 that a loot sends an alert
  • Jobs: jobs that receive the alert
  • BlipSprite, BlipColor, BlipFlash: map blip of the alert
  • DefaultMessage: alert text

Startup Delay

Set in the Settings tab of the admin panel. After a server start, claims stay closed for a random time between a minimum and a maximum, so loot opens once players have joined. Set both values to 0 to turn it off.

Lists

shared/lists.lua
1Config.AnimationsList = {
2    { label = 'Search (Bin)', anim = 'base', dict = 'amb@prop_human_bum_bin@base' },
3    { label = 'Skin (Animal)', anim = 'player_search', dict = 'anim@gangops@facility@servers@bodysearch@', baseAnim = 'base', baseDict = 'amb@medic@standing@kneel@base' },
4}
  • AnimationsList: search animations offered per prop. anim and dict are the clip and dictionary. baseAnim and baseDict play a pose under it, such as kneeling over a carcass
shared/lists_models.lua
1Config.LootModels.animals = {
2    { model = 'a_c_boar', label = 'Boar' },
3}
  • LootModels: models listed in the editor catalog, grouped by type. Any other model can still be added with the in-game detector
shared/weapons.lua
1ML_Weapons = {
2    { name = 'WEAPON_KNIFE', label = 'Knife', category = 'melee' },
3}
  • ML_Weapons: weapons offered in the kill weapon and butcher rules. Add your custom weapons here

Minigames

Minigames are picked per prop or per category. The four ox_lib skill checks are always listed. Lockpick and thermite appear with bd-minigames, the scrambler with ps-ui.

shared/config_minigames.lua
1Config.AvailableMiniGames["my_custom_game"] = {
2    label = "My Custom Game",
3    Start = function(params)
4        return exports['my-minigames']:StartGame('hard')
5    end
6}

Start returns true on success and false on failure.

Skills

server/config_server.lua
1Config.Skills = {
2    Enabled = true,
3    Resource = 'ml_skills',
4    MaxXpPerLoot = 500,
5}
  • Enabled: false turns off XP rewards and skill requirements
  • Resource: name of the skills resource
  • MaxXpPerLoot: highest XP the server grants for one loot, whatever the prop says

Battlepass

server/config_server.lua
1Config.Battlepass = { Enabled = true }
  • Enabled: with ml_battlepass running, looting advances battlepass objectives. false turns it off. Without ml_battlepass this setting does nothing

Discord Webhooks

server/config_server.lua
1Config.DiscordWebhook = {
2    PropConfigSave = 'INSERT_WEBHOOK_LINK_HERE',
3    PropConfigDelete = 'INSERT_WEBHOOK_LINK_HERE',
4    SettingsChange = 'INSERT_WEBHOOK_LINK_HERE',
5    LootCollect = 'INSERT_WEBHOOK_LINK_HERE',
6    ToolUse = 'INSERT_WEBHOOK_LINK_HERE',
7    ExploitDetected = 'INSERT_WEBHOOK_LINK_HERE',
8}
  • PropConfigSave, PropConfigDelete: a prop is created, edited or deleted
  • SettingsChange: global settings change
  • LootCollect: a player loots a prop
  • ToolUse: a tool loses durability
  • ExploitDetected: a claim fails a server check. Repeat offenders are kicked

Set any webhook to false to disable that log entirely.