Studios
Electrical Jobelec-2.jpg

Configuration

Electrical JobQBCore · Qbox · ESX
PAGE 03 OF 07  ·  INSTALLATION → CONFIGURATION → EXAMPLESdocs.glitchstudios.dev
Browse docs

Everything is in three files, all open in the escrow along with server/bridge.lua:

File What it holds
shared/config-main.lua Depot, van, pay, XP and perks, calls, minigames, fines, crews, loot, events and the server checks
shared/config-locations.lua Light pole models, ATMs, banks, stores, houses and interiors
shared/locale.lua config.Text, every line of player text

Depot and van#

config.Depot holds the clock-in NPC (ped, pedModel), the blip (blip, blipLabel, blipSprite, blipColour, blipScale), vanSpawn and the deposit rules:

Field Default What it does
deposit 500 Taken from the bank, or from cash when the bank is short
returnRange 60.0 The van has to be parked this many metres from the NPC for a full refund
lostVanFee 100 Kept when the player clocks out without the van
fullRefundOnDrop true A disconnect refunds the whole deposit. With false a disconnect counts as clocking out.
refundReason 'electrical-van-deposit-refund' Money reason for refunds on Qbox

The van is config.Car ("speedo", of type config.CarType = "automobile") with the cosmetic mods in config.VanMods. config.Plate ("ELE ") is the plate prefix; each van gets a number no other job van has. config.reclockCooldown (10 seconds) is how often a shift that is still running can get a new van at the depot.

Pay and XP#

config.payLevels sets pay per call type and the repair time (TimeToFix, ms) for each level range. The upper bound of each range is exclusive. Rolled pay of $100 or more is rounded to $10. See the Pay & Progression page for the table.

config.payReason is false, which pays through glitch-abstraction. A string pays job pay and the wedding bonus through qbx_core AddMoney with that reason instead.

config.useXpSystem (true), config.xpCategory ('electrical') and config.hardsetLevelXP (4) control levels. Without a running XP system, or with useXpSystem = false, everyone works at hardsetLevelXP and no XP is given. config.xpRewards is XP per call as {min, max}: 40 to 60 for bank, store, house and interior, 12 to 18 per ATM or pole.

Perks#

config.Perks maps ten glitch-xpSystem skill tree effects to the job. enabled = false turns them all off. resources lists the XP resource names to look for, auraHours (4) is how long Chief sparky shares Steady hands with the crew, and calloutDaily = true makes the Call-out fee once per server day instead of once per shift. The perks are listed on the Pay & Progression page.

Calls#

Setting Default What it does
config.callTimer { min = 30, max = 60, tierStep = 5, minFloor = 10, maxFloor = 20, absoluteMin = 5 } Seconds between calls. Each tier above the first takes tierStep off, and Quick dispatch takes its share.
config.missionMix { simpleDropPerTier = 0.1, simpleMinWeight = 0.1 } Pole and ATM calls lose weight at higher tiers
config.maxRepairs 4 Most poles or ATMs on one call
config.resetCommand 'resetelectricaljob' Chat command to reset a stuck call. false for none.

Minigames#

config.hacks lists the glitch-minigames type per call type: circuitBreaker for banks, buttonMash for stores, skillBar for houses, any of the three for interiors and circuitBreaker or buttonMash for light poles. config.minigames holds the arguments passed to each glitch-minigames export, and config.repairSkillCheck sets the skill check used to pull and install ATMs and change a bulb.

config.taserChance is the shock chance per tier when a repair fails ({ 10, 10, 10, 5, 5, 2 }). config.actionTime is the length of the carry and van progress bars per tier. config.hackFailureThreshold (0) can fail a won minigame on purpose; 0 never does.

Fines and time bonus#

Setting Default
config.failureReductAmount {5, 10} per failed repair
config.dropBulbFine {3, 6}
config.brokenAtmFine {10, 15}
config.stolenToolsFine 50
config.bonusEnabled true
config.missionBaseTime 240 seconds per call type (per repair for ATMs and poles)
config.bonusRatio 13, so the time bonus is pay / 13, about 8 percent

Crews#

config.crew controls group work through the sd-phone Groups app:

Field Default What it does
enabled true false makes everyone work solo
maxSize 4 Most players on one call
bonusPerMember 0.05 Extra pay for everyone per extra worker
bonusMax 0.15 Cap on the crew bonus
splitPay true Pole and ATM pay is shared evenly. false pays everyone the full amount.
splitSingleSitePay false Also split bank, store, house and interior pay
confirmJoin true Group shift members are asked to join
confirmSeconds 20 Time to accept

Events#

config.specialEvents (true) turns the house events on. config.weddingHouse (1) is the config.houseData index that can roll the wedding, with config.specialEventPercentage (15) as the chance and config.specialEventBonus (1500) as the pay. The groom has to reach config.weddingChurch within config.weddingMinutes (15), and no faster than config.weddingMaxSpeed (45 m/s) from the house. config.cutsceneHouse (21) plays config.cutsceneName after the repair, and config.weddingCutscene plays at the church.

config.chanceToBeRobbed (true) and config.chanceToBeRobbedPercentage (5) control the tool thief.

Loot#

config.bonusItems (true) and config.bonusItemChance (35) turn on item drops. config.items lists the items with a minLevel; an item listed three times is three times as likely. config.levelRewards sets how many items drop per level range, from 1 to 2 at the start up to 5 at level 20.

Server checks#

Setting Default What it checks
config.minMissionTime 45 s for bank, store, house and interior, 20 s per ATM or pole Earliest payout after the call starts
config.payoutRange 75.0 Distance to the site for the payout, putting the box down and the repair
config.boxRange 150.0 Distance to the site to take the parts box out of the van
config.atmRange 10.0 Distance to the ATM being swapped
config.poleRange 8.0 Flat distance to the pole being repaired
config.poleSpacing 10.0 Smallest distance between two poles on one call
config.stepChecks { enabled = true, slack = 0.8, minigameSeconds = 3, maxTravelSpeed = 60.0 } Step timing and the travel speed limit

Display and integrations#

Setting Default What it does
config.Debug false Prints job state changes to F8 and the server console
config.UI "GTAUI" How a new call is announced: "GTAUI" or "Notification"
config.HeistCompleteUI false Heist-complete screen on payout instead of a notification
config.DrawTextAtLocations false Floating 3D labels at the drop and repair spots
config.PauseMenuLegend true Names the job blips in the glitch-pauseMenu legend
config.Logging { enabled = true, resource = 'glitch-admin', webhook = 'jobs' } Job log through a Log export
config.iplLoaders { 'bob74_ipl' } Resources that count as an IPL loader for interior calls
config.Models See the file Parts box, ATMs, ladder, pole ladder, thief and groom models
config.missionBlipSprite 354 Blip on the job site and on every ATM of an ATM call

Locations#

In shared/config-locations.lua:

  • config.usingGabzBanks and config.usingGabzStores (both false) switch config.bankData and config.storeData to the Gabz MLO coordinates. Turn them on only with those maps installed.
  • config.Posts: the light pole models a ladder can go on.
  • config.atmProps: the ATM positions ATM calls use.
  • config.bankData, config.storeData, config.houseData: sites with a title, a location and the repair spots (locationOne, locationTwo).
  • config.mloData: interior calls. Entries with ipl = true need an IPL loader from config.iplLoaders, and minBuild is the lowest sv_enforceGameBuild the interior exists in. The server leaves out every interior this server cannot load.

Player text#

config.Text in shared/locale.lua holds every line players see, including the target options and blip names. Keep the %d and %s markers in the same order. Entries with one and other pick the singular or plural form by the number.