Configuration
Every option in STG Multiplayer Demining Job config/config.lua, from tasks, mine types and levels to the lobby, work vehicle, boat, armor outfit and diving gear.
All settings live in stg-demining/config/config.lua. The file stays editable in the escrow version. Restart the resource after a change.
Language
Config.Language = "en"Available: en, de, fr, es, pt, it, nl, pl, sv, ar, jp, zh, fi, he. To change a text, edit the matching file in stg-demining/locales/. Task titles and descriptions come from the task1_title, task1_desc and following keys in the same file.
General
Config.Debug = false
Config.digTime = 3
Config.RewardAccount = "cash"Prop
Type
Tasks
Each entry is one task in the lobby. The script ships with four: three land tasks and one underwater task.
Config.Tasks = {
{
title = Locales[Config.Language].task1_title,
description = Locales[Config.Language].task1_desc,
level = false,
divingMode = false,
requirements = {
{ item = "m41", amount = 2 },
{ item = "ap_mine", amount = 2 },
},
rewards = { exp = 50, money = 5000 },
players = { min = 1, max = 4 },
area = {
center = vec3(-814.0464, -1893.4847, 19.0417),
radius = 25.0,
blip = { sprite = 162, color = 1, scale = 1.0, label = "Hazard Zone" }
},
delivery = vec4(474.2173, -1079.4603, 29.2020, 183.5736),
},
-- ...
}Prop
Type
How a task plays out
The lobby owner starts the task. The work vehicle spawns at Config.Vehicle.spawnPoint and every member changes into the ballistic armor outfit.
Land tasks: the team drives to the area and the owner starts the search inside the radius. Players sweep with the metal detector, switch to the shovel, dig the mine up, defuse it in the minigame and carry it to the vehicle.
Diving tasks: the boat spawns at Config.Boat.spawnPoint. Once the owner starts from the boat, the mines appear on the seabed as the team reaches the area. Divers swim up to each mine and neutralize it, then bring the boat back to its spawn point.
On land tasks, the team drives the loaded mines to delivery and hands them over one by one. On both task types, the work vehicle then goes back to Config.Vehicle.spawnPoint, and the task is complete for the whole team.
Mine types
Config.Mines = {
["ap_mine"] = {
label = "Anti-Personnel Mine",
prop = "w_ex_apmine",
dig_time = 3,
},
["m41"] = {
label = "Anti-Tank Mine (M41)",
prop = "gr_prop_gr_pmine_01a",
dig_time = 5,
},
["sea_mine"] = {
label = "Sea Mine",
prop = "xm_prop_x17_mine_03a",
neutralizeDistance = 3.5,
-- ...
},
}Each mine type has its own defuse minigame: ap_mine asks to cut the wire of the shown color, m41 asks to repeat a shape sequence and sea_mine asks to keep a pressure gauge balanced with A and D. Keep these three keys, a new key has no minigame.
Prop
Type
Levels
Config.Levels = {
[1] = { xpRequired = 0 },
[2] = { xpRequired = 100 },
[3] = { xpRequired = 250 },
-- ...
[10] = { xpRequired = 4000 },
}Total XP a player needs to reach each level. After a completed task, players move up to the highest level their XP reaches. Add more entries to raise the level cap. The lobby shows the progress toward the next level.
Lobby
Config.Menu = {
coord = vec4(453.6183, -810.1638, 27.7028, 222.1004),
camera_coord = vec4(-126.0261, -641.0304, 168.8204, 30.8314),
ped_base_distance = 3.0,
ped_spacing = 0.9,
max_members = 4,
npc = {
enabled = true,
model = `s_m_y_ammucity_01`,
scenario = "WORLD_HUMAN_CLIPBOARD_FACILITY",
},
drawmarker = {
enabled = true,
scale = vec3(0.3, 0.3, 0.3),
color = { r = 255, g = 255, b = 255, a = 255 },
},
blip = {
enabled = true,
sprite = 626,
color = 1,
scale = 0.8,
label = "Demining",
},
member_spots = {
[1] = {
coord = vec4(-125.5979, -642.6937, 168.8203, 24.5379),
animDict = "anim@amb@casino@hangout@ped_male@stand@02b@idles",
animName = "idle_a",
},
-- [2], [3] ...
}
}Prop
Type
To show your own logo in the lobby header, replace stg-demining/config/logo.png.
Work vehicle and boat
Config.Vehicle = {
model = "bison",
spawnPoint = vec4(457.3053, -809.5168, 27.0318, 179.6624),
platePrefix = "DMNING",
}
Config.Boat = {
model = "dinghy",
spawnPoint = vec4(-857.8867, -1485.7896, 0.1229, 289.6063),
}Prop
Type
Delivery
Config.DeliveryNPC = {
model = `s_m_y_armymech_01`,
scenario = "WORLD_HUMAN_CLIPBOARD",
}
Config.DeliveryBlip = { sprite = 478, color = 2, scale = 0.7 }- DeliveryNPC: model and scenario of the NPC that stands at each land task's
deliverypoint. - DeliveryBlip: sprite, color and scale of the delivery point blip.
Ballistic armor
Config.BallisticArmor = {
active = true,
male = {
components = {
{ id = 8, drawable = 97, texture = 0 },
{ id = 11, drawable = 186, texture = 0 },
-- ...
},
props = {
{ id = 0, index = 125, texture = 0 },
}
},
female = { components = { ... }, props = { ... } }
}When active is true, every team member changes into this outfit when a task starts and gets their own clothes back when it ends or is cancelled.
Each component is { id, drawable, texture } and each prop is { id, index, texture }. The default gives a t-shirt, torso, arms, pants, shoes and a helmet.
The female outfit is used for mp_f_freemode_01, every other model gets the male outfit. Drawable ids depend on the clothing packs your server streams, so check them in your clothing menu before changing them.
Diving gear
Config.DivingMode = {
enabled = true,
maxUnderwaterTime = 2000.0,
tank = {
model = "p_s_scuba_tank_s",
bone = 24818,
offset = vec3(-0.25, -0.25, 0.0),
rotation = vec3(180.0, 90.0, 0.0),
},
mask = {
model = "p_d_scuba_mask_s",
bone = 12844,
offset = vec3(0.0, 0.0, 0.0),
rotation = vec3(180.0, 90.0, 0.0),
},
}Prop
Type
Functions
Config.Functions = {
["giveKey"] = function(plate, vehicle) ... end,
["removeKey"] = function(plate, vehicle) ... end,
["helpNotify"] = function(message) ... end,
["hideHelpNotify"] = function() ... end,
["notify"] = function(type, message) ... end,
}| Function | What it does |
|---|---|
giveKey, removeKey | Give keys to the work vehicle and the boat when a task starts, and take them back when they are returned. Supports qbx_vehiclekeys, qb-vehiclekeys, Renewed-Vehiclekeys, qs-vehiclekeys, wasabi_carlock, vehicles_keys (Jaksam), t1ger_keys and esx_vehiclelock. Add a branch for your own key script in both functions. |
helpNotify, hideHelpNotify | Key prompts such as [E] Dig Here, shown with the ox_lib text UI by default. |
notify | Notifications, ox_lib notify by default. Replace the body to use your own notification system. |
HUD functions
Config.HudFunctions = {
["show"] = function()
-- your code here
end,
["hide"] = function()
-- your code here
end
}hide runs when the lobby opens and show runs when it closes. Both are empty by default. Add your HUD's hide and show calls to keep it out of the lobby screen. The minimap is hidden and restored by the script itself.
Still having trouble?
Open a ticket on our Discord. Our team answers around 15 hours a day.