Files
WT-Offline/apps/server/tuning/ground-ai.jsonc
T
N0VAN0M4LY 7e5eb99696 feat(ground-ai): add task order, mode-aware commander v1, and world fixes
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.
2026-12-03 17:20:17 +08:00

126 lines
3.4 KiB
JSON

// Ground battle AI configuration.
// Per-client overrides live in <dataDir>/tuning/ground-ai.jsonc. The game copy build compiles the
// layer settings into game/wtoai/wto_ai_config_common.das; the local server reads lineupWeights.
{
// "full": every custom layer (default).
// "fire": stock movement and destinations, custom perception and fire permission.
// "drive": custom team orders and driving, stock aiming and firing (debugging).
// "stock": stock AI only, no scripts packed, stock lineup weights (troubleshooting).
"mode": "full",
// Relative pick weights of AI tank classes in a battle's bot pool. Offline values; ignored in
// "stock" mode, where every vehicle keeps the stock weight of 1.
"lineupWeights": {
"spaa": 0.12,
"lightTank": 0.45,
"tankDestroyer": 0.55,
"heavyTank": 0.85,
"mediumTank": 1.15,
"other": 1.0
},
"cadence": {
"maxBots": 64,
"macroTickSec": 0.5,
"tacticsTickSec": 0.25,
"navTickSec": 0.2
},
// Team commander role quotas and timing (offline values).
"commander": {
"rebalanceSec": 5.0,
"roleHoldSec": 20.0,
"bttlAssaultPct": 45,
"bttlFlankPct": 15,
"bttlOverwatchPct": 20,
"conqAssaultPct": 50,
"conqFlankPct": 20,
"conqHoldDefendPct": 30,
"conqHoldOverwatchPct": 30,
"domAssaultPct": 70,
"domMaxDefendersPerCap": 1,
"overwatchStandOffM": 95.0,
"flankStandOffM": 75.0,
"spaaFollowOffsetM": 160.0
},
"macro": {
"openingSplitSec": 40.0,
"capMaxInsiders": 2,
"recaptureMinBots": 2,
"recaptureMaxBots": 4,
"capStickyBonusM": 165.0,
"deathZoneRadiusM": 55.0,
"deathZoneTtlSec": 60.0,
"deathZoneMinKills": 3,
"spaaRearOffsetM": 185.0,
"spaaRelocateSec": 28.0,
"enemySpawnAvoidM": 180.0
},
"crowd": {
"personalSpaceM": 14.0,
"clusterRadiusM": 28.0,
"clusterMaxAllies": 2,
"disperseStepM": 24.0,
"disperseHoldSec": 4.2
},
"terrain": {
"maxClimbSlopeDeg": 25.0,
"maxDropSlopeDeg": 20.0,
"maxWaterDepthM": 0.6,
"collisionMarginM": 0.3,
"crestLookaheadM": 28.0,
"ridgeMaxDwellSec": 10.0,
"ridgeMaxShots": 2
},
"navigation": {
// "vehicle_phys" uses custom inputs with native ownership. "movesys" keeps stock movement.
"driveMode": "vehicle_phys",
"maxPhysBots": 64,
"steerSign": 1.0,
"deadEchoSec": 1.2,
"controlTimeoutSec": 1.0,
// When false, failed or timed-out bots brake in place and log the cause instead of
// handing movement back to stock tankBot (intended for testing).
"returnToStockOnFailure": true,
"cornerBrakeAccel": 1.75,
"pivotAngleDeg": 75.0,
"stuckWindowSec": 3.6,
"stuckMinMoveM": 2.0,
"unstickReverseSec": 3.0,
"tacticalReverseDistM": 34.0,
"tacticalReverseMaxSec": 9.5
},
"tactics": {
"visionRangeM": 1250.0,
"visionFovDeg": 115.0,
"peripheralRangeM": 230.0,
"engineAudioRangeM": 65.0,
"shotAudioRangeM": 380.0,
"radioShareRangeM": 450.0,
"memoryTtlSec": 12.0,
"targetStickinessSec": 4.5,
"peekCooldownSec": 6.0
},
"fireControl": {
"maxEngageRangeM": 1350.0,
"baseAlignDeg": 0.42,
"closeHitRadiusM": 0.85,
"barrelSettleDegSec": 1.8,
"settleHoldSec": 0.2,
"unstabilizedStopSpeedMps": 0.45,
"stabilizedCreepSpeedMps": 5.5,
"friendlyCorridorM": 3.2
},
"diagnostics": {
"telemetry": false,
"telemetryIntervalSec": 5.0
}
}