Files
EscapistsReintroduced/docs/infantry-resupply.md
T

6.2 KiB

Finite infantry ammunition resupply

The successor now implements a limited HQ-directed rendezvous between an existing infantry patrol and the ammunition truck of the existing finite convoy. This is a partial migration of the user-owned AI extension, not full resupply parity. Automatic convoy startup now supplies the same canonical initial convoy by default; /esc hq convoy start remains its authenticated manual path. The resupply service itself creates no convoy.

Reports and rendezvous

Local own-roster ammunition sampling runs about every 30 seconds when a radio and free uplink are available, with six initial phases five seconds apart. Complete small-arms stock at or below 30 magazine-plus-chamber rounds per living member can prompt an early status report, including known empty stock. This is a formation average; incomplete or unknown inventories do not establish a shortage. Any queued status imposes a 60-second urgent-call cooldown. Routine status retains its 180-second interval, while requested check-ins bypass the urgent cooldown. Contact traffic and physical negative-search rules keep their existing order after due status.

HQ acts only on successfully delivered status. Both formations need a fresh report, at most 120 seconds old, with living and fit members; their reported positions must be within 200 metres. The recipient must be an available patrol rather than a home guard. Existing reservations, hostile perception, convoy combat, capture and ownership changes can refuse or terminate the task. Local physical checks validate execution; they do not silently update HQ's reported positions or ammunition knowledge.

The truck receives a real radio downlink to stop. After it physically stops, its original crew is asked for a new status report. HQ waits for that report to arrive before sending the infantry a separate downlink to a rendezvous three metres from the reported position. Native move/defend waypoints then direct the existing infantry. The task expires after at most 120 seconds and cannot extend beyond 180 seconds from the demand observation. A consumed demand message is not reused; that formation has a three-minute planning cooldown.

Finite cargo and physical transfer

After the convoy's single cargo-startup pass settles, the service captures the actual identities of up to 48 matching magazines already in the ammunition truck. Failed insertion, looting or subsequent loss reduces usable stock. New items added later are not adopted, and missing stock is never recreated. The service uses the original registered truck, crew, ledger records and recipient roster.

A trip allows at most six magazine transfers, one per served soldier. The individual must still have complete local small-arms stock of at most 30 rounds, carry a compatible weapon, remain on foot and be within four metres of the stopped truck. The leaf checks actual native inventory capacity, managed storage and magazine-well compatibility. It submits one TryMoveItemToStorage for the exact existing magazine. Success requires both a completed native callback and physical proof: that identity is absent from donor inventory, present in recipient inventory and parented to the selected destination storage.

Each magazine identity is spent before submission and never retried. The eight-second transfer deadline does not cancel an accepted native operation. Unresolved operations remain reserved after failure/Stop; a late completion does not turn a failed task into success. Cleanup removes only owned waypoints and releases reservations, retaining physical forces and remaining cargo. No magazine spawning, refilling, forced reload or actor teleportation is involved.

Evidence and limits

The current-source native HQ run compiles the integration and completes one scripted round with 59 assertions, zero script/runtime failures, unchanged source/external inputs and confirmed hidden/muted cleanup. Four installed RHS/WCS localization errors remain, so strict qualification stays failed. The initial compile failure is retained: splitting an overlong Enfusion condition corrected it. This fixture does not dispatch a supply convoy or prove a successful native inventory transfer.

The controlled native transfer now completes 43 assertions and one round without script/runtime failures. An existing original patrol actor is deliberately positioned beside the existing automatic convoy ammo truck; after native pose update, one original magazine transfers with unchanged round count and no new force entry. Exact native callback, source absence and destination storage ownership agree. Source/external fingerprints and private cleanup are confirmed; four external localization errors remain. This is direct transfer evidence, not a walking rendezvous.

Actual-method tests cover the coordinator's delivered-report rules, radio transitions and cleanup, the transfer's exact identity/ownership and callback requirements, and early-report scheduling under continuous contacts. Native navigation, a full HQ-directed rendezvous, ordinary play and multiplayer still require direct evidence. Before submission, physical access qualification now requires an unobstructed native trace to a root-owned authored truck storage-action context. Missing anchors or blocked/uncertain geometry refuse the operation. This does not prove an AI walking route or door-opening animation. This slice does not implement demand-triggered supply dispatch, broad supply catalogs, launcher/vehicle rearming or complete original logistics behavior.

Provenance: the authorized user-owned escapists-ai files EAI_Resupply.c (SHA-256 dfa28d0741c5515c85a6e62bc6d1a104f5474ddc22a6e58931be1583133f3586) and EAI_HQStatus.c supplied behavioral references. The successor mortar transfer supplied its physical-proof pattern; installed vanilla storage and magazine-well APIs supplied native contracts. The original protected Escapists implementation and its helpers were not imported. Related background: HQ ammunition and finite convoys.