Studios
Mining Jobhouse-3.jpg

Configuration

SoonMining JobQbox
PAGE 03 OF 07  ·  INSTALLATION → CONFIGURATION → EXAMPLESdocs.glitchstudios.dev
Browse docs

Everything is in config/, and the folder stays open under escrow. locales/, server/bridge.lua, client/bridge.lua, data/, install/ and rc-interactions/ are open as well.

File What it holds
config/main.lua Site name, icons, pay, crew split, XP, crew size, deposits, the truck, keys and fuel, the ore sack, tools, action timings, gems, veins, ores and grades, freelance mining, the claim locker, pruning, the foreman dialogue, the GPS route, the step list fallback and the blip
config/contracts.lua The order templates
config/locations.lua The foreman, the truck bay, the wash station and the sites with their veins
locales/en.json All text players and staff see. Notifications, dialogs and the /miningadmin menu are at the top level, the work tablet under "ui"

Site, icons and integrations#

Setting Default What it does
Config.Debug false Prints settlement and sale figures to the server console and draws the ox_target debug sphere at the wash station
Config.SiteName 'Peats Ridge Quarry' Name in the tablet header and in item descriptions
Config.TabletBadge 'PR' Short badge on the tablet rail
Config.ImageBase 'https://cdn.glitchstudios.dev/items/' Where item icons come from. 'https://cfx-nui-glitch-miningJob/images/' uses the copies in this resource, 'nui://ox_inventory/web/images/' your copies in ox_inventory. The tablet falls back to images/ when an icon does not load
Config.XPCategory 'mining' glitch-xpSystem category and skill tree id
Config.VehicleKeys 'qbx_vehiclekeys' 'qbx_vehiclekeys' gives every crew member keys to the truck. 'none' leaves the truck unlocked
Config.Fuel 'statebag' 'statebag' sets the truck's fuel state bag to 100. 'none' leaves the tank as it spawned
Config.Interactions { useRcInteractions = true, projectId = '', projectName = 'Mining - Peats Ridge Quarry Foreman', keepTargetOptions = false } Foreman dialogue. With an empty projectId the flow is found by projectName. keepTargetOptions = true keeps the plain options next to Talk
Config.Route true Yellow GPS route to the next stop of a contract
Config.TaskListFallback true Shows the current step in the ox_lib text UI when glitch-uiElements is not running
Config.Blip sprite = 618, colour = 5, scale = 0.8, label = 'Peats Ridge Quarry Mining' Foreman blip

Pay and XP#

A contract's value is the crew's average hourly rate times the planned minutes, per worker. The rate runs linearly from hourlyLevel1 to hourlyLevel20 over the crew's average mining level. A solo level 1 player on a standard 11 minute order gets about $517.

Setting Default What it does
Config.Pay.hourlyLevel1 2819 Hourly rate at mining level 1
Config.Pay.hourlyLevel20 4059 Hourly rate at level 20
Config.Pay.perkCap 0.15 Cap on the mining_value perk bonus, as a share of a worker's pay
Config.Split.equalShare 0.80 Share of the cash split equally between eligible workers. The rest follows each worker's capped credits
Config.Split.minCredits 3 Work credits a worker needs for a share
Config.XP.perHour 330 XP per focused worker-hour
Config.XP.actionShare 0.70 Part of the XP that comes from actions, capped per contract
Config.XP.completionShare 0.30 Part of the XP given on completion
Config.XP.per survey = 5, extract = 3, load = 1, drive = 1, wash = 1, deliver = 1 XP per accepted unit of each action

Crew and deposits#

Setting Default What it does
Config.Crew.maxSize 4 Largest contract roster. The phone group can be bigger
Config.Crew.bonusPerMember 0.05 Crew bonus on the pot per eligible worker after the first
Config.Crew.bonusMax 0.15 Highest crew bonus
Config.Crew.requireGroup false With no active sd-phone group, the player goes solo
Config.Crew.readyRadius 25.0 Metres from the foreman a member must be to get the preview
Config.Crew.readyTimeout 30 Seconds to mark ready
Config.Crew.reconnectGrace 300 Seconds a dropped worker keeps their place on the roster
Config.Deposits.truck 500 Truck deposit, paid by the leader and refunded when the truck is parked back at the bay
Config.Deposits.tool 100 Deposit per loaned pick, refunded when it comes back
Config.ClaimDays 7 Days an item waits in the claim locker before it expires
Config.PruneDays 30 Paid and expired payout rows and finished contracts older than this are deleted at start. 0 keeps everything

Truck and carrying#

Setting Default What it does
Config.Truck.model 'tiptruck' Company truck model
Config.Truck.capacity 40 Ore units the truck bed holds
Config.Truck.platePrefix 'MINE' Truck plate prefix
Config.Truck.returnRadius 40.0 How close to the bay the truck must be parked to count as returned
Config.Truck.unloadRadius 18.0 How close to the wash station the truck must be for sacks to come out
Config.Truck.actorRadius 8.0 How close to the truck a player must stand to open the bed
Config.Carry.units 5 Ore units in a sack (4 kg each). The Ore handling perk adds one per rank
Config.Carry.prop, bone, offset, rot, anim 'prop_feed_sack_01' and an attach table The carried sack prop and animation

A player carrying an ore sack cannot run, jump or drive.

Tools and actions#

Setting Default What it does
Config.Tools.pick.item 'mining_pick' Pick item
Config.Tools.pick.price 400 Pick price at the foreman
Config.Tools.pick.decay 0.5 Condition lost per cut, about 200 ores per pick
Config.Tools.serviceKit.item 'mining_service_kit' Service kit item
Config.Tools.serviceKit.price 80 Kit price at the foreman
Config.Tools.serviceKit.restore 20 Condition a kit restores on the most worn pick, capped at 100
Config.Survey.durationMs 4000 Survey time
Config.Survey.maxDistance 4.5 Metres from the rock face
Config.Extract.minMs 3000 The server refuses a cut that completes faster
Config.Extract.lockSec 45 How long a claimed action stays reserved
Config.Extract.maxDistance 4.5 Metres from the rock face
Config.Extract.minigame key = 'E', rounds = 3, speed = 55, zone = 22, maxFailures = 2, timeLimit = 20000 glitch-minigames bar-hit settings
Config.Extract.zonePerToolRank 3 Wider hit zone per Steady hands rank
Config.Wash.batch 5 Units per wash cycle
Config.Wash.coordinatorBonus 2 Extra units per batch for the whole crew when one member has Site coordinator
Config.Wash.durationMs 8000 Wash time
Config.Gems item = 'diamond', chance = 0.015 Item the Gem assessment perk can find on Deep orders, and the chance per cut. item = false turns it off

Veins, ores and grades#

Setting Default What it does
Config.Veins.recoverMin / recoverMax 20 / 40 Minutes before a worked-out vein recovers
Config.Veins.reserveMin / reserveMax 10 / 16 Units in a fresh vein
Config.Veins.margin 1.25 A contract reserves its need times this in matching ore
Config.Veins.topUpYield 0.75 Worst-case share of ore that survives washing. Below that the crew gets another vein
Config.Veins.decoys 1 Extra non-matching veins reserved for a contract. Surveying tells them apart
Config.Veins.streamDistance 120.0 Distance at which vein props spawn
Config.Veins.props prop_rock_4_c, prop_rock_4_big2, prop_rock_4_big Rock props
Config.Veins.outline { 240, 168, 60, 255 } Outline colour on your crew's rock faces that still need work. false turns it off
Config.Ores iron (ref 40), copper (ref 50) Ore types with their label and reference value per 4 kg unit
Config.Grades low (reject 0.25, weight 30), standard (0.10, 55), high (0.00, 15) Grades with the share lost when washing and how often each rolls

Freelance mining#

Setting Default What it does
Config.Freelance.enabled true Freelance mining and the Sell ore tab
Config.Freelance.cutMs 12000 Swing time before the finishing blow. The server refuses faster cuts
Config.Freelance.xpPerUnit 1 XP per freelance unit
Config.Freelance.sellShare 0.21 Share of the ore's reference value the foreman pays
Config.Freelance.gradePay low = 0.8, standard = 1.0, high = 1.2 Price factor per grade

At the defaults a standard unit of iron sells for $8 and copper for $10. A freelance miner holds one rock face at a time, and a loaned company pick never counts for freelance work.

Order templates#

Each entry in Config.Contracts has these fields:

Field What it does
id, label, desc Template id and the text on the tablet
site Key in Config.Locations.sites
ore Key in Config.Ores
mode 'company' delivers everything for wages. 'supply' lets the crew keep retainShare of the value as raw_ore for less cash
deliver 'washed', the only delivery type
unitsPerWorker Ore units each roster member adds to the workload
plannedMinutes Calibrated length, used for the pay
minLevel Level every roster member needs. A high level leader does not unlock it for the others
perk, perkLabel Optional glitch-xpSystem perk the leader needs, and the name shown for it
payMult Optional multiplier on the pot
retainShare Supply orders: share of the value kept as raw_ore

The package ships quarry_iron, quarry_copper, supply_iron and supply_copper (level 1, 18 units per worker, 11 minutes), and deep_iron and deep_copper (level 12, mining_deep perk, 26 units per worker, 15 minutes, payMult = 1.25).

Locations#

Config.Locations holds the foreman (foreman, a vec4), the ped model (foremanPed), the truck bay (truckSpawn, a vec4), the wash station (plant.wash) and sites. Each site has a label, a center and a list of veins, each with an id, coords and the ore types it can roll when it recovers. Vein heights snap to the ground on the client, so x and y are what count.

Places saved with /miningadmin go to data/locations.json and override config/locations.lua from then on. Delete that file to go back to the config.