Skip to content

What is Medusa?

Medusa is an Integrated Air Defense System (IADS) engine for DCS World. It coordinates sensors, SAM batteries, point defense, and command hierarchy across your mission - driven by configurable doctrine.

Medusa was built out of frustration with the existing options.

Our group ran large campaign missions with dense air defense networks. The popular IADS script we were using relied on a framework that crushed server performance at scale. Every tick it checked every SAM against every contact - O(n*m) - and it showed. Microstuttering, rubberbanding, desync so bad people couldn’t even tank. And it got worse as the campaign progressed and more units spawned in.

We ended up replacing the framework with a shim that provided the functionality the IADS script actually called without loading the full framework. That fixed most of the performance problems. But it didn’t fix how predictable the IADS was, or how annoying it was to write Lua scripts just to configure it.

Despite all of this, I wouldn’t play DCS World without IADS simulation in some form - it would be boring without it. I wanted to feel like there was a ghost in the machine trying its best to survive and inflict as much damage as possible.

Over time, the pilots of the 93rd TFS Outriders flying SEAD missions learned how to exploit the simple state machines driving the IADS. Once you figured out the pattern - when radars cycled, how shutdown timers worked, what triggered reactivation, the exact range a SAM would turn on - you could game it reliably. The IADS stopped being a threat and started being a puzzle with a known solution.

Medusa was written from scratch to be highly performant and to provide as many configuration levers as mission makers could desire, while providing reliable but non-deterministic behavior that players can’t just memorize and exploit.

Performance - Medusa caches expensive DCS API results (sensor capabilities, weapon envelopes) at init rather than querying every tick. Sensor polling is budgeted and round-robin’d so only a few sensors are polled per tick. Range queries use a spatial index instead of iterating every battery. The result is a script that stays lightweight even with dozens of batteries and hundreds of tracks.

Engagement quality - Instead of binary “in range or not” decisions, Medusa computes a kill probability (Pk) for every battery-track pair using range, aspect, and altitude factors. Only the batteries with the best shot go hot, keeping the rest of the network dark and unexposed. For example, a SAM will turn on earlier for a hot-aspect fighter heading straight at it, but stay cold for a fighter beaming at long range - a shot other IADS scripts would take and expose the battery for nothing.

75km0.810.81
KILL PROBABILITY
80.8%
HOT
RANGE100%ASPECT100%
ASPECT0° HOT
TRACK DISTANCE30.0 km
BEARING50°
SAM MAX RANGE75 km
TRACK DISTANCE30 km
SAM MIN RANGE5 km
BEARING FROM SAM50°
TRACK HEADING230°
Pk = 0.81 × pkRange(split gaussian) × pkAspect(u-shape, beam floor=0.3) × pkAlt(taper=500m)

The visualiser above uses a simplified version of Medusa’s actual Pk model. The composite kill probability is pkMax × pkRange × pkAspect × pkAlt where range uses a split Gaussian peaking at optimal engagement distance, aspect uses a U-shaped curve where beam crossings are hardest to engage, and altitude tapers linearly at the edges of the engagement envelope. Try selecting different SAM presets and dragging the sliders to see how each factor contributes.

HARM defense - Other scripts detect ARMs either by matching weapon type strings against a hardcoded list, or by simple speed thresholds. Medusa uses kinematic scoring - velocity, heading, closest point of approach, and sequential probability testing to classify potential ARMs without relying on weapon name lookups or single-value cutoffs. The response is configurable per doctrine, from staying hot behind point defense to immediate shutdown.

EMCON discipline - Other scripts offer basic on/off radar control - radars activate when a target is in range and shut off otherwise. Medusa provides multiple emission policies (periodic scan, coordinated rotation, minimize, always on) that can be configured independently per unit role - EWRs can rotate while SAM batteries minimize, or SHORAD stays hot while long-range systems stay dark. Coordinated rotation divides sensors into groups that take turns radiating, keeping the network harder to map out while maintaining coverage.

No lookup tables - Other IADS scripts maintain hardcoded tables of SAM types and their performance data. Add a modded SAM and you have to update the script’s database. Medusa queries DCS APIs at runtime - sensor capabilities via unit probing, weapon envelopes via ammo descriptors, unit roles via DCS attributes. Any SAM that DCS knows about, Medusa knows about, including mods.

Point defense - One script requires you to manually place SHORAD near your SAMs with no automatic assignment. Another auto-detects SHORAD but requires specific naming conventions. Medusa auto-discovers SHORAD via DCS unit attributes and assigns them to nearby long-range SAMs using a spatial index. No manual wiring, no naming conventions, no zone placement.

  • DCS World (latest version)
  • That’s it. The main release (medusa.lua) includes everything you need.

If you use other scripts that depend on dcs-harness, you can load dcs-harness once per mission and use the thin release (medusa-thin.lua) instead to avoid loading it twice.

Head to Installation to get Medusa running in your mission.