Replace the per-bot greedy cap scorer (wto_ai_macro_common.das) with a
whole-team commander and explicit task order contract, and fix the world,
spec, and navigation bugs found during the codebase audit:
- Classify ground battle modes (bttl, conq, dom) in multiplayer-missions
v5 from mislist.blk categories (with suffix fallback for event maps) and
emit wtoGroundMode in customRules/customBots.
- Add the commander section to tuning/ground-ai.jsonc with range and sum
validation, compiled into WTO_AI_CMD_* constants.
- Split zone/mode/spawn refresh into wto_ai_world_zones_common.das and fix
four world snapshot bugs: stop double-recording deaths in wreck scans
and deduplicate with a ring cursor, refresh units before spawn fallback
while retrying real respawn points, fall back battleCenter to spawns
when capCount is 0, and relax cap radius clamping to 10..180 m.
- Fix limited-traverse yaw overwrite in wto_ai_specs_common.das and
compute pivot turn angle against wishDir in wto_ai_nav_common.das.
- Introduce WtoTaskOrder (wto_ai_order_common.das) and whole-team
commander v1 (wto_ai_commander_common.das +
wto_ai_commander_anchors_common.das): mode-aware role quotas (Bttl,
Conq, Dom), deterministic distance + vehicle-suitability matching,
20-second role hysteresis, separate total-assigned vs cap-insider
counters, frontline-relative SPAA anchors, EventZoneCaptured immediate
rebalance, and per-team WTO_AI|CMD telemetry.
Verified root and launcher type checks, multiplayer-missions v5 dataset
extraction (1140 missions with Bttl/Conq/Dom classification), isolated
2.61.0.58 build (18 ground AI modules packed), and clean in-engine
daScript compilation/load (wto_ai_runtime.das loaded in 155 ms, 0 compile
errors). Live battle tuning and acceptance deferred until the full
pipeline is wired.
Address two issues found in the first isolated 2.61.0.58 live runs and add
a test switch to disable silent fallback to stock movement:
- Add navigation.returnToStockOnFailure in tuning/ground-ai.jsonc (default
true), compiled into WTO_AI_NAV_RETURN_TO_STOCK and written to wto_ws.cfg
as ground_ai_return_to_stock=0 when disabled. When false, failed or
timed-out bots keep stock movement paused, brake in place and log the
failure once instead of silently handing control back to stock tankBot.
- Allow holdMs=0 release actions even after local_mp_is_host() flips false
during mission unload, add eid=0 bulk release on wto_reset_runtime(), and
match slots by eid rather than live owner lookup so match exit cleans up
the native control table immediately.
- Stop releasing drive ownership when a vehicle is immobilized by damage or
repair; brake in place and pause the echo watchdog instead, avoiding the
1-second release/re-acquire flapping observed during combat. Log exact
release reasons and back off for 1 second if MoveSystem.inactive is
cleared externally.
Verified MSVC build of wto_ws.dll (0 warnings in project C sources), root
and launcher type checks, 14/14 check-patches on 2.61.0.58, and a temporary
2.61.0.58 game copy build confirming ground_ai_return_to_stock=0 in
wto_ws.cfg and 15 packed daScript modules. Live battle re-check pending.
Stock tankBot only drives each bot to a capture point, so the custom AI is the intended player default. Stock mode stays available for troubleshooting, and per-vehicle control still returns to stock movement on failure. Verified the shipped tuning loads with mode full.
Ground AI layers could be enabled in any combination, including ones the
scripts cannot run (fire control without perception disabled stock aiming
and never fired). The configuration now selects one of four complete modes:
stock, fire (stock movement, custom fire permission), drive (custom orders
and driving, stock firing) and full. The build derives the compiled layer
constants from the mode, and an unknown mode is rejected at load time.
The offline tank class weights for the AI bot pool move from code into
tuning/ground-ai.jsonc (lineupWeights). They apply only when a custom mode
is active; stock mode keeps the stock weight of 1 for every vehicle.
Verified root and launcher type checks, mode-to-constant compilation for
all four modes, rejection of an unknown mode, bot pool weights in stock and
custom modes, and temporary 2.61.0.58 game copy builds in full mode (15
script modules packed) and stock mode (no game pack written).
BREAKING CHANGE: ground-ai.jsonc drops "enabled" and "layers". Override
files set "mode" to "stock", "fire", "drive" or "full" instead.
Grant custom physics control per LocalMP bot and let the native layer release it when the script stops renewing control. Verified both TypeScript checks, the MSVC build, native resolution and check-patches on .37 and .58, and isolated .58 script loading.
Add ground-ai.jsonc tuning validation, realistic tank class weights for
customBots pools, on-demand game.vromfs.bin / ailist.blk injection in
@wto/patcher, and launcher/CLI build integration while keeping all
ground AI layers disabled by default in shipped configuration.