feat(ground-ai)!: replace layer switches with complete modes

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.
This commit is contained in:
N0VAN0M4LY committed 2026-12-03 16:05:03 +08:00
1 parent 885e3bbb5d
commit 5e521295a3
8 files changed
+117 -51

No files matched your search

+1
View File
@@ -188,6 +188,7 @@ export async function startServer(options: ServerOptions): Promise<RunningServer
tuning.battle,
spawnRules,
botAircraftLoadouts,
tuning.groundAi.mode === 'stock' ? undefined : tuning.groundAi.lineupWeights,
(ctx) => modRuntime.runBattleFilterMissions(ctx),
);
const economy = new BattleEconomy(