Files
EscapistsReintroduced/docs/road-interception.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

260 lines
20 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Temporary infantry road interception
The HQ can refine one ordinary INTERCEPT destination to a nearby authored road using delivered movement history. This is a temporary infantry position, not a barricade or the original vehicle-and-mine roadblock system. It creates no actors, vehicles, props or ammunition.
Eligibility requires a delivered sighting with at least two samples, a credible horizontal heading of at least 2 m/s, confidence at least 0.65, uncertainty at most 150 m, and observation age at most 45 seconds. Character reports on foot or in a vehicle and separate vehicle-entity sightings qualify; aircraft do not. The helper reads belief scalars and authored road/terrain geometry, never current player or target entities. A refused refinement becomes the existing SEARCH behavior; CONTAIN and missing-patrol objectives retain their existing behavior.
The selected point lies on an actual road segment at least 4 m wide, 40–250 m ahead of the predicted belief position with forward dot product at least 0.8, within 100 m of the existing pursuit objective, and at least 80 m from other active or pending task destinations. The planner permits at most two lookups per existing five-second planning pass. Each lookup uses a 200 × 200 m road-query box, rejects more than 128 returned roads, processes only returned polylines with at most 1,024 points and at most 4,096 segments in total, rejects grounding more than 2 m below or above the authored road segment, and performs one final native terrain/water/filled-body clearance check. It selects the nearest eligible projection first; if blocked, it conservatively falls back to search rather than repeatedly surveying alternative positions.
Existing finite-force eligibility, home guards, ammo knowledge, travel-time scoring and radio downlink reservations select an available physical infantry group. The pending task counts toward existing assignment limits. Delivery revalidates the exact belief revision and precision age before installing the vanilla Defend waypoint. A failed or interrupted delivery preserves the previous task. The position has an absolute lifetime of estimated walking time (distance / 3 m/s) plus a three-minute hold, bounded to 180–900 seconds after queueing. Radio delay still consumes this budget. The source sighting must still pass the original freshness checks when the order is selected and delivered; a longer hold does not refresh enemy knowledge. Existing cleanup removes only the owned waypoint and restores the ledger home duty/position, allowing retained patrol waypoints to resume. A road hold never supplies a negative area-search report merely because the squad waits there.
Policy tests execute the real helper and delivery/release methods with explicit native boundary doubles: geometry, query bounds, stale/doubtful beliefs, occupied destinations, blocked terrain, failed waypoint creation, exact expiry, retained old orders and replay are covered. The [native113607 run](evidence/native-2026-09-20-113607-road-interception-raw/README.md) compiled the integration and completed one round/101 assertions with zero script/runtime failures. The first arranged private-memory trajectory selected a real Everon road point; independent native segment membership, clearance and stale46-second rejection passed. This does not establish natural target detection, infantry arrival, combat effectiveness or multiplayer. Four external localization errors remain. The runner also failed its one-shot cleanup proof during an exiting process; a later independent read-only check found that PID absent, the private prefix idle and source bytes equal to the launch manifest. Original failure/raw logs are retained separately, without retroactively qualifying cleanup.
## Provenance
The owner-authorized `escapists-ai/Scripts/Game/EscapistsAI/EAI_HQRoadblocks.c` supplied behavioral ideas: recent delivered direction, minimum movement speed, forward-sector choice and a staffed defend position. The successor geometry and lifecycle integration are independently implemented over existing successor HQ contracts. The original assembly/spawning, protected group-lookup hooks, vehicles, mines and distant spawn rules were not copied or migrated. No protected original Escapists/ScrtCore source was read for this slice.
The existing successor resource `{93291E72AC23930F}Prefabs/AI/Waypoints/AIWaypoint_Defend.et` is vanilla, already catalogued. Its default `m_bFastInit` is false; the implementation does not enable native placement/fast initialization. Vanilla references were read to verify road APIs and waypoint behavior.
Reference SHA-256 values:
- `/home/jakub/devel/escapists/escapists-ai/Scripts/Game/EscapistsAI/EAI_HQRoadblocks.c`: `128776f0b448162ee36cfc71b2a38d2cd06d6d6e4679253f215896aa3fcabb98`
- `/tmp/erri-vanilla/scripts/Game/generated/RoadNetwork/BaseRoad.c`: `b2e5ac1047173f6eb3b4fdbdbfd23e1ce6516f1fe1bbbcb23d8d8ab92abccbc7`
- `/tmp/erri-vanilla/Prefabs/AI/Waypoints/AIWaypoint_Defend.et`: `af7fc17d89c30845acf0ef0fa5fedb47120072221c6157cd4ee691c121ae5d03`
- `/tmp/erri-vanilla/scripts/Game/AI/Group/SCR_DefendWaypoint.c`: `92177151f882a1157014a8604d3cba3ca5493289a54b7bdd1a77fa259b4caddd`
## Finite engineer mines — 1 October 2026
A squad holding an already delivered road-interception post may now send one
original soldier to place one PMN4 that soldier actually carries. The ordinary
finite loadout setting controls availability; this controller creates no mine,
replacement soldier or extra response. HQ remains the coordinator. A pending
replacement order, expired task, combat, capture, injury or lost original
ownership cancels placement.
The engineer follows an individual native move to a selected flank point 25–60m
from the unchanged defended post, at least fifteen metres from nearby road
centerlines and outside named-settlement exclusions. The soldier remains nearby
and quiet for ten continuous seconds, then submits one callback-tracked inventory removal. Only success plus
exact loose-item custody nearby permits placement. The soldier withdraws toward
the post. Native pressure arming requires the same task, actor and item, a
stationary placed mine, at least twenty metres of engineer separation and no
living friendly or unknown-affiliation character/vehicle within twenty metres.
The original task expiry or an absolute 180-second job deadline stops unfinished
work. Cancellation never arms, deletes or replenishes a loose item; an armed
mine retains vanilla behavior and world lifetime.
HQ admits at most one new site query/job per tick, two simultaneous jobs and
32 retained jobs per round. Each genuinely newer, sufficiently separated delivered
post may consume one attempt, with at most four attempts per original force and
32 across the mission. A shared exact-item ledger prevents another squad retrying
a transferred or uncertain item. Stopped jobs retain callback records through
round teardown even if their original squad disappears. Site selection examines bounded actual road segments,
never a straight line across bends, and applies existing water, obstruction and
road-height checks. There is no semantic bridge-tag API claim.
Actual-method regressions execute the controller, HQ admission/teardown and road
geometry with native boundaries represented by test doubles. They cover delayed
and conflicting callbacks, interrupted preparation, displaced/destroyed mines,
changed actors/tasks/rosters, refusal, clearance and retained-job limits. These
checks do not prove native walking, placement animation, pressure activation or
remote replication. Physical placement, arming, ordinary encounters and
multiplayer remain unqualified. [Finite mine resupply](infantry-resupply.md) is
implemented. Finite reuse at a newer delivered post is described below; physical
repeated placement remains unqualified and complete original roadblock parity
remains unfinished. Historical player mine warnings are implemented in source as
described below.
The [final integrated normal route](evidence/native-2026-10-01-engineer-mines-final/report.json)
compiles the new classes and completes 63 scripted assertions through victory and
results, with zero script/runtime failures and thirteen retained installed-resource
errors. It does not exercise mine placement. All 260 repository programs pass;
[review and limits](evidence/engineer-mines-2026-10-01/review.json) retain the initial
route, final per-tick pacing run and adversarial actual-method checks. Packaged
handoffs predating this source addition remain unchanged.
The [dependency-review follow-up](evidence/dependency-review-2026-10-01/review.json)
also makes observed foreign item custody terminal during the pending/acknowledged
drop phase. The same mine cannot be reaccepted after a nearby redrop; original
actor inventory settling remains allowed. Actual-method tests cover both entity
parents and inventory-only parent slots, pending and completed callbacks, and
late completion after cancellation. A pickup/redrop entirely between ticks is
not observed by this guard. The [fresh integrated route](evidence/native-2026-10-01-dependency-review/report.json)
compiles and completes 63 assertions, but still does not qualify physical mine
placement or arming.
## Finite reuse at newer delivered posts — 3 October 2026
An original force can consume one mine attempt at each genuinely newer delivered
road post, up to four attempts for that exact original force and 32 for the
mission. The mission-owned ledger survives assignment release, unit replacement
and re-registration. Each new post must be more than 160 m horizontally from
**every** previously consumed mission post, including another squad's post and
an attempt that found no usable site or mine. Same-post repeated laying is not
included. Refused site selection, missing inventory and native refusal consume
the post allowance; later stock arrival or permission changes cannot reopen it.
Admission requires the actual current delivered task and assignment, a strictly
newer queued time and observation time, a different report identity, and a newer
revision when continuing the same belief. Consumed entries retain exact original
force/group/source and task/assignment identities together with copied message,
belief, revision, time and post values. Retransmission or replacing a registration
cannot reset those values or acquire fresh quota. A pending replacement order,
combat, logistics claim or expired task continues to exclude new work.
An active job for that original force blocks another post. After cancellation,
a pending native removal callback still blocks while the exact mine entity
survives, including a destroyed but still existing item. A terminal callback or
exact entity deletion settles that stopped job; it cannot arm, resume movement,
retry removal or refund an attempt. The shared exact-item tombstone remains
spent, independently of the post ledger and any later finite resupply.
Every selected mine position is retained even after refusal, cancellation,
destruction or loss of the entity reference. Before actor selection, a new job
copies at most 32 finite prior selected positions. Both straight horizontal
corridors, from the original actor to the selected site and from that site back
to the pinned post, must remain strictly more than 20 m from each prior site.
During execution, the actor and selected site must remain within the pinned
60 m horizontal work area; the actor, site and post must remain more than 20 m
from prior sites. A breach cancels only the owned action. The native group
`IsPositionAllowed` check remains authoritative, without widening its defend
radius or searching again after refusal.
These are bounded admission and sampled-position constraints. Straight corridors
and separated work areas do not prove that native navigation follows those lines,
stays inside the work area between checks or avoids every mine. Ordinary squad
travel to the new post is unchanged. All 300 registered regression programs pass, including actual ledger, HQ and
controller checks and a reproduced prior second-post failure. One hidden/muted
normal Everon run compiles and completes 63 assertions and one round, with one
recurring zero-radius script error and fourteen engine-error entries. Those
entries include the same script error plus thirteen installed-resource errors.
The exact caller remains unknown; strict failure is retained and no extra run
was used to chase a clean result. Cleanup and input
preservation are confirmed. An initial field/type name collision and its failed
compile are retained separately; the corrected source was retested. Physical repetition at two separate delivered posts,
including the second original mine's placement and arming, remains unqualified.
[Implementation, evidence and limits](evidence/engineer-posts-2026-10-03/review.json).
## Mine placement exclusions — 3 October 2026
The earlier centerline selector omitted the owned predecessor's fifteen-metre
road and two-hundred-metre settlement exclusions. Selection now considers both
flanks of actual road segments. Every retained candidate must remain 25–60m
from the delivered post, at least 15 m from **all** cached road centerlines,
including narrow tracks and crossing roads, and outside the existing 200 m named
city/town/village/settlement exclusion. Fifteen metres refers to centerlines,
not the edges of an arbitrarily wide carriageway. Candidate generation does not
read player positions or create orders, troops or mines.
A single 160 m wide road-query box covers the 60 m post band plus 15 m exclusion and a 5 m
margin. Bounds remain 128 roads, 1024 points per road, 4096 total segments and 128
nearest candidates, with at most 65,536 cached clearance comparisons. An
incomplete or malformed hazard inventory cannot authorize a site. Failed
candidates can fall back to another retained flank; water, slope, bridge-height
and obstruction checks remain. Native queries stay bounded and no FPS improvement
is claimed. Original item custody, finite attempts, task expiry, withdrawal and
friendly-clearance arming are unchanged.
The prior actual selector fails the new road-distance regression; corrected
source passes all 297 registered programs and five deliberate negative controls.
The [normal native escape](evidence/native-2026-10-03-mine-flanks-normal/report.json)
compiles and completes 63 assertions/one round, but records one zero-radius
`RandomGenerator::GenerateRandomPointInRadius` script error alongside thirteen
installed-resource errors. The exact caller is unknown; no stack or actor identity
connects it to this change. The failed strict result is preserved. It does **not** exercise physical engineer
placement or arming. [Source review, exact hashes and limits](evidence/mine-flanks-2026-10-03/review.json).
## Recovered mine warnings
A successful native arming can annotate an original generic intel folder that
was already carried by the engineer when the job began and is still carried
and unspent at arming. No document is created. Objective documents are excluded;
the generic folder retains its original site clue. A transferred, spent or later
issued folder cannot acquire this warning. The record stores a frozen 500 m cell,
not a live mine tracker.
Recovering the exact folder through ordinary player inventory discovery reveals
“Reported mine area (500 m); may still be active” on the field map. The warning
remains historical even if the mine is moved, destroyed or disarmed. It does not
claim that the area is clear. Unknown records stay server-local; only recovered
coarse cells enter replicated state. The service retains at most 32 records,
128 exact folder bindings and 16 admission-time folders per engineer. It never
spends an objective document or replaces a site clue. A mine-only disclosure
still spends the generic folder normally and suppresses the contradictory
exhausted-intel message.
Actual-method tests cover custody, duplicate/cap/refusal paths, frozen positions,
normal discovery integration, join-time marker reconstruction with native doubles,
manager replacement, list shrinkage and Stop/destructor cleanup. All 262
repository programs pass. The integrated normal route compiles and completes
63 scripted checks; **native mine placement/arming, warning rendering and real
remote/JIP delivery remain unqualified**. [Evidence](evidence/mine-intel-2026-10-01/review.json).
## Engineer movement permission — 3 October 2026
The selected mine site must also pass the original group's current native
`IsPositionAllowed` check before dispatch and throughout placement/withdrawal.
A missing utility or a newly denied position cancels the owned action through
the existing controller; it does not refund the attempt, move or replace an item,
restart on a later permission change, or activate a late removal callback.
This check enforces the current defend waypoint's strict **three-dimensional**
completion radius, or the native autonomous-distance limit for other waypoints.
The default defend radius is 30 m: the 25–60 m geometric candidate band therefore
only admits points at least 25 m away and strictly inside that 30 m native sphere.
It does not prove path reachability. No radius widening or repeated candidate
selection was added; a refused site still spends the consumed post attempt,
while initial permission refusal leaves the exact mine unquarantined in inventory.
The full 299-program suite passes. Actual controller tests cover admission,
three-dimensional boundaries, all four active phases, changed/missing/replaced
utilities, exact action cleanup and inert late callbacks. A normal hidden/muted
escape run compiles and completes 63 assertions with zero script errors and
thirteen retained resource errors. It does not exercise native mining or multiplayer.
[Evidence and limits](evidence/engineer-movement-2026-10-03/review.json).
## Recovery and road-order repair — 3 October 2026
The RKS #2 investigation found no delivered road posts in the checked rounds. The
selector wrongly excluded the `vehicle` observation label, and the 60-second
order lifetime included travel, leaving little or no time for arrival and mine
placement. Both are corrected. Delivered road-post defend waypoints also receive a 70 m
native movement radius: the stock 30 m radius rejected engineer sites selected
25–60 m from the post. The engineer retains its separate 60 m work-area limit
and all original custody, combat and friendly-clearance gates. Ordinary guard
and site-security waypoints retain their existing radii. Mine admission logs unsafe-site and unavailable
soldier/item refusals; active jobs log combat, ownership, expiry and inventory
removal failures. Full physical barricade construction remains unimplemented.
Body recovery first reuses its own prepared teams, then seeks idle physical
infantry with a fresh delivered status and a working radio route within 5 km.
Guards, mounted squads, combatants, already assigned/reserved squads and teams
that failed this body's navigation are excluded. Successful selection still
requires delivery of the body-search order and physical inspection.
A recovery group that never spawned a member can retry preparation twice, with
a 60-second backoff and the old native spawn intent cancelled. Empty failures
return their team allowance; any group that ever had a soldier stays charged,
even after losses. At most eight real/pending spawned teams and 32 group spawn
requests are allowed per round, with the existing two-concurrent-job cap. New
spawn diagnostics include navigation tile state and faction AI limits.
The original empty RHS-group failure did not reproduce in an isolated native
instance at the logged position; the live cause remains unproven. These changes
provide an existing-force fallback and bounded recovery rather than bypassing
the engine's spawn budget.
Final controlled native validation completed with zero script errors. An existing
physical infantry group was selected for recovery without spawning another team.
An engineer walked to a site, removed its carried PMN4 through native inventory,
withdrew and activated the trigger after friendly clearance. The fixture arranged
a delivered road-post context and moved other nearby fixture soldiers away; it
did not bypass the production arming check. Pressure detonation, natural encounter
frequency and multiplayer remain unqualified. Thirteen focused regression scripts
passed. Evidence and source hashes are in
[the October 3 review](evidence/roadblocks-body-recovery-2026-10-03/review.json).