Skip to content

HUD State Reference

noteMASTER11 edited this page Jul 17, 2026 · 9 revisions

HUD State Reference

TaxiDriverHUDState is the complete UI-facing snapshot emitted by the GE extension. Version 3.0.0 Beta also emits TaxiDriverHUDPatch while Connected Phone is active. Every full snapshot carries hudEpoch and hudRevision; every patch carries epoch, baseRevision, revision, changed values, and removed field names. The JavaScript controller accepts only a continuous revision chain and requests a full resynchronization after a gap.

Session and profile

Field Type Meaning
active Boolean Taxi shift is online
phase String Current phase ID from config.lua
phaseLabel String Backend diagnostic label; UI normally uses localized phase keys
message String Backend status/diagnostic message
balance Number Wallet balance rounded to cents
rating Number Persistent rating from 0 to 5
ratingCount Integer Number of ratings included in the average
completedRides Integer Successfully completed rides
difficulty String Active preset ID
realisticMode Boolean Realistic economy is active for this shift
shift Object Current and previous shift accounting snapshots
currentVehicle Object Selected vehicle identity, preview, odometer, work totals, and availability
driverProfile Object {fullName, avatar} header summary
passengerOnboard Boolean Current phase logically contains a passenger
deliveryOnboard Boolean Current phase logically contains loaded cargo
settings Object Canonical settings document
settingsNeedsLegacyImport Boolean UI may import old local-storage settings
lan Object Experimental external-phone listener, connection count, address, port, URL, and bridge diagnostics

lan.enabled reflects the current session only. The bridge additionally reports bridgeReady and bridgeError; url contains the stable token and should not be published in bug reports.

Dispatcher and queued offer

Field Type Meaning
offers Array Current dispatcher cards
offerTargetCount Integer Random target from 10 to 12
nextOffer Object/null Floating offer, remaining time, duration, accepted flag
notification Object/null Phone-local notification key, values, severity, and monotonic ID

Each offer exposes:

id, passengerName, passengerCalmness,
isDelivery, cargoWeightKg, cargoWeightBonusPercent,
cargoWeightBonusAmount, cargoDamagePercent,
pickupDistance, pickupEtaMinutes, pickupWaitSeconds,
rideDistance, etaMinutes,
baseFare, ratingAdjustedFare, estimatedFare,
ratingBonusPercent, ratingBonusAmount,
isMultiStop, stopCount, stopWaitSeconds,
isRush, bonusPercent, bonusAmount, timeLimitMinutes,
randomEvent

Active passenger and mood

Field Type Meaning
activeTripId Integer Current offer/trip ID; zero when absent
passengerName String Current passenger
passengerCalmness Number Current dynamic mood percentage
passengerInitialCalmness Number Mood at offer creation
passengerMoodMaximum Number Initial mood + 40, capped at 100
passengerMoodChangeId Integer Increments for each applied mood change
passengerMoodChangeDirection String up or down
passengerMoodChangeAmount Number Absolute applied change
passengerStressPercent Number Stress divided by the current mood-dependent threshold

Active cargo delivery

Field Type Meaning
isDelivery Boolean Current work item is a cargo delivery
cargoWeightKg Number Physical cargo mass selected for the order
cargoWeightBonusPercent Number Linear weight fare premium × 100
cargoWeightBonusAmount Currency Weight premium included in the delivery base fare
cargoDamagePercent Number Cumulative package damage from 0 to 100
finalFare Currency Locked completion payout
rideRating Number Delivery result from 1 to 5

Route and timing

Field Type Meaning
distanceToTarget Metres Ground-marker path length to current target
rideDistance Metres Complete passenger route length
etaMinutes Minutes ETA to current target at 40 km/h
rideEtaMinutes Minutes Remaining passenger drive plus scheduled waits
routeProgress 0–1 Current pickup, fuel, or complete passenger-route progress
progressLabel String Backend progress label
speedLimit km/h Closest road-link speed limit, or zero
currentSpeed km/h Active vehicle speed
nextStopDistance Metres Remaining distance to the current intermediate stop
fuelEnoughForTrip Boolean Estimated current range covers the remaining route
tripEvent Object Safe UI projection of the active optional random event

Pickup, stops, and rush

pickupWaitLimit, pickupTimeRemaining, pickupLate, pickupLateSeconds,
isMultiStop, stopCount, currentStopIndex, stopProgressMarkers,
stopWaitDuration, stopWaitRemaining,
rushOrder, rushBonusActive, rushBonusLost,
rushBonusAmount, rushTimeLimit, rushTimeRemaining

Every stop marker has {index, progressPercent, active, completed}.

Fare and penalties

Field Type Meaning
estimatedFare Currency Offer value including rating/rush bonus before penalties
adjustedFare Currency Current payable amount after penalties and lost rush bonus
tipAmount Currency Earned conditional event tip, included in final/projected payout
ratingBonusPercent Number Current rating bonus rate × 100
ratingBonusAmount Currency Rating bonus amount
penaltyPercent Number Capped combined penalty × 100
penaltyEvents Array UI event log with localized kind data
penalties Object Aggregate component values and event counters

Penalty event fields:

id, kind, label, detail, fareAmount, penaltyPercent,
speedExcess, duration, damage, peakG, lateSeconds, stationName

Kinds currently include speeding, collision, aggression, pickupDelay, bonus, fuelStop, and cargoDamage.

Vehicle energy dashboard

vehicleEnergy is refreshed through Vehicle Bridge at a throttled interval:

available, energyType, quantity, maxQuantity, percent, unit, estimatedRangeKm

The full and minimized ride dashboards use it to show current fuel/charge and approximate range without polling Vehicle Lua every frame.

Forced exit and offline confirmation

forcedExitDuration, forcedExitRemaining,
earlyExitRatingLossPercent,
offlinePenaltyExtraPercent, offlinePenaltyRatingLoss, offlinePenaltyFinalRating,
driverAbandonmentRatingLoss, driverAbandonmentExtraPercent

The UI uses the preview fields before calling confirmDriverAbandonment().

Fuel station model

fuelStation contains:

{
  available,
  id,
  name,
  magic,
  balance,
  options: [{
    energyType, unit,
    currentQuantity, maxQuantity, missingQuantity,
    affordableQuantity, currentPercent,
    pricePerUnit, maxCost, consumptionPer100Km
  }],
  refueling: {
    active, completing, energyType,
    quantity, cost, duration, elapsed,
    progress, remainingSeconds, completionId
  }
}

completionId allows the UI to detect a newly completed transaction even when subsequent state snapshots contain no active refueling session.

Fuel detour model

fuelDetour contains:

active, hadTrip, passengerOnboard,
stationName, routeDistance, penaltyPercent, arrived

The underlying Lua state also stores the previous phase and route information, but those internal values are not exposed to the UI.

Clone this wiki locally