Files
EscapistsReintroduced/docs/supply-convoys.md
T

9.2 KiB
Raw Blame History

Supply convoys

The production HQ now uses ERR_SupplyConvoySystem, ERR_SupplyConvoyService, ERR_SupplyConvoyColumn and ERR_SupplyConvoyTactics, adapting the owned original EAI_SupplyConvoys.c to the combined mod's native AI and force ledger.

Configuration

Esc → Mission settings → HQ → Convoys next round accepts 0–20 or Random (uniformly 0–20). The original default is 3. The server resolves and freezes this count when the round is created. /esc convoys show, /esc convoys set 3 and /esc convoys set random use the same authenticated command service. /esc hq convoy count ... is an alias. Changes do not create or delete an active convoy.

The existing automaticConvoyEnabled switch remains supported. A saved zero continues to disable automatic startup. /esc hq convoy start can consume the next unused slot in the current round's configured allowance; it cannot replace a consumed slot. The settings importer preserves the original exact convoyCount, including zero, rather than reducing it to one convoy.

Vehicles, soldiers and cargo

Each USSR convoy uses the original order: PKM UAZ, ammunition Ural, troop Ural, PKM UAZ, BMP-1, PKM UAZ. There are 25 original soldiers: eleven vehicle crew and all fourteen Ural passenger seats, alternating between two independent seven-person infantry teams. Drivers and gunners stay in separate vehicle groups. The groups use the successor's memberless prefab, not the original framework's group-spawn hooks.

One finite receipt reserves eight groups and 25 bodies before creation. Partial creation consumes that slot and preserves surviving entities. The production budget permits the existing 60-body allowance plus 25 bodies per configured convoy, within the shared 256-formation ledger. Losses never refund convoy slots. This is an admission ceiling, not a performance guarantee for twenty simultaneous convoys.

The ammo truck receives eight random weapons from the convoy faction's native arsenal and six matching magazines/projectiles per muzzle of each successfully inserted weapon. The batch has a 96-ammunition-request ceiling and is issued once. Storage failures reduce the actual load; there is no refill after looting. Vehicle contents, casualties and surviving soldiers remain physical after controller release. The earlier infantry rendezvous service still uses the first convoy's compatible AK magazine stock; this change does not distribute that separate service across all trucks.

Travel and combat

After prison escape and existing force admission, automatic deployment begins after a 30-second grace period. Every five seconds it tests up to eight road formations, for at most 120 startup passes. It uses friendly military outpost, depot and radio-site road approaches within 500 metres, deduplicated at 300 metres. Starting formations are separated by up to one kilometre and retain all existing road, terrain and obstruction checks.

The initial road route feeds an ongoing circuit between different friendly bases. One travel controller paces each column: the lead vehicle follows the route and each follower targets the preceding surviving vehicle. After combat or a new base leg, travel order follows physical approach to the destination while vehicle identities and combat roles remain unchanged. The leader waits when a neighbour gap exceeds 160 metres and resumes below 90 metres; followers regulate their speed and retain stable movement targets. Arrival requires the lead vehicle to physically reach the route endpoint and the followers to close up in order. A timeout never counts as arrival. Commanded vehicles with no five-metre progress retry native navigation after 45 seconds; after three minutes without progress they leave the column, preserving their physical crew and cargo. Combat, boarding, intentional spacing waits and supply stops do not consume that timer. Convoys pause 45–90 seconds after physical arrival before selecting their next destination. The original carried supplies between bases but did not unload or regenerate them; no artificial unloading is added here.

Combat starts from fresh identified native group perception within 400 metres of a surviving convoy vehicle or a delivered HQ sighting. Mounted group origins are not used for this distance, because native groups can retain their original spawn position. Infantry dismounts, approaches the left and right flanks, then searches those sectors. Armed escorts provide cover while the ammo truck withdraws; the troop truck waits until the passengers have dismounted and cleared it by 25 metres. Convoy vehicles slow to 8 km/h within 45 metres of their fit dismounted teams and restore cruising speed for travel. Contact-driven tactical orders refresh no more often than every thirty seconds and only after the contact moves at least forty metres; unchanged sightings retain the existing manoeuvres. Combat and boarding suspend column travel, and surviving vehicles regroup before resuming. Still-mounted infantry receives at most six dismount retries, ten seconds apart, to recover from busy doors or a braking truck. Native boarding waypoints require all surviving members and use a 100-metre approach radius; actual compartment membership determines readiness. Crew retention suppresses both group and individual abandonment priorities only for the original mounted vehicle crew and releases on critical damage or drivetrain failure, allowing native emergency abandonment.

After sixty seconds without a fresh contact, the teams reboard under escort cover. A new contact interrupts boarding. While soldiers approach or board, their native orders are preserved. A team with no approach or seat progress for thirty seconds can receive up to three boarding retries, with one tick between cancellation and reissue so native reservations can settle. A five-minute hard deadline releases genuinely stranded survivors and lets the remaining vehicles continue. A lost troop truck releases the infantry. Player capture stops convoy control permanently, preserving the actors and loot.

Validation

tests/test_convoy_column.py executes the production spacing, stable-target, physical-arrival, leader-promotion, supply-ownership and stuck-recovery controller against native-boundary doubles. tests/test_supply_convoys.py executes production startup, base selection, arrival, circuit timing, contact freshness and perception boundaries, scoped crew-abandonment priorities, combat quiet time, boarding interruption, timeout and truck-loss policies. The receipt tests cover all eight groups and configured fleets through twenty convoys, including no replacement after losses. Existing dispatch, native seat allocation, cargo, HQ radio and force-ledger regressions remain in the main check suite.

tools/headless_workbench.py --project chat --smoke supply-convoys --rounds 1 --timeout 900 exercises production automatic startup and physical AI in an isolated Workbench profile. Its final controlled contact explicitly tests native dismount/reboarding rather than claiming that an injected report proves perception. Remote-client replication and twenty-convoy performance require dedicated-server testing. Earlier one-convoy evidence in convoy-migration.md and convoy-startup.md remains historical evidence for those earlier sources.

The legacy convoy and hq-memory Workbench smoke fixtures explicitly select their previous single-convoy controller under WORKBENCH and errSmoke=1, preserving those fixtures' existing assertions. Normal play, ordinary Workbench use, and the supply-convoys fixture use the full configured fleet.

Local native result — 2026-09-21

/tmp/erri-supply-native10/logs/logs_2026-09-21_16-50-45 completed one supply-convoys smoke round with 36 common smoke assertions, no script/runtime failures, unchanged launch sources, and confirmed runner cleanup. The supply fixture additionally verified three automatically started convoys (18 vehicles, 75 original soldiers), exact ledger admission, 174 successful cargo insertions matched to physical inventory, all 18 vehicles driving at least 20 metres, both seven-person teams dismounting and reboarding, and the original troop truck driving the next base leg after the normal pause. The contact and expiry of the preceding trip deadline were explicitly injected test inputs; startup, native AI, seating, cargo, the pause and subsequent driving remained production-owned. RHS content was disabled in this isolated fixture, while its installed dependencies remained loaded.

Launch source fingerprint: 380aec8a078825b165593fc4445b603f80b5d1ec51360c018d34973d65302b62. Raw logs remain outside the repository. Strict engine qualification still fails on nine pre-existing dependency errors: four RHS/WCS localization GUID errors and five inherited vehicle-catalog keyword errors (SlidingTrackMaterial/Parent). This is a successful convoy smoke scenario, not a clean-engine or multiplayer qualification.

python3 tools/check.py passed for this production source; the additional bounded-retry regression also passed afterward. Earlier native iterations exposed partial dismounts, premature healthy-crew abandonment and a crowded boarding approach; the final source contains the bounded exit retries, scoped group/individual priority guards and widened native boarding approach validated above.