Files
WT-Offline/apps/server/tuning/ground-ai.jsonc
T
N0VAN0M4LY 73bae4785f fix(ground-ai): harden drive ownership, teardown and failure switch
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.
2026-12-03 16:47:44 +08:00

108 lines
2.9 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
},
"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
}
}