feat(ground-ai): add navmesh flank lanes, rally staging, recall, and air-aware SPAA
Complete the team commander layer with validated flank routes, coordinated
rally launches, dynamic cap recall, and air-threat-responsive SPAA:
- Add flank, rally, and recall parameters to the commander section of
tuning/ground-ai.jsonc (flankMaxLengthRatio, flankMinSeparationM,
rallyProgressFrac, rallyWaitSec, rallyMinFrac, rallyRadiusM,
recallSafeHoldSec), validated in ground-ai-tuning.ts and compiled into
WTO_AI_CMD_* constants.
- Add wto_ai_lanes_common.das:
- Lazily build and cache per-(team, cap) center and left/right flank
lanes using two-segment navmesh find_path_ex; reject flanks exceeding
1.6x center path length or closer than 45 m to the center midpoint.
- Stage offensive groups at the 40% rally point along their lane and
launch once 2/3 of the group arrives or 25 s elapse, resetting on cap
ownership flips.
- Track enemy ground count and contested state on friendly caps,
holding recall active until safe for 15 s; track enemy aircraft
presence for team SPAA intel.
- Split mode planners and recall demand overrides into
wto_ai_commander_plans_common.das; pull (enemies + 1) nearest support
or reserve bots to defend contested friendly caps while always keeping
at least one offensive assault bot.
- Update wto_ai_commander_anchors_common.das so SPAA follows behind the
actual Assault group centroid and checks upward open-sky clearance when
enemy aircraft are active.
- Wire WtoTaskOrder lane/relay/rally fields into wto_ai_route_common.das
(replacing unvalidated wing relays and preserving corridor turning
corners), wto_ai_tactics_common.das (rally staging hold), and
wto_ai_runtime.das (1 s rally release check).
Verified root and launcher type checks, isolated 2.61.0.58 build (27
ground AI modules packed), and clean in-engine daScript compilation/load
(wto_ai_runtime.das loaded in 183 ms, 0 compile errors). Live battle
acceptance deferred until the full pipeline is wired.
This commit is contained in:
1 parent
45ff082a36
commit
d5008baeff
11 files changed
+582
-188
No files matched your search
@@ -105,6 +105,13 @@ function readCommanderSection(cmd: TuningReader): GroundAiTuning['commander'] {
|
||||
overwatchStandOffM: cmd.number('overwatchStandOffM', { min: 25.0, max: 350.0 }),
|
||||
flankStandOffM: cmd.number('flankStandOffM', { min: 25.0, max: 300.0 }),
|
||||
spaaFollowOffsetM: cmd.number('spaaFollowOffsetM', { min: 40.0, max: 500.0 }),
|
||||
flankMaxLengthRatio: cmd.number('flankMaxLengthRatio', { min: 1.05, max: 3.0 }),
|
||||
flankMinSeparationM: cmd.number('flankMinSeparationM', { min: 15.0, max: 200.0 }),
|
||||
rallyProgressFrac: cmd.number('rallyProgressFrac', { min: 0.1, max: 0.75 }),
|
||||
rallyWaitSec: cmd.number('rallyWaitSec', { min: 3.0, max: 60.0 }),
|
||||
rallyMinFrac: cmd.number('rallyMinFrac', { min: 0.25, max: 1.0 }),
|
||||
rallyRadiusM: cmd.number('rallyRadiusM', { min: 15.0, max: 140.0 }),
|
||||
recallSafeHoldSec: cmd.number('recallSafeHoldSec', { min: 3.0, max: 60.0 }),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,14 @@
|
||||
"domMaxDefendersPerCap": 1,
|
||||
"overwatchStandOffM": 95.0,
|
||||
"flankStandOffM": 75.0,
|
||||
"spaaFollowOffsetM": 160.0
|
||||
"spaaFollowOffsetM": 160.0,
|
||||
"flankMaxLengthRatio": 1.6,
|
||||
"flankMinSeparationM": 45.0,
|
||||
"rallyProgressFrac": 0.40,
|
||||
"rallyWaitSec": 25.0,
|
||||
"rallyMinFrac": 0.66,
|
||||
"rallyRadiusM": 55.0,
|
||||
"recallSafeHoldSec": 15.0
|
||||
},
|
||||
|
||||
"macro": {
|
||||
|
||||
Reference in new issue
Block a user