-
Notifications
You must be signed in to change notification settings - Fork 3
Fleet Operations
Version 3.2.0 Beta added a player-owned taxi fleet alongside the normal personal shift. The player can continue driving, open My Fleet from the start screen or the map overlay, and monitor hired drivers without replacing the active passenger, cargo, or refueling state.
Fleet vehicles use lightweight native route workers rather than copies of the player's target-specific AI lifecycle. They follow purposeful TaxiDriver assignments and remain persistent in the world while BeamNG performs steering. Since 3.4.1 RC, every worker also receives a reduced-rate traffic guard for smooth following and curved-path conflict prediction.
Two sources are available:
- Garage: select an installed model/configuration and spawn a separate fleet car near a safe point around the player. The player is not moved into it.
- Traffic: recruit one of the nearest eligible AI traffic cars. TaxiDriver removes it from the normal traffic pool so BeamNG does not despawn it while employed.
Both paths charge the configured hiring fee and respect the active-driver limit. Dismissing a garage vehicle deletes that spawned car. Dismissing a recruited traffic vehicle returns it to the traffic system where possible.
flowchart TD
Open[Open My Fleet] --> Source{Hiring source}
Source -->|Garage| Select[Choose installed model and configuration]
Source -->|Traffic| Nearby[Choose a nearby eligible traffic car]
Select --> Validate{Enabled, capacity and funds valid?}
Nearby --> Validate
Validate -->|no| Error[Show localized reason]
Validate -->|yes| Fee[Charge hiring fee]
Fee --> Own[Detach from player/traffic lifecycle]
Own --> Worker[Create an independent fleet worker]
Worker --> Plan[Plan first assignment]
A worker randomly selects from the enabled passenger and delivery categories, builds a road-graph route between the configured minimum and maximum distance, and sends that node list to BeamNG through ai.driveUsingPath. The simplified Fleet AI preset is independent from the detailed player AI Driver preset.
stateDiagram-v2
[*] --> Planning
Planning --> Working: route created
Planning --> Planning: graph temporarily unavailable
Working --> Resting: physical destination reached
Working --> Planning: current-segment replan
Working --> Resting: retry budget exhausted
Resting --> Planning: break ends
Working --> Unpaid: ten-minute wage cannot be paid
Unpaid --> Working: wallet can pay wage
Working --> [*]: dismissed or session ends
Resting --> [*]: dismissed or session ends
Unpaid --> [*]: dismissed or session ends
On completion, the fare is based on driven distance and job time. Only the configured owner share is credited to the player's wallet. Hiring fees and wages are charged separately, so a larger fleet is not automatically profitable.
Default economy:
| Setting | Default | Allowed range |
|---|---|---|
| Owner share | 35% | 10–90% |
| Hiring fee | $75 | $0–1,000 |
| Wage per 10 minutes | $12 | $0–250 |
| Active drivers | 6 | 1–12 |
| Job distance | 1.5–8 km | 0.5–50 km |
| World label distance | 400 m | 50–1,000 m |
At least one job category always remains enabled after validation.
| Preset | Intended behavior |
|---|---|
| Careful | Low native aggression and legal speed mode |
| Standard | Moderate native aggression and legal speed mode |
| Fast | Higher native aggression with the legal-speed cap disabled |
These presets are deliberately narrower than the player's AI settings. Fleet workers use the native driver's collision avoidance, lane behavior, signals, and recovery. TaxiDriver applies aggression, native speed mode, following/braking preferences, a bounded no-progress timeout, and a retry limit. Their traffic observer runs every 200 ms with six curved-path samples.
Each worker owns only its assignment progress and a small monitor. Monitoring runs every 250 ms and workers are staggered across four 62.5 ms phases, so up to twelve employees do not all execute their checks in one simulation tick.
flowchart TD
Tick[Staggered 250 ms monitor] --> Progress{Vehicle still making progress?}
Progress -->|yes| Continue[Keep native route]
Progress -->|no, below timeout| Wait[Let native traffic AI continue]
Progress -->|no, timeout reached| Budget{Fewer than 3 replans?}
Budget -->|yes| Segment[Find current road segment]
Segment --> Graph[Build path from current segment to target]
Graph --> Trim[Discard already passed nodes]
Trim --> Native[Issue corrected native route]
Budget -->|no| Abandon[Abandon unreachable assignment]
Abandon --> Rest[Short rest, then select another job]
The minimum no-progress window is 45 seconds. A native Route Done event is accepted as arrival only when the vehicle is within 22 metres of the target; otherwise a corrected route is requested after one second. Normal job completion still requires the tighter 12-metre radius and a speed at or below 5 km/h.
The retry path starts from the employee's current road segment and excludes route nodes already passed. This prevents a stalled worker from treating the first node of the original assignment as a new destination and turning around toward its route origin. After three unsuccessful replans, the assignment is discarded instead of running recovery indefinitely.
The fleet screen provides:
- total jobs, gross fleet revenue, owner revenue, wages, hiring costs, and net profit;
- active vehicle, source, passenger/cargo assignment, status, progress, remaining distance, speed, and AI status;
- a player-centered live map with owned taxis shown as purple markers;
- access during a personal trip through the purple fleet button over the map;
- localized world labels identifying an owned taxi and its current activity within the configured range.
The native minimap and Connected Phone canvas use separate rendering integrations but consume the same authoritative fleet marker list from Game Engine Lua. A dedicated map occlusion keeps the Active drivers overlay above the native road renderer.
/settings/TaxiDriver/fleet.json stores aggregate and per-vehicle statistics:
- rides, passenger rides, and delivery rides;
- driven distance;
- gross revenue and owner revenue;
- wages and hiring fees.
Active workers themselves are session-scoped. On level/session shutdown TaxiDriver stops their AI, releases recruited traffic vehicles, deletes separately spawned fleet vehicles, restores wrapped minimap functions, and flushes dirty statistics. A stale vehicle ID is removed from the active list instead of being persisted as a live employee.
flowchart LR
UI[TaxiDriverHUD fleet view] -->|fleet command| Main[taxiDriver.lua]
Main --> Manager[fleetManager.lua]
Manager --> Economy[Wallet delta and fleet.json]
Manager --> W1[lightweight fleetWorker #1]
Manager --> W2[lightweight fleetWorker #2]
Manager --> WN[lightweight fleetWorker #N]
W1 --> V1[BeamNG native route AI #1]
W2 --> V2[BeamNG native route AI #2]
WN --> VN[BeamNG native route AI #N]
Manager --> NativeMap[Native purple markers]
Manager --> Labels[Localized world labels]
Main --> Publisher[HUD snapshot / Connected Phone]
Publisher --> WebMap[Canvas purple markers]
The main distinction is ownership: fleetManager.lua owns economy, persistence, hiring, markers, and lifetime; fleetWorker.lua owns one assignment state and issues bounded native route commands. No worker creates the player's autopilot.lua instance or shares the player's active trip, route, target or traffic state.
TaxiDriver Reloaded documentation · Version 4.0.3 · BeamNG.drive 0.39
- Installation and Quick Start
- Gameplay and Ride Lifecycle
- Order Generation and Routing
- Passengers, Fares and Ratings
- Cargo Deliveries
- Realistic Refueling
- Driver Profile and Persistence
- Settings, Localization and Audio
- Navigation and Map Controls
- External Web UI
- Driver UI Design
- AI Driver Engine 0.39
- AI Driver and Recovery
- Fleet Operations
- Troubleshooting and Compatibility