Files
EscapistsReintroduced/docs/generated-sites.md
T

110 lines
6.9 KiB
Markdown

# Generated starts and radio camps
Everon chooses a new prison, radio camp, four mortar sites and optional field
hospitals/camps at preparation time. The supply cache retains its authored position.
The extraction helicopter uses the validated
Everon airfield pad (4800.953 / 11487.412), with no off-airfield fallback. The server
resolves the prison first, then the radio, before creating any site entities.
Joining clients receive the real replicated locations; intel keeps the same
stable destination IDs.
Site authors can use `RandomClear 1` on a prison, radio, mortar, hospital, outpost
or depot definition. `Heading`
sets the authored fallback heading; `RootHeight` offsets a composition above its
surveyed ground (the radio/table composition uses 0.8 m). Runtime placement never
rewrites the configuration file. Existing definitions default to authored sites.
Placement samples the island bounds and rejects water, obstructed footprints,
terrain varying by more than 0.6 m, nearby roads (12 m), and unsafe guard footing.
Prisons avoid physical runway/control-tower anchors by 1,500 m. The radio stays
at least 1 km from the prison and 300 m from other sites. The extraction pickup
must remain inside the prison-relative escape boundary with 100 m clearance.
Sampling yields after an 8 ms work budget, with a 30-second deadline and
12,000 candidate limit per site. The budget is checked between native terrain
queries, so a single engine query can exceed it. Authored fallback positions
must pass the same checks. If both search and fallback fail, an optional outpost,
hospital or depot is omitted for that round and preparation continues. The
`[site skipped]` log identifies its label, ID and attempt count. Removal happens
before spawning, map registration or AI intel assignment, leaving no empty site.
Every following site gets a fresh search budget. Required prison/radio/extraction
and mortar sites remain mandatory. An otherwise optional site also remains
mandatory if removing it would invalidate the scenario, for example by losing
the minimum accessible radio-intel sources. No unsafe placement is accepted.
The existing prison composition, gate, backpack and guards move together.
Player slots and escape-boundary tests use the same rotation. Admission still
waits for physical guards, inventory and the client's nearby replicated scene.
Spawn clearance uses a filled standing-volume trace for scenery and actual
character positions for body spacing, avoiding false overlaps from rotated
entity bounding boxes. Pending reservations remain part of the clearance check.
The radio camp has a radio and table inside a full-size tent, with an antenna
and sandbag cover outside. Its complete guard squad permanently defends a 20 m
area around the radio and cannot be reassigned by virtual HQ. See
[radio camp security](radio-camp-security.md).
It retains the existing contact-extraction-HQ action and defence progression.
Partial intel displays a question mark at the centre of the containing 500 m
square. Exact identification changes it to a site icon at the real location.
The prison is always hidden. Notifications use the original Intel wording.
`/esc killais` is an administrator-only debugging command centred on the
administrator's current living prisoner. It applies lethal damage to AI
characters within 1,000 m in three dimensions, including friendly AI and seated
crews. Player-controlled and retained player-roster bodies are excluded, as are
vehicles and structures. Death callbacks run normally; the command does not
refill AI forces or manufacture HQ reports. `/esc help killais` explains it.
Four mortar sites each have a physical gun, four crew, finite shells and
targeting through the HQ radio-report chain. Sites are at least 1 km apart and
500 m from the prison. See [mortar intel and perimeter guards](mortar-intel-and-prison-map.md).
## Validation
`test_generated_sites.py` executes the actual bounded-search scheduler;
`test_debug_ai.py` executes kill eligibility. Existing player-tool, admission,
prison-slot and intel-feedback tests cover the changed boundaries.
`--project core --smoke generated-sites` opts into real randomized placement and
tests admission, hidden/identified markers, authenticated killais (including a
seated AI), and the radio objective. The `opening-tools` and `airfield-markers` outcomes also use the live site
definitions. Other Workbench smoke outcomes explicitly load
`Configs/ERR/Tests/LegacySites.conf` to retain their historical deterministic
fixtures, including the retired western cache and old extraction position.
Ordinary Workbench play and dedicated servers use the live definitions.
`--project core --smoke optional-site-skip` uses current randomized definitions,
forces camp 5 to fail both random and authored terrain checks, and verifies that
the camp has no runtime, required objectives/mortars remain and a player is
admitted. The failure injection exists only in the opt-in Workbench fixture.
On 2026-09-26, this fixture compiled and completed after camp 5 exhausted 12,000
candidates and failed its fallback. The camp was omitted and player admission
succeeded with prison, radio, extraction and all four mortars retained. The full
repository check passed. The runner reported a terminating-process classification
race at shutdown; independent follow-up confirmed the private prefix idle and
the addon source manifest unchanged. External inputs were unchanged. Existing
loaded asset errors remain; the completed scenario had no script/runtime failures. Evidence,
including the earlier test-selector compile failure, is retained under
`.local/analysis/optional-site-skip-2026-09-26/`. This validates local startup,
not a published or dedicated-server update.
On 2026-09-22, the full `python3 tools/check.py` suite passed. The final native
`generated-sites` fixture passed 39 assertions at a randomized Everon start:
prison at approximately (5100, 9137), heading 89 degrees; radio at (5991, 5659).
It placed twelve physical prisoners inside the rotated prison, verified that
occupied body/wall positions still reject spawning, and checked admission with
stocked backpack, hidden partial-intel markers, exact
discovered coordinates, authenticated AI killing (including a seated passenger),
and the existing radio transmission objective. The runner confirmed unchanged
source inputs and complete process cleanup. Native diagnostics still include
external RHS/WCS localization and stock resource-keyword errors; the fixture had
no script/runtime failure. A captured camp view was inspected for radio/table,
antenna and shelter placement.
Local scripted fixtures do not establish ordinary input, remote-client
replication, or complete multiplayer acceptance. Dedicated-server validation is
still outstanding; this change has not been published or deployed.
The western guarded vehicle/cache site has been removed. The medical stash now
provides the second reachable source of radio intel; mortar logistics uses the
existing eastern outpost. See [airfield and map changes](airfield-extraction-and-map-icons.md).