Bablo ResourcesDocs

Work Orders

A work order is a route of electrical boxes to repair. Players pick one from the dispatch board at the depot, take the work van out, repair every box on the route and bring the van back to get paid.

Everything starts at the dispatcher. The work order menu only opens there. F7 does not open it, that key only answers a crew invite.


The dispatcher

A dispatcher with a clipboard stands at the depot. The depot has a blip on the map.

LUA
Config.Brand = 'LSDWP Power Division'
 
Config.Job = {
    depotDistance = 12.0,
    depot = vector4(735.28, 130.74, 80.71 - .97, 239.76),
    dispatcher = 's_m_m_dockwork_01',
    depotBlip = { enabled = true, sprite = 354, colour = 3, scale = 0.75, shortRange = true },
}

These keys sit in Config.Job together with the other job settings.

KeyDefaultMeaning
depotSee aboveWhere the dispatcher stands. A vector4: position and heading.
dispatchers_m_m_dockwork_01The ped model of the dispatcher.
depotBlipSee aboveThe blip on the depot. enabled = false removes it. With shortRange = true it only shows on the minimap when you are close.
depotDistance12.0Metres from the dispatcher within which a player can start a crew, start a route, collect the van and return it.

The blip is named after Config.Brand. Add label = '...' to depotBlip to give it another name. Config.Brand is also the title at the top of the menu.

Options on the dispatcher

OptionWho sees it
Electrician work ordersEveryone. Opens the work order menu.
Collect work vanThe crew leader, after a route has started and before the van is out. See Work Van.
Return van and get paidThe crew leader, once every box on the route is repaired. See Returning the van.

The options use ox_target or qb-target, whichever is started, ox_target first. Without a target resource, a help text shows the first option that applies and E selects it.


The work order menu

The menu has two tabs, Routes and Crew. The Crew tab is described in Crews & Invites.

KeyWhat it does
← →Switch between the tabs.
↑ ↓Pick the previous or next route.
EscClose the menu.

The Routes tab

While your crew has no route, the tab is headed Work sites. The button next to the heading shows how many routes are on the board (5 available) and loads the list again when you click it.

Filter the routes with All, City, Sandy and Paleto. Each route card shows:

PartWhat it shows
Number and titleThe place on the board and the route’s title.
DescriptionWhat the job is about.
3 pointsThe number of boxes on the route.
RegionCity, Sandy or Paleto.
DifficultyAs written in the route, for example Routine.
$2,400 per playerWhat each player gets, worked out for your crew’s current size with the crew bonus included. See Payouts.

Under the cards, the selected route shows its estimated time, Your payout, the crew size (Players: 1) and the bonus (+0% crew bonus).

When there is nothing to show, the menu says No work orders available with All offered missions have been taken or are cooling down. New offers appear automatically. With a region picked it says No work orders in Sandy and Try another region. New offers appear automatically.

Where routes come from

The routes are the entries in Config.Job.orders plus the routes built in game with the Route Creator.

LUA
{
    id = 'la_mesa',
    title = 'La Mesa service round',
    area = 'La Mesa',
    region = 'city',
    description = 'Restore two distribution cabinets and replace the damaged fuses in a wall box.',
    difficulty = 'Routine',
    duration = '10-15 min',
    payout = 2400,
    sites = { 'supply_01', 'supply_02', 'fuse_01' },
},
KeyWhere it shows
title, description, difficultyOn the route card.
regionThe region label and filter: city, sandy or paleto. A route without one counts as city.
durationThe estimated time under the cards.
payoutThe amount split between the crew, see Payouts.
sitesThe boxes on the route, by their id in Config.Job.sites. The number of boxes is the points on the card.
areaNot shown in the menu.

A route is never offered when it has no boxes or lists a box id that does not exist. See also Configuration.


The dispatch board

The routes in the menu come from one board that the whole server shares. Every player sees the same routes.

LUA
dispatch = {
    maxOffers = 5,
    refreshMs = 10 * 60 * 1000,
    completedCooldownMs = 10 * 60 * 1000,
    unloadedGraceMs = 15000,
},
KeyDefaultMeaning
maxOffers5Routes on the board at once. 0 shows every free route.
refreshMs10 minutesTime between two new dispatches, in milliseconds.
completedCooldownMs10 minutesHow long a completed route stays off the board, in milliseconds.
unloadedGraceMs15000Belongs to crews, see Disconnects and character changes.

How the board works:

  • Every refreshMs a new dispatch draws the board again. Routes that have waited longest since they were last on the board come first, and routes that waited equally long are drawn at random. With more routes than places, the board cycles through them all.
  • The menu counts down to the next dispatch: New dispatch in 7:42. When the region you filtered has no routes, it reads Waiting for missions · Next dispatch in 7:42.
  • When a crew starts a route, the route leaves the board straight away. Its place is filled from the waiting routes, longest-waiting first. The countdown does not restart.
  • A route that shares a box with a route in progress is left off the board until that box is free again.
  • A completed route stays off the board for completedCooldownMs. A cancelled route has no cooldown and goes straight back to the waiting routes.

Starting a route

  1. Open the menu at the dispatcher and pick a route on the Routes tab.
  2. Press Start route. Only the crew leader can do this. Other crew members see The crew leader manages work orders. If you are not in a crew, a crew of one is made for you with you as leader.
  3. The menu closes. With Config.Job.van.spawnOnStart = true the van appears in the van bay right away. Otherwise the leader collects it first, see Work Van.
  4. Every box on the route gets a blip, and a waypoint is set to the middle of the boxes. See Mission HUD & Waypoints.

The crew size, the crew bonus and each player’s share are fixed at this moment, see Payouts.

SituationMessage
You are more than depotDistance metres from the dispatcherSelect your work order at the depot.
The route was taken or the board changedThis mission is no longer offered. Choose one from the updated list.
Another crew is working one of its boxesAnother crew is working this route. Select another work order.
You are not the crew leaderOnly the crew leader can do that.
Your crew already has a work orderYour crew already has an active work order.
The Framework:canDoMission hook says noYou cannot take electrician work right now. or the reason the hook returns, see Exports & Hooks
Your ped is deadYou cannot work while incapacitated.
Your character is not loaded yetYour character is still loading.
You are in another routing bucketReturn to the main world before working this job.

While the route runs

The Routes tab is headed Current mission and shows only your route. Below it you see the step the crew is on (Collect your service van, On assignment or Return to the depot) and the progress, for example 2 / 3 cabinets restored. The main button turns into Collect service van or Return van & collect pay when that step is due. Only the leader can press it. If the crew lost members since the start, the menu notes Bonus locked to starting crew size: 3.


Cancelling a work order

While the crew is repairing the boxes, the leader sees a red Cancel work order button instead of the start button. It asks Cancel this work order? Unpaid progress will be lost. with Keep working and Confirm cancellation.

After confirming:

  • The order ends without pay.
  • The van is removed and the boxes are free for other crews.
  • The crew stays together and can pick a new route.
  • The route goes back into the waiting routes without a cooldown.

The button is only there while the crew repairs the boxes, not while the van still has to be collected or returned. An order also ends early when the van is lost or when the last crew member leaves.


Finishing a route

  1. When the last box is repaired, the crew’s step changes to Return to the depot and a waypoint is set to the van bay.
  2. Drive back, park the van in the bay and get out, everyone.
  3. The leader picks Return van and get paid at the dispatcher, or Return van & collect pay in the menu. See Returning the van.
  4. The van is removed and every crew member is paid their share: Work order settled. You earned $2400. See Payouts.
  5. The route stays off the board for completedCooldownMs. The crew stays together and can take the next route.