Configuration

7 min readUpdated Today

Overview

  • shared/config/config.lua: general settings, theme, voice lines, vehicle keys, skills, battlepass, camera and permissions
  • shared/config/peds.lua, vehicles.lua, props.lua, animations.lua, weaponlist.lua: model, prop, animation and weapon lists of the creator
  • shared/config/zombie_animations.lua: walk styles for zombie enemies
  • shared/heist_presets.lua: grab presets of HEIST_LOOT objectives
  • shared/config/minigames/: one file per minigame resource
  • server/config_server.lua: ElevenLabs API key and Discord webhooks

Missions and NPCs are built in the in-game creator and saved in the database.

General

shared/config/config.lua
1Config.Settings = {
2    Locale = 'en',
3    Debug = false,
4    MoveHudCommand = 'movequesthud',
5    CreatorCommand = 'missioncreator',
6    NearbyPlayerDistance = 10,
7    SoundResource = 'xsound',
8    PrivateMissionBucketStart = 40000,
9    GiveVehicleKeys = true,
10    RewardsInfo = 'name',
11    PlayerNameFormat = 'rp_first',
12}
13
14Config.Admin = {
15    MinimizeKey = 'F9',
16}
  • Locale: language file loaded from the locales/ folder
  • Debug: prints extra console output
  • MoveHudCommand: lets a player move the mission HUD
  • CreatorCommand: opens the creator. Needs the Creator permission
  • NearbyPlayerDistance: meters within which players can be invited to a squad
  • SoundResource: resource that plays voice lines
  • PrivateMissionBucketStart: first routing bucket used by missions with Private Mission on. Each run takes the next number, so use a range your other scripts do not use
  • GiveVehicleKeys: gives and removes keys of mission vehicles through ml_bridge
  • RewardsInfo: how rewards show in the UI. 'name', 'image' or 'combo'
  • PlayerNameFormat: name shown for players. 'fivem' (FiveM name), 'rp_first' (character first name) or 'rp_full' (character full name)
  • MinimizeKey: hides and restores the creator. F1 to F12, or a single letter or digit

Theme

shared/config/config.lua
1Config.Theme = 'classic'
2
3Config.UITheme = {
4    preset = nil,
5    colors = {
6        primary = nil,
7        accent = nil,
8        background = nil,
9        surface = nil,
10        text = nil,
11    },
12}
  • Theme: theme of the mission UI. 'classic', 'cyberpunk', 'wasteland', 'fantasy' or 'noir'
  • Config.MainColor, Config.ThemeBaseColor: optional hex colors for the accent and the base of the mission UI. They are not in the shipped file. Add them under Config.Theme to use them
  • UITheme.preset: theme preset of the creator. nil follows the shared theme set in ml_bridge
  • UITheme.colors: CSS hex values for single colors. Any nil value follows the shared theme

Voice Lines

shared/config/config.lua
1Config.TTS = {
2    Enabled = true,
3    ElevenLabs = {
4        DefaultVoiceId = 'Xb7hH8MSUJpSbSDYk0k2',
5        ModelId = 'eleven_multilingual_v2',
6        Stability = 0.5,
7        SimilarityBoost = 0.75,
8    },
9}
server/config_server.lua
1Config.TTS.ElevenLabs.ApiKey = 'YOUR_API_KEY'
  • Enabled: false turns off every voice line. No API key needed then
  • DefaultVoiceId: ElevenLabs voice used when an NPC has none of its own
  • ModelId: ElevenLabs model
  • Stability, SimilarityBoost: ElevenLabs voice settings from 0.0 to 1.0
  • ApiKey: your ElevenLabs API key. It stays on the server

Generated audio is saved in cache/tts/ and played from disk the next time, at no cost. Generation is capped at 50000 characters per player per hour, and a single line at 500 characters.

Custom Audio Files

Any voice line can play a file of your own instead of ElevenLabs. In the creator, set the audio source to Custom File and type the file name.

  • Put the files in cache/tts/ inside the resource
  • .mp3, .wav or .ogg. A name without extension is read as .mp3
  • Letters, numbers, - and _ only, up to 2 MB per file

Custom files never call ElevenLabs. Keep Config.TTS.Enabled = true so they play.

Vehicles

shared/config/config.lua
1Config.VehicleKeys = {
2    Give = function(vehicle, plate)
3        if not Config.Settings.GiveVehicleKeys then return end
4        Bridge.GiveVehicleKey(vehicle, plate)
5    end,
6    Remove = function(vehicle, plate)
7        if not Config.Settings.GiveVehicleKeys then return end
8        Bridge.RemoveVehicleKey(vehicle, plate)
9    end,
10}
11
12Config.Settings.KeepOnComplete = {
13    Garage      = 'pillboxgarage',
14    State       = 1,
15    VehicleType = 'car',
16}
  • VehicleKeys: runs during vehicle objectives. Replace the two functions if ml_bridge does not support your keys resource
  • KeepOnComplete: where a mission vehicle goes when its objective lets the player keep it. Garage must exist in your garage resource. State is 1 stored or 0 out on Qbox and QBCore, 1 stored or 0 impound on ESX. VehicleType is used on ESX only

Skills

shared/config/config.lua
1Config.Skills = {
2    Enabled       = true,
3    Resource      = 'ml_skills',
4    MaxXpPerQuest = 5000,
5}
  • Enabled: false ignores skill requirements, skill XP and skill unlocks on every mission
  • Resource: name of the skills resource
  • MaxXpPerQuest: highest skill XP one mission can give

Skill requirements, XP and unlocks are set per mission in the creator. Without ml_skills running, they are skipped.

Battlepass

shared/config/config.lua
1Config.Battlepass = { Enabled = true }
  • Enabled: with ml_battlepass running, finished missions advance battlepass objectives. false turns it off. Without ml_battlepass this setting does nothing

Camera

shared/config/config.lua
1Config.Camera = {
2    SquadRadius      = 30.0,
3    SquadWaitSeconds = 30,
4}
  • SquadRadius: meters from the first ready member that the other squad members must be within before a shared cinematic starts
  • SquadWaitSeconds: seconds to wait for missing members before the cinematic starts with the members present. Late members join where it is

Permissions

shared/config/config.lua
1Config.Permissions = {
2    Creator = {
3        useDefaultAdmins = true,
4        ace = {
5            'ml_missions.creator',
6            'admin', 'god', 'superadmin', 'command',
7            'group.admin', 'group.superadmin',
8        },
9    },
10    LiveActions = {
11        useDefaultAdmins = true,
12        ace = {
13            'ml_missions.admin',
14            'admin', 'god', 'superadmin',
15            'group.admin', 'group.superadmin',
16        },
17    },
18}
  • Creator: opens the creator, edits missions and NPCs, sees the Live Missions tab
  • LiveActions: force complete, force fail and teleport to the leader from the Live Missions tab. Without this block it uses Creator
  • useDefaultAdmins: also accepts every player ml_bridge treats as admin
  • ace: ACE permissions accepted for that tier. One match is enough

Minigames

Each file in shared/config/minigames/ adds entries to Config.AvailableMiniGames when its resource is running. Pick one per objective in the creator.

shared/config/minigames/my_game.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.

Lists

shared/config/peds.lua
1pedModelList = {
2    'a_f_m_beach_01', 'a_f_y_bevhills_01',
3}
shared/config/vehicles.lua
1carModelList = {
2    'adder', 'autarch', 'banshee2',
3}
shared/config/props.lua
1propModelList = {
2    'prop_cash_case_01', 'prop_cash_crate_01',
3}
shared/config/animations.lua
1AnimationsList = {
2    { Label = 'Mechanic (Ground)', Animation = 'base', Dictionary = 'amb@world_human_vehicle_mechanic@male@base' },
3}
  • pedModelList, carModelList, propModelList: model names offered in the creator. Add your own at the bottom
  • AnimationsList: animations offered in the creator, with label, clip and dictionary

Heist Presets

Each HEIST_LOOT point uses a preset from shared/heist_presets.lua. A preset sets the prop spawned in the world, the prop it turns into once looted, and the grab animation with its attached props, synced for every player nearby.

  • cash_trolley, gold_trolley: bank trolleys emptied into a bag
  • safe_crack: floor safe that swaps to an open door
  • cash_stack, gold_stack, cocaine_stack, weed_stack: table grabs
  • jewel_case: display case smash
  • laptop_hack: laptop grab
  • bolt_cutters, container_grind, crate_crowbar: tools for chains, containers and crates

Copy an entry and change its props and animation phases to add your own.

Discord Webhooks

server/config_server.lua
1Config.DiscordWebhook = {
2    CompleteObjective = 'INSERT_WEBHOOK_LINK_HERE',
3    StartQuests       = 'INSERT_WEBHOOK_LINK_HERE',
4    Allobjective      = 'INSERT_WEBHOOK_LINK_HERE',
5    Turnin            = 'INSERT_WEBHOOK_LINK_HERE',
6    QuestsExploit     = 'INSERT_WEBHOOK_LINK_HERE',
7    FailedAll         = 'INSERT_WEBHOOK_LINK_HERE',
8    MissionEdit       = 'INSERT_WEBHOOK_LINK_HERE',
9    MissionDelete     = 'INSERT_WEBHOOK_LINK_HERE',
10    MissionTest       = 'INSERT_WEBHOOK_LINK_HERE',
11    OneTimeTurnin     = 'INSERT_WEBHOOK_LINK_HERE',
12    NpcEdit           = 'INSERT_WEBHOOK_LINK_HERE',
13    NpcDelete         = 'INSERT_WEBHOOK_LINK_HERE',
14    SquadActions      = 'INSERT_WEBHOOK_LINK_HERE',
15    RewardClaimed     = 'INSERT_WEBHOOK_LINK_HERE',
16    AdminAction       = 'INSERT_WEBHOOK_LINK_HERE',
17}
  • CompleteObjective: a player completes an objective
  • StartQuests: a mission starts
  • Allobjective: every objective of a mission is done
  • Turnin: a mission is turned in
  • QuestsExploit: a request fails a server check
  • FailedAll: a mission fails
  • MissionEdit, MissionDelete: a mission is saved or deleted in the creator
  • MissionTest: a test run starts
  • OneTimeTurnin: a one-time mission is completed
  • NpcEdit, NpcDelete: an NPC is saved or deleted
  • SquadActions: squads are created, joined or left
  • RewardClaimed: a player collects a reward point of an objective
  • AdminAction: staff actions from the Live Missions tab

Set any webhook to false, or leave the placeholder, to disable that log entirely.

Quests System Configuration, FiveM Docs | Micio Mods