Files
jakub 1b1a8b5173 Add mission customization, HQ support and aggression-driven AI
Integrate faction and random settings menus, generated objectives, scouts, convoys, air support, mortar stations and body-intel recovery. Add identified-body aggression, finite hunter UAZ deployment, dedicated objective defence and maximum AI skill with separate reduced aim accuracy. Include policy tests, native probes, evidence and documentation.
2026-09-23 15:07:14 +02:00

33 lines
4.3 KiB
Markdown

# Automatic finite convoy startup
> Superseded production behavior: see [Supply convoys](supply-convoys.md) for the original default-three fleet, full troop truck, base circuit and dismount/reboarding implementation. The evidence and implementation notes below describe the earlier single-convoy stages.
The full AI scenario now enables one automatic initial convoy by default. Core-only scenarios remain unchanged. HQ freezes `automaticConvoyEnabled` when the round creates its command service; saving a different value affects the next round only.
Commands use the existing authenticated mission administration:
- `/esc hq convoy auto show|set 0|1|help`: inspect or save the next-round switch.
- `/esc hq convoy show`: inspect the current startup and convoy state.
- `/esc hq convoy start`: manually request the same canonical convoy, including when automatic startup is disabled.
There is one shared deployment allowance. Manual dispatch before the automatic attempt consumes it; a later request cannot create a duplicate. Destruction, capture, route refusal or partial deployment never replenish the automatic allowance.
## Startup and ownership
The existing HQ tick starts a 30-second grace period when tactical processing first becomes active. Afterward the policy checks admission every five seconds, for at most 120 seconds from its first active tick. All existing registered groups must already have force records; a non-stopped mortar must complete startup. The policy latches its sole attempt before calling the existing authored supply-site road survey and dispatch service. A failed road survey or unavailable force budget is terminal for automatic startup. Administrators can still inspect the reason and explicitly request the canonical manual path where its original admission rules permit it.
This is the existing six-vehicle, nineteen-person convoy. Shared physical force limits, consumed receipts, original crews, cargo and native driving remain authoritative. There is no independent timer, periodic spawn, replacement unit or increased body cap. The infantry resupply service can use this convoy's existing finite magazine stock; full truck/air/depot logistics remains unfinished.
## Settings migration
Missing `automaticConvoyEnabled` in an otherwise valid older successor settings file defaults to 1. Explicit 0 remains disabled; fractional and out-of-range values are invalid. `/esc settings` labels the saved next-round value. The fixed ten-row administration menu remains unchanged; this and Stinger are command-only settings.
The explicit settings importer maps owned predecessor `convoyCount=0` to disabled and `1..20` to enabled. Counts above one produce a visible capped-capacity notice. This preserves the old disabled choice without claiming the predecessor's default-three or maximum-twenty convoy capacity. Ambiguous simultaneous old/new keys are rejected. Import never overwrites source or an existing destination.
## Validation boundary
Actual-method tests cover one-shot timing, disabled/manual states, admission waits, deadline expiry, backward/invalid clocks, server/current-mode authority and stop. Settings tests cover migration, authenticated read/write commands, failed saves and unchanged current deployment. The [current native run](evidence/native-2026-09-20-081658-automatic-convoy/report.json) completes one round and 93 assertions with zero script/runtime failures: one automatic six-vehicle task, nineteen original seated crew, five native turret gunners at skill100, and duplicate manual dispatch refused. Exact sources/external inputs remain unchanged and private cleanup is confirmed. Four installed external localization errors retain failed strict qualification; full-route reliability, resupply gameplay, remote clients and FPS remain separate requirements.
The native HQ-memory fixture observes automatic creation and original seated crew through the production startup path, then performs its existing radio-memory checks. Startup has a bounded 150-second fixture window, followed once by the original 120-second memory window. The explicit manual-convoy fixture alone reads automatic startup as disabled in its WORKBENCH-only settings adapter; ordinary sessions and other fixtures use the real saved/default value. No native evidence from the earlier manual fixture is relabeled as automatic startup.