Battle behaviour could only be judged by watching one bot at a time. The AI now logs a replay trace and a local viewer plays it back on the map. Game scripts: - wto_ai_trace_common.das writes every diagnostics.traceIntervalSec the capture zones (WTO_AI|TRACE_CAP), every ground unit including players (TRACE_U) and each bot's decision state (TRACE_B: order, behavior, targets, what the turret looks at and why, barrel heading, fire denial, hit probability), plus part damage with its offender (HIT) and deaths (DEATH). It uses no engine module so a simulator can load it as is. - The turret state records the reason and world direction of each look. - New tuning diagnostics.trace and diagnostics.traceIntervalSec through server reader, patcher constants, launcher schema, fields and labels. packages/ground-sim: readers for the baked .wtonav pack (mesh polygons, cover points, tactical grid) and .pois.json, the trace parser and the names of the logged codes. apps/ai-lab: Vite viewer with a local API that lists nav packs and lab logs and decrypts a chosen .clog with wtotools. It draws the nav mesh, vehicles, barrels and wished turret directions, goals, target links, shots, hits and deaths over a timeline, with per-bot strips for behavior, fire denial and turret reason. Paths live in an untracked lab.local.json. The lab has its own tsconfig and stays out of the root typecheck. Root and launcher typechecks pass; the lab typechecks and replayed two lab battles.
9 lines
257 B
TypeScript
9 lines
257 B
TypeScript
import react from '@vitejs/plugin-react';
|
|
import { defineConfig } from 'vite';
|
|
import { labApi } from './server/lab-api.ts';
|
|
|
|
export default defineConfig({
|
|
plugins: [react(), labApi()],
|
|
server: { host: '127.0.0.1', port: 47180, strictPort: false },
|
|
});
|