Files
EscapistsReintroduced/docs/admin-discovery-setting.md

24 lines
2.8 KiB
Markdown

# Core document discovery setting
The physical document discovery service belongs to Core. Its existing `intelRevealChancePercent` setting is now configurable in Core-only games through the same administrator-only command used by the companion Chat addon:
| Command | Result |
| --- | --- |
| `/esc intel reveal show` | Display the current saved percentage |
| `/esc intel reveal set N` | Save a whole number from 0 to 100 |
| `/esc intel reveal help` | Explain the range, document rules and when changes apply |
The first recovered document identifies its destination exactly with the configured percentage chance. Otherwise it provides a rough location. A second eligible document for the same location always identifies it. Setting 0 therefore still permits progression through the two independent two-document caches; setting 100 identifies the destination on the first document. A change affects newly recovered documents immediately. Existing knowledge and documents already counted by discovery are not reset or reprocessed.
The server retains the existing authentication, rate limit and command-length checks. Malformed values, out-of-range values and failed saves preserve the previous setting. Existing show and successful-set reply formats remain unchanged. Invalid discovery values now include the valid range and progression explanation. Other settings and time/abandon commands keep their existing behavior.
Chat delegates the reveal alias to Core instead of defining a duplicate. Its `intel carrying` and HQ commands remain companion-specific. This does not expose administration to ordinary players or add a new RPC.
## Validation
`tests/test_admin_setting_policy.py` executes the actual Core alias mapping, strict integer parser and settings range predicates through the source-local C++ harness. It checks percentage endpoints, malformed numeric text, radio-duration boundaries, unknown aliases and companion-only exclusions. `python3 tools/check.py` includes it.
`ERR_NativeAdminSettingsProbe.Run(ERR_GameMode mode)` is an opt-in WORKBENCH test awaiting central native execution. It checks actual authorized read/help dispatch and unauthorized/invalid mutation rejection. Valid changes exercise the same production setting-command handler with a separate `ERR_Settings` instance at `$profile:erri-native-admin-settings-probe.json`; they never mutate the active mission's settings. The fixture rejects already-existing fixture files, verifies native save/reload and unrelated values, then removes only its own fixture primary, backup and temporary files.
A policy pass does not prove native script compilation, remote RPC ownership or readable chat presentation. Run the native probe inside Core-only and companion regression fixtures, then retain real-client administration in multiplayer acceptance.