Files
EscapistsReintroduced/docs/admin-discovery-setting.md
2026-10-21 16:36:22 +02:00

4.5 KiB
Raw Permalink Blame History

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.

Radio intel progression

Intel → Radio intel configures radioIntelSiteCount (0–20, default 5). Use /esc intel radiosites show|set N|help from the same authenticated command path. Zero disables the requirement. The discovery service snapshots the saved value at round initialization; edits affect the next round. Older settings files receive the default without changing their other values.

Only distinct, prepared, fully identified (Knowledge() == 2) non-radio sites count. Prison, extraction and sites marked RevealOnEscape are excluded. Rough clues and anonymous question marks do not contribute. After all background site preparation finishes, the effective requirement is capped at the available eligible site count. Once unlocked, radio intel stays unlocked for that round. The submenu shows this round's progress separately from the saved requirement.

Ordinary document assignment and recovery exclude radios while locked. An issued ordinary folder already targeting a radio redirects to another unfinished site; its issued evidence identity is updated, but already queued or delivered enemy reports keep their copied contents. With no alternative, the folder remains unspent. Fixed objective documents keep their radio targets and are automatically read from player inventory after unlocking. A team notice explains the wait once per round. Normal exhaustion/cleanup behavior resumes after unlock.

The gate applies only to document targeting. Physical observation, map question marks, radio interaction and radio defence retain their existing rules.

Validation: tests/test_radio_intel.py, settings/menu/feedback regressions and the isolated native mission evidence.