Files
EscapistsReintroduced/docs/chat-integration.md
T
jakub 6a667d8deb Capture current mission, AI, map and administration development
Include the current addon, terrain integrations, tools, regression tests and recorded development evidence.
2026-10-13 22:52:53 +02:00

51 lines
7.1 KiB
Markdown

# Mission-owned chat and administration
Chat administration now belongs to Core. Loading the Core mission gives `/esc`, the native administration dialog, player tools, settings and authenticated private replies. AI and Intel register their own command providers when present; Core never imports their types. The existing Chat project remains a full-scenario/development wrapper with its previous identity, but is no longer required to enable administration.
## Class boundaries
| Owner | Responsibility |
| --- | --- |
| `ERR_ChatClient` | Local command registration, mission scope and stale-reply rejection |
| `ERR_PlayerAdminCommands` | Thin Enfusion player-owned RPC bridge |
| `ERR_AdminSession` | Server authorization, per-controller throttles, journal cursors/feed and lifecycle cleanup |
| `ERR_AdminService` / `ERR_AdminProvider` | Command dispatch, help, settings aliases and optional capabilities |
| `ERR_AdminMenu` / `ERR_AdminMenuFields` | Native dialog, editable drafts, saved values and journal presentation |
| `ERR_AdminPlayerTools` / `ERR_AdminGrantState` | Current-body god mode and bounded vanilla inventory grants; pending insertions survive authorization-session replacement |
| `ERR_HQAdminProvider` / `ERR_IntelAdminProvider` | Companion-owned commands and HQ journal access |
The controller adapter retains only ownership-sensitive transport state. Mission changes require a new client scope; rotating tokens inside one mission cannot reset throttles or pending inventory work. Every request and live poll rechecks server-side administration. Replies, snapshots and log pages target only the controller owner. Body changes, revoked access, mission stop and controller deletion restore the prior damage state and stop player-tool work.
## Commands and menu
`/esc menu` opens settings, HQ/status and journal pages. The ten menu fields are represented; Stinger and automatic convoy startup use chat commands. Absent companion controls are disabled. Saved values refresh independently of drafts. Actions disable after six seconds without a server snapshot. Escape leaves native text editing before navigating back or closing. The journal retains up to 300 received records, supports pause/resume/latest, follows new entries only at the bottom, and receives explicit server history-gap notices.
- `/esc status`, `/esc settings`, `/esc help [topic]`
- `/esc mission radio show|set N`, date/weather/time/speed controls, and `/esc mission abandon`
- `/esc time show|set HH:MM` compatibility alias; successor time/date/weather changes apply next round
- `/esc intel show`, carrying/chance/reveal settings, `/esc intel reroll [show]` when Intel is loaded
- `/esc hq show`, interval/squads/radius settings when AI is loaded
- `/esc hq stinger show|set N|set random`; `/esc hq convoy show|start`; `/esc hq convoy auto show|set 0|1|help` (automatic startup changes apply next round)
- `/esc hq log show|next`, `/esc hq log set on|off`; menu and chat-feed cursors are independent
- `/esc god show|set on|off`, `/esc god`, `/esc ungod`
- `/esc cheat map|helmet|uniform`: vanilla paper map, PASGT helmet or BDU jacket, deposited into the requesting admin's inventory
- `/esc spectate next|previous` remains a local spectator command without admin requirements
God mode prevents subsequent damage to the current body; it does not import the old periodic healing loop. Turning it off restores the prior native damage-handling flag. Item grants await native completion, reject overlapping requests, and stop further grants for that body if an accepted operation times out. Pending and timed-out insertions remain guarded if admin access is revoked and restored on the same body. They never replace worn equipment or target another player.
Original helicopter timer/test and alternate-start commands describe systems not yet implemented in this successor. They return explicit unavailable responses and do not expose ineffective menu controls. Patched clothing, simulation diagnostics and original-mod hooks are not imported. This is integration of applicable administration, not a claim that those deferred gameplay systems now exist.
## Resources and validation
Core explicitly registers both the vanilla menu list and its new `Configs/ERR/AdminMenus.conf` in project settings. The successor menu and layout have new GUIDs. All referenced vanilla menu/widget/font/helmet identities were checked against the installed resource database. Source/packed validators accept only this specific menu configuration while preserving identity and dependency checks; frozen minimal project files remain accepted.
Focused regressions cover service/provider dispatch, Core-only capabilities, authorization, anti-replay and rate limits, god-state restoration, native-inventory callback guards, menu command routing/draft policy and resource/layout structure. The [Core native run](evidence/native-2026-09-19-232402-core-admin/report.json) passed 316 assertions and one scripted escape round with zero captured errors, including actual owner RPCs, menu opening/reopening, setting Apply, preserved drafts, capability snapshots and damage-state restoration. The [full-scenario run](evidence/native-2026-09-19-232959-full-admin/report.json) passed two scripted escape/restart rounds and 202 assertions with zero captured errors; each round also exercised HQ/Intel capability detection and live journal delivery. The [grant-state correction run](evidence/native-2026-09-19-233559-admin-lifecycle/report.json) passed another 101 assertions and one full round with zero captured errors. A private window capture then exposed a blank journal text area despite successful transport; the subsequent layout and initial-scroll corrections have separate final validation below. Real remote-client authorization, inventory contention and ordinary mouse/keyboard usability remain multiplayer/playtest work.
The existing frozen `.build/playtest-2026-09-19` packages have not been rebuilt by this source integration. Original mods and missions remain unchanged; native checks use the private muted display.
Final validation: [native full-scenario regression](evidence/native-2026-09-19-234618-chat-complete/report.json) passes 101 assertions and one escape round with no captured errors, unchanged source and confirmed cleanup. The journal has visible wrapped text exceeding its viewport and reaches the native scrollbar end after layout resolves. [Private display screenshots](evidence/admin-ui-2026-09-19-234224/review.json) show settings, HQ and journal pages at the preceding rendering checkpoint. Complete repository checks pass, including the final menu regression.
The subsequent [20 September playtest refresh](playtest-build.md) packages this implementation and passes Core/full ordinary packaged startup. The earlier September19 handoff remains unchanged.
The 20 September result-feedback correction subscribes an open defeat screen to the current mission's replicated end reason and detaches that listener on close or content replacement. A late admin-abandon explanation now replaces the initial generic fallback. Actual callback/lifecycle regressions and the full-addon native compile pass; remote-client arrival ordering remains a multiplayer test.