Skip to content

HUD State Reference

noteMASTER11 edited this page Jul 14, 2026 · 9 revisions

HUD State Reference

TaxiDriverHUDState is the complete UI-facing snapshot emitted by the GE extension. The JavaScript controller merges it into $scope.state after normalizing list fields.

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
driverProfile Object {fullName, avatar} header summary
passengerOnboard Boolean Current phase logically contains a passenger
settings Object Canonical settings document
settingsNeedsLegacyImport Boolean UI may import old local-storage settings

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,
pickupDistance, pickupEtaMinutes, pickupWaitSeconds,
rideDistance, etaMinutes,
baseFare, ratingAdjustedFare, estimatedFare,
ratingBonusPercent, ratingBonusAmount,
isMultiStop, stopCount, stopWaitSeconds,
isRush, bonusPercent, bonusAmount, timeLimitMinutes

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

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

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
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, and fuelStop.

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,
  balance,
  options: [{
    energyType, unit,
    currentQuantity, maxQuantity, missingQuantity,
    affordableQuantity, currentPercent,
    pricePerUnit, maxCost
  }],
  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