RIM-116 & Phalanx
Building an air defence that runs itself
A launcher and a gun that search, classify, lead, fire and reload on their own – plus a fire-control radar, a warning receiver in every cockpit, countermeasures that actually work and a damage model you can shoot apart piece by piece. These pages explain how such a system is built in Arma Reforger.
How to read these pages
Every page is one problem that took a while to get right: what goes wrong with the obvious approach, the
technique that works instead, and a short example. The examples are written for this documentation –
simplified, with neutral names (MyAD_) and example values. They show the technique, not the source of
the mod.
Radar coverage
One radar supplies many mounts. Terrain blocks it, low flyers vanish in ground clutter, and a shot-out radar drops every mount to an emergency mode.
Radar warning receiver
Three warning stages in the cockpit – and the search ping needs no network traffic at all.
Target acquisition
World queries instead of projectile hooks, and why a bench seat counts as an aircraft.
Fire control
The intercept equation, and accuracy levels that are a real hit probability.
Missile guidance
Script-driven flight, an infrared endgame, a proximity fuze – and a miss report you can act on.
Chaff and flares
Reacting to another mod's countermeasures without depending on it.
Battery coordination
Several mounts sharing targets in rounds, with a cap per target.
Damage model
Assemblies that fail one by one, driven by where the round actually landed.
The gun variant
A fast-firing gun as a subclass, and one visible projectile standing for many rounds.
Replication pitfalls
Durations instead of deadlines, who may send an Rpc, and other things that fail silently.
The shape of it
Three kinds of entity, and they only know each other through static registries. Separately placed world entities
have no runtime relationship – GetChildren() on a neighbour returns null – so every mount and
every radar registers itself on initialisation.
Rules that held up
| Rule | Why |
|---|---|
| Measure, do not guess | Nearly every number started as a guess that turned out wrong. A decoy search radius that was too small made flares useless – the log showed the hit landing within a hundred milliseconds of the decoy being seen. |
| Inherit rather than copy | A second weapon type is a subclass of the first. Target acquisition, factions, supply, damage, lamps and radar coverage then exist once. |
| Name the thing after what it does | Accuracy is not 0.65, it is LUCKY_LUKE. Picking a level means picking a hit probability, and the name makes that concrete. |
| Write down the failed attempt | A comment that says what was tried and why it failed stops the next person repeating it. |