Files
EscapistsReintroduced/docs/mortar-rapid-fire.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

8.0 KiB
Raw Blame History

Rapid mortar barrage — 27 September 2026

An authorized HQ fire mission retains eight HE rounds. Unobserved fire distributes them over an 80-metre radius; the observed-fire correction described below tightens subsequent fire. Mission-owned AI mortar crews use a dedicated behavior tree with the two fixed 1.5-second firing-loop delays removed. The native loading animation, physical projectile event, ammunition transfer, per-round ballistic solve and spread still determine the real firing rate. The 0.75-second settling pause after leaving the aiming seat is retained.

The tree is derived from the installed Arma Reforger 1.8.0.13 AI/BehaviorTrees/Chimera/Soldier/StaticArtilleryBehavior.bt. Only its resource identity and the two delay values differ. It is selected only for a mortar registered with the mission mortar service; unrelated artillery keeps its stock tree. Player firing actions are unchanged.

The existing shooting-cycle gate waits for an actual projectile before advancing the native shot counter. Removing a fixed delay does not replace that event, create ammunition, skip the loading animation, or manufacture explosions. The final transfer still checks the delivered report, current ballistic aim, friendly exclusions, mission state and eight-round limit. Orders retain their finite ammunition, report freshness, cooldown and helicopter airspace coordination.

The old salvo fixture now unlocks the prison through the normal mission API before waiting for crew readiness. Previously it stayed in the prison phase while HQ was paused. The fixture moves its player to the distant airfield after unlocking, keeping the participant away from the crew while testing the synthetic range target. It also stops automatic UAZ responders before unlocking: the first live rapid-fire trial correctly withheld fire when those vehicles pursued its synthetic report into the impact area. This arrangement is restricted to the opt-in Workbench fixture; production friendly-fire checks are unchanged.

The unchanged single-report baseline fired once and then correctly expired its target report. The first unobstructed rapid-fire run fired seven actual rounds, then correctly withheld the eighth because the older refresh fixture stopped generating sightings halfway through a salvo. That fixture now continues observations until six rounds have fired, leaving two rounds for the final downlink to arrive; its existing 90-second update bound remains. Freshness and the production order deadline are not relaxed. The fixture also waits within its existing deadline when normal crew/status traffic occupies the radio: a zero queue result creates no observation and no longer fails the test immediately.

A further run refused a radio update because the original native aim owner was no longer available, amid nearby combat involving the released test player. The test player is now placed away from the battery; the production rejection remains intact.

The unobstructed eight-round run exposed a completion race after the fixed waits were removed: the native eighth-shot callback completed the activity, but the zero-delay repeater began a ninth aim before HQ observed the completion event. Its normal eight-round guard then marked the already-completed barrage rejected. The shooting-cycle node now returns RUNNING after superclass processing of the last confirmed shot, waiting for normal HQ cleanup. Repeated ticks cannot increment the native counter again. An executable regression covers eight physical events, pending supply, exactly one completion, no ninth aiming request and unchanged unrelated artillery behavior.

Final native run passed all 57 assertions with eight distinct physical projectiles and eight matching commits. The original stock decreased from 27 to 19 shells; the native activity completed naturally and the 25-second replay watch observed no extra projectile or replenishment. Launch intervals measured from mission journal time were 5.1, 4.9, 4.9, 5.9, 6.0, 6.0, 6.1 seconds (5.557 seconds on average; 38.9 seconds from first to eighth launch). This is one isolated firing-range result, not a guaranteed cadence under combat or server load. Initial order delivery and barrel setup occur before the first shot.

The runner recorded smoke-completed, source/dependency hashes unchanged, and cleanup confirmed. The generic report still returns nonzero for the same 13 installed dependency/prefab errors seen in the stock baseline; it reports no script/runtime failures or new engine errors. All repository checks passed, including the executable last-shot regression. Removing just the completion wait makes that regression fail.

These results qualify local native Workbench launch behavior and ammunition accounting. Multiplayer replication, actual impact positions and damage are not measured by this fixture. Evidence: .local/analysis/mortar-cadence-2026-09-27/.

Observed fire correction (2026-10-11)

Mission-owned AI projectiles are tracked by identity until the engine's actual explosion callback. A registered enemy soldier may spot the splash if their own native perception currently sees the target, they are within 600 m of the splash, the splash is within 200 m of that sighting, and a separate unobstructed ray confirms a view of the splash in the same viewing sector. Guards, support crews and mounted soldiers are eligible; a designated observer class is not required. Missing explosions, target memory alone and predicted impact positions cannot authorize corrections.

The report records approximate left/right and short/long error in five-metre increments relative to the battery's firing direction. It travels through the existing squad radio uplink and an HQ-to-battery downlink. Broken routes discard it. After delivery, the next new native aim uses the latest delivered target observation and an eight-metre spread disk, with a horizontal ballistic calibration capped at 60 m. The calibration compares the commanded point with the actual splash, so intentional spread and player movement are not counted as systematic aiming error. Earlier calibration is not accumulated twice. Older shells landing later cannot overwrite a newer fired shell's correction.

Splash sightings enter the ordinary HQ observation history only after their uplink arrives. The correction then carries a coherent fire-support snapshot (position, observation time and estimated velocity) through its downlink. This avoids replacing moving-target intelligence with a position-only report from an ordinary soldier. Existing prediction leads an observed moving target by report age plus shell flight/setup time; conflicting or insufficient movement history leaves velocity unknown rather than reading the player’s live transform.

An existing barrel command or committed shell is unchanged. Revalidation preserves that command's original offset. Fresh target reports, finite ammunition, original salvo limits, settlement/friendly exclusion and airspace coordination still gate every round. Calibration expires 45 seconds after the observation and does not follow a different target or a gun moved more than two metres.

Work is bounded: 64 tracked shells, 32 correction reports, one splash survey per HQ tick, at most 32 groups and eight splash rays per survey, and a five-second splash observation window. The journal distinguishes SPLASH, MORTAR SPOT, SPOT RECEIVED, SPOT ADOPTED, SPOT LOST and SPOT UNOBSERVED. This implementation routes correction data; it adds no new synthesized voice line.

Validation: test_mortar_spotting.py executes the production correction, delivery, selection and adoption methods against API doubles, covering sign, repeated calibration, out-of-order impacts, stale/failed delivery, moved guns, changed targets, existing aim/commit protection and bounded cleanup. Existing mortar policy regressions pass. Hidden Reforger 1.8.0.13 Workbench compilation passed (err-mortar-motion-20261011-b, Game CRC 13c3e0fb). Actual explosion-to-observer-to-adjusted-impact behavior still needs a live mission check; the earlier launch-cadence evidence does not qualify this new impact feedback.