fix(ground-ai): spread team routes, pass vehicles and keep off deep water
First in-game run of the path follower on Berlin and Poland showed whole teams queueing on one road, bots ramming stopped teammates and wrecks, bots clipping building corners, bots sliding into the Poland river and the same bot getting stuck at the same spot dozens of times. Native engine (native/wto-nav): - Team traffic: a bot's finished path counts for its team for trafficHoldSec; the team's later searches pay trafficCostPerPath more per counted path through a polygon (up to trafficCostMaxMul), so teammates spread over parallel routes. A slot's previous path stops counting when it asks for a new one. - Path corners are moved up to cornerOffsetM away from the edge they turn around, when the mesh allows both legs; off-mesh link endpoints stay put. - path_request takes the team; load_map takes the new settings; get_stats reports live traffic paths and moved corners. Bake (tools/navgen): - Water deeper than navBake.maxFordDepthM (0.9 m, was a fixed 0.6 m) is a wall before erosion, so walkable ground keeps the tier radius from it, plus deepWaterMarginM on banks lower than deepWaterBankHeightM above the water line. Quays and ramps above it keep only the radius. The preview marks deep water from the terrain. Ground AI scripts: - The lookahead point is pulled back along the path until the mesh allows the straight line to it, so corners are no longer cut through buildings. - New traffic module replaces the fixed sideways step: hull length and width along the heading; stopped vehicles, wrecks and parked players are passed on the side with room, or the bot stops short and after blockWaitSec marks the spot and plans again; moving traffic ahead is followed; oncoming traffic is passed in the open and in narrow passages the bigger vehicle goes first. Wrecks carry their heading. - A hull pressed against a vehicle or wreck backs off after contactReverseSec instead of the full stuck window. - Jams and confirmed obstacles cost far more, and a given-up place is all but closed (giveUpRadiusM, giveUpCostMul), so replanning leaves instead of returning to it. Tuning: navEngine trafficCostPerPath, trafficCostMaxMul, trafficHoldSec, cornerOffsetM; pathFollow stationarySpeedMps, passMarginM, passSpeedMps, blockWaitSec, blockTtlSec, contactGapM, contactReverseSec, giveUpRadiusM, giveUpCostMul; avoidShiftM removed; jamCostMul 4 -> 12, rubbleCostMul 8 -> 25; navBake maxFordDepthM, deepWaterMarginM, deepWaterBankHeightM (bake only). Launcher fields and en/zh-CN labels updated (978/978 keys). Checked: root and launcher typecheck, MSVC build with no warnings in project code, check-patches for 2.61.0.58 and 2.61.0.60, rebake of avg_berlin, avg_poland and avg_hurtgen (all spawn-to-zone pairs still connected on every tier), offline run on the new avg_poland pack (eight same-team paths spread over different roads, traffic released after the hold time, corners moved, pump within budget), isolated game copy build. daScript compilation and in-battle behaviour still need the in-game run.
This commit is contained in:
1 parent
ba947fe5b6
commit
413bd55c54
25 files changed
+817
-161
No files matched your search
@@ -189,6 +189,10 @@ function readNavEngineSection(engine: TuningReader): GroundAiTuning['navEngine']
|
||||
snapRadiusM: engine.number('snapRadiusM', { min: 2, max: 40 }),
|
||||
goalSnapRadiusM: engine.number('goalSnapRadiusM', { min: 5, max: 150 }),
|
||||
pathBudgetMsPerFrame: engine.number('pathBudgetMsPerFrame', { min: 0.05, max: 5 }),
|
||||
trafficCostPerPath: engine.number('trafficCostPerPath', { min: 0, max: 3 }),
|
||||
trafficCostMaxMul: engine.number('trafficCostMaxMul', { min: 1, max: 10 }),
|
||||
trafficHoldSec: engine.number('trafficHoldSec', { min: 0, max: 120 }),
|
||||
cornerOffsetM: engine.number('cornerOffsetM', { min: 0, max: 5 }),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -234,8 +238,14 @@ function readPathFollowSection(pf: TuningReader): GroundAiPathFollow {
|
||||
bumperStopM: n('bumperStopM', 0.3, 6),
|
||||
bumperBlockSec: n('bumperBlockSec', 0.2, 5),
|
||||
trafficTtcSec: n('trafficTtcSec', 0.5, 8),
|
||||
avoidShiftM: n('avoidShiftM', 0.5, 10),
|
||||
yieldWaitMaxSec: n('yieldWaitMaxSec', 0.5, 15),
|
||||
stationarySpeedMps: n('stationarySpeedMps', 0.2, 4),
|
||||
passMarginM: n('passMarginM', 0.2, 4),
|
||||
passSpeedMps: n('passSpeedMps', 1, 12),
|
||||
blockWaitSec: n('blockWaitSec', 0.5, 15),
|
||||
blockTtlSec: n('blockTtlSec', 3, 120),
|
||||
contactGapM: n('contactGapM', 0.2, 3),
|
||||
contactReverseSec: n('contactReverseSec', 0.3, 5),
|
||||
stuckWindowSec: n('stuckWindowSec', 1, 15),
|
||||
stuckMinProgressM: n('stuckMinProgressM', 0.2, 10),
|
||||
unstickReverseM: n('unstickReverseM', 2, 25),
|
||||
@@ -245,6 +255,8 @@ function readPathFollowSection(pf: TuningReader): GroundAiPathFollow {
|
||||
jamRadiusM: n('jamRadiusM', 2, 50),
|
||||
jamCostMul: n('jamCostMul', 1, 50),
|
||||
jamTtlSec: n('jamTtlSec', 5, 600),
|
||||
giveUpRadiusM: n('giveUpRadiusM', 3, 50),
|
||||
giveUpCostMul: n('giveUpCostMul', 1, 200),
|
||||
rubbleRadiusM: n('rubbleRadiusM', 1, 40),
|
||||
rubbleCostMul: n('rubbleCostMul', 1, 50),
|
||||
rubbleTtlSec: n('rubbleTtlSec', 5, 600),
|
||||
|
||||
Reference in new issue
Block a user