Studios
Mining Jobhouse-3.jpg

Examples

SoonMining JobQbox
PAGE 04 OF 07  ·  CONFIGURATION → EXAMPLES → TROUBLESHOOTINGdocs.glitchstudios.dev
Browse docs

Use the icons bundled with the resource#

Config.ImageBase = 'https://cfx-nui-glitch-miningJob/images/'

Or, after copying images/*.png into ox_inventory:

Config.ImageBase = 'nui://ox_inventory/web/images/'

Items made before the change keep their old icon URL.

Use your own gem item, or none#

Config.Gems = {
    item   = 'emerald',   -- any item your ox_inventory already has
    chance = 0.015,
}
Config.Gems = { item = false, chance = 0 }

Running without glitch-xpSystem#

Everyone counts as level 1 and has no perks, so the Deep orders stay locked. To offer them anyway, drop the perk and lower the level on both Deep entries in config/contracts.lua:

{
    id = 'deep_iron', label = 'Deep iron order', site = 'quarry',
    desc = 'The deep benches. A bigger load at a better rate.',
    ore = 'iron', mode = 'company', deliver = 'washed',
    unitsPerWorker = 26, plannedMinutes = 15, minLevel = 1,
    payMult = 1.25,
},

Or delete the two Deep entries.

Add a bigger iron order#

{
    id = 'quarry_iron_bulk', label = 'Bulk iron order', site = 'quarry',
    desc = 'A double load of washed iron ore.',
    ore = 'iron', mode = 'company', deliver = 'washed',
    unitsPerWorker = 30, plannedMinutes = 18, minLevel = 5,
},

Set plannedMinutes to how long a run really takes, because the pay is worked out from it. A contract reserves its whole workload plus 25% of matching ore when it starts, so a large order on a busy server may need more veins.

No keys or fuel script#

Config.VehicleKeys = 'none'   -- the truck is left unlocked
Config.Fuel        = 'none'   -- the tank stays as it spawned

For another keys script, put its calls in Bridge.GiveKeys and Bridge.UnlockVehicle in server/bridge.lua. For a fuel script that only has client exports, put its call in Bridge.SetFuel.

Translate the job#

Copy locales/en.json to locales/de.json, translate the values (the tablet text is under "ui"), and set ox_lib's locale in server.cfg:

setr ox:locale de

Read the vein state from another resource#

-- client or server
for id, v in pairs(GlobalState.miningVeins or {}) do
    -- v.r = units left, v.m = units when full,
    -- v.res = contract id that reserved it or false,
    -- v.rec = unix time it recovers or false
    if not v.res and not v.rec and v.r > 0 then
        print(('vein %s is free with %d units'):format(id, v.r))
    end
end

Give staff in another group the admin tools#

add_ace group.mod command.miningadmin allow