8.9 KiB
Identified-body escalation and objective defence
Implemented 2026-09-23 in the combined Core addon. These are server-owned mission services; clients do not request spawns or supply casualty counts.
Aggression and hunter UAZs
Only a fresh BODY report delivered to HQ identifies a body for aggression. The identity is the immutable formation SourceId plus original roster slot. A status-known death can subsequently be identified once; multiple observers, repeat deliveries and status reports cannot inflate this counter. Missing or silent units do not count.
ERR_HQWatchRules.Aggression(bodies) is clamp(floor(bodies / 3), 0, 30). Hunters(level) is 3 + ceil(clamp(level, 0, 30) × 12 / 30), capped at 15:
| Identified bodies | Aggression | Cumulative UAZ allowance |
|---|---|---|
| 0–2 | 0 | 3 |
| 3–8 | 1–2 | 4 |
| 9–14 | 3–4 | 5 |
| 45 | 15 | 9 |
| 87–89 | 29 | 15 |
| 90+ | 30 | 15 |
The existing confirmed-loss infantry response budget remains independent. The new allowance creates additional hunter UAZ-PKM vehicles, separate from supply convoys, each with the selected primary enemy faction's driver and gunner. There are at most 15 deployments per round, not an endless replacement pool. Destroyed, captured or failed vehicles consume their deployment; surviving entities and loot remain physical. Surviving AI crew retain their HQ registration and skill profile when a driving task ends; capture releases the mission binding. The status string distinguishes active vehicles from the cumulative allowance.
Deployment waits until the prison is unlocked. Three initial UAZs are planned around the opening player centroid (prison position if no player exists), on actual roads at least 90 degrees apart and at least 600 m from that center. The bounded survey tries up to 64 candidates in four rings (800–2150 m), eight queries per HQ second, and retains three clear positions before spawning at most one vehicle per second. Every spawn rechecks terrain/collision, the force ledger and a 400 m exclusion around every player. Unsafe placement is withheld and logged. Additional aggression deployments use friendly-site roads and 30-second spacing. Native crew readiness has a 30-second deadline. Vehicles are registered only with their actual original native agents and seat occupants. Faction selection, inventory, radio fitting and body/intel ownership use existing mission services.
Each hunter crew requests one physical manpack through the existing finite radio-fitting service; destroyed or looted radios are not replenished. Without delivered sightings, hunters patrol roads between friendly objectives. With fresh actionable HQ memory, they intercept a road near the last reported/predicted position. A fresh delivered contact bypasses the 30-second patrol cooldown and cancels a pending patrol downlink. An interception already in radio transit is allowed to complete; updates are limited to one attempt per five seconds. The destination is a road within 250 m of the delivered belief. Destination selection does not query live player positions. Orders must traverse the existing physical radio network. Loss of communications prevents new orders; it does not magically reveal a player or cancel the last received order.
Objective crews
Radio, supply/medical, extraction and outpost locations have permanent local defence roles. HQ still receives their real reports, but cannot borrow them for searches, couriers, resupply or reinforcement assignments elsewhere. Prison patrols retain their existing release behaviour, and mortar/scout/air-support reservations remain specialized.
Within 600 m of an objective, existing living guards are reused. If no guards remain, the site can receive one finite 3–5-member relief crew per round, preserving the site's original faction. Spawning is deferred within 200 m of players and requires standable terrain. Complete native expansion is required before admission. Its native Defend waypoint uses the actual terrain-height objective position and a 40 m radius. No recurring refill loop is introduced.
The mission currently has a medical supply stash, not a spawned hospital building. This stash participates in objective defence. New objective sites can use the same service by registering their site kind in ERR_ObjectiveDefence.Objective.
Skill, accuracy and perception
Mission-owned hostile military AI use EAISkill.CYLON for maximum skill while the native aim-error node uses the REGULAR random-error distribution. This avoids CYLON's zero-error shooting. Recognition uses the native alerted factor (2.5) even in safe/suppressed states, preserving equipment factors and the engine's visibility/occlusion checks. This does not create through-wall vision or knowledge of unseen players.
The authorized original AI code supplied the scoped skill/equipment and detection-hook approach. The separate aim-error reduction is new: no corresponding independent accuracy hook was found in the inspected original. Native SCR_AIGetAimErrorOffset and SCR_AICombatComponent implementations were used to separate these behaviours.
Actual enemy-detection events activate local native combat and bring forward the next HQ report; report delivery still obeys radio routing. Primary-enemy units share HQ. Other hostile factions receive the same scoped skill/aim policy but do not leak intelligence to a mutually hostile faction. Specialist scouts and flight crews retain their authored equipment. Captured/ineligible actors are excluded from the profile, and normal teardown restores prior skill and native perception.
Audit trail and adjustment
The complete HQ journal is $logs:rereintroduced-hq.log (existing filename retained). Relevant events:
AGGRESSION: delivered body source/slot, distinct-body count, level and allowance.HUNTER SPAWN,READY,WAIT,ORDER,FAILED,RELEASE: why/where each UAZ deployed, base, crew size, radio order and lifecycle.REGISTER,SPAWN MEMBER: group and force identity, faction, prefab, position, members, home and dedicated role.ROLE RESERVED,OBJECTIVE DEFENCE: site assignment, reuse or relief deployment and reassignment restriction.CONTACT LOCAL: observed position, source group and local role; at most one diagnostic per group per ten seconds.SPAWN PURPOSE: links body-inspection teams to their reported-body destination.
SPAWN GROUP also appears in the normal script/console log for mission groups, including non-primary factions. Coordinates are world metres. Changes are event-driven or throttled, not a per-frame unit dump. Existing radio, order, status, search and support journal records remain available.
Verification
Production-method policy tests cover body/status deduplication, three-body thresholds, 30/15 caps, reset, authority/capture boundaries, maximum skill binding/restoration, regular aim-error selection and native perception fallback. The native aggression fixture exercises actual body intake, a physical UAZ with seated crew, radio delivery and movement, objective reservations, medical-stash reinforcement admission and teardown. This is local native Workbench validation, not a dedicated-server multiplayer or full 15-UAZ performance benchmark.
Final local run: /tmp/erri-aggression-native7/logs/logs_2026-09-23_15-01-06. All 14 native assertions and the completion marker passed: full medical defence at terrain height, seated driver/gunner, real radio delivery, driving over 30 m, bounded deployment and surviving-crew profile after release. Source stayed unchanged during the run. The runner reported a transient empty-argv Wine enfMain during cleanup; a subsequent explicit private-prefix idle check passed. Existing external localization/resource messages remain in the native log; this is not a clean-log claim. python tools/check.py passed, and the final hunter lifecycle and affected skill/body/registration policy tests passed separately.
Opening-patrol regressions: test_hunter_opening.py executes the actual geometry and order-selection methods, covering angular separation, insufficient candidates, first-contact preemption, in-flight order preservation, lost radio and retry throttling. test_hq_watch.py checks the three-to-fifteen allowance across all aggression levels.
2026-09-23 opening-patrol validation: /tmp/erri-opening-hunters-native2/logs/logs_2026-09-23_17-32-18 completed all 16 native assertions. Three physical UAZs with seated two-man crews and manpacks were confirmed at mutually separated road starts before any fixture body reports. Three distinct delivered body reports then raised allowance to four. The test observed real HQ radio orders and over 30 m of native driving, preserved objective security, and verified survivor handling. Source/addon fingerprints remained unchanged and cleanup was confirmed. Existing external resource errors remain; multiplayer and an actual patrol sighting through the complete uplink were not tested. First-contact preemption is covered by the production-method regression with radio adapters.