Nuclear Option
You are viewing a potentially older version of this package. View Latest Version
Install with App

Details

Date Uploaded
4 days ago
Downloads
33
Size
45KB

AutoDefense

Automatic countermeasures and missile counter for Nuclear Option.

Flares, chaff and interceptors, released at the moment the game's own decoy math says they are worth the most. No hotkeys, nothing to remember mid-fight — it watches the missiles that are actually tracking you and answers them.

What it does

Every physics step it reads the game's own missile warning list — the missiles whose target is your aircraft, within 5 km and in line of sight — works out time to impact, and acts:

  • Flares against IR seekers, chaff against ARH/SARH seekers. The station is chosen by the game's own picker, so it always matches your loadout.
  • An interceptor at anything worth shooting at, including the ARM, optical and laser seekers that no decoy affects.

It works as host or client, and patches nothing.

Why the timing isn't just a fixed delay

The rules the game uses to decide whether a decoy works are readable, and they all say the same thing — release late:

  • Flares. Dazzle accumulates and never decays, so nothing you have already spent is wasted, and the amount needed to break lock falls as the missile closes. A missile looking up your exhaust needs about three times as many flares as a head-on shot, and your engine's heat signature scales with throttle.
  • Chaff. It only counts while a radar missile is in its terminal active mode. Chaff released during mid-course is discarded outright — pure ammo loss. Effectiveness then scales with how close the missile is.

So AutoDefense models how many decoys that particular seeker needs right now, and opens fire exactly that long before impact plus a safety margin — rather than dumping the moment the warning appears. For radar threats it waits for the missile to go active first.

If it can't read a seeker — which happens in multiplayer, where a missile fired at you is simulated on someone else's machine — it falls back to fixed lead times and still fires. The model only ever sharpens the timing; it never stops the mod from defending you.

Installation

Install with a mod manager (Thunderstore Mod Manager, r2modman or Gale) and launch the game through it.

Manual: install BepInExPack, then drop AutoDefense.dll into BepInEx/plugins/AutoDefense/.

Configuration

Open the settings window in game, or edit BepInEx/config/hendev.nuclearoption.autodefense.cfg. Everything is on by default.

Setting Default What it's for
Master / Enabled on Off means the game behaves exactly as stock.
Softkill / RequireActiveLock on Never spend chaff on a radar missile that hasn't gone active. Leave this on — chaff does nothing before that point.
Softkill / IrLeadSeconds, RadarLeadSeconds 5 / 6 The furthest ahead of impact it will ever fire. It normally fires much later. Raise if decoys are going out too late for you.
Softkill / AmmoReserve 0 Decoys held back for manual use, ignored when impact is imminent.
Hardkill / Enabled on Interceptor launches. See below.
Compatibility / ReviveConfigWindow on Keeps the settings window working (this game breaks it). Harmless alongside other mods that do the same.

Notes

Hardkill is the experimental half. Launching an interceptor briefly borrows your active weapon station and target list, and hands both back on the next physics step. The game's own AI does treat missiles as valid targets, so the approach is sound, but it has had limited testing. If it picks odd stations or fights your targeting, set Hardkill / Enabled = false — the countermeasures half is completely independent of it.

Reviewing a sortie. Two files appear under BepInEx/:

  • AutoDefense.state.txt — rewritten once a second with every inbound missile: seeker type, mode, range, closure, time to impact, the modelled decoy count, and what's been spent.
  • AutoDefense.engagements.log — one line per decision and outcome, with the numbers behind it.

need=model-unavailable means the seeker couldn't be read and fixed lead times were used.

Compatibility

BepInEx 5, any Nuclear Option build matching it. No Harmony patches, no game files modified. Multiplayer-safe: it uses the game's own networked countermeasure path.

Thunderstore development is made possible with ads. Please consider making an exception to your adblock.