Missile Defense Systems (Continued)


Community continuation of kafoaai's Missile Defense Systems, updated for Factorio 2.0. Reworks the Ballistic tier into a rapid-fire artillery launcher that fires arcing rocket barrages. Original mod by kafoaai.

Content
9 hours ago
2.0
0
Combat

Changelog

Version: 1.21.1
Date: 2026-07-22
    - BALLISTIC AMMO DAMAGE FIXED. Both cartridge types were sharing ONE projectile with a
      hardcoded 200 explosion blast, so the standard and explosive cartridges did identical
      damage - and less than the rockets they are crafted from. Each type now has its own
      warhead, matching its vanilla counterpart exactly (values taken from the game's own
      projectile definitions):
        * Standard cartridge  - 200 explosion, concentrated on what it hits (as vanilla "rocket").
        * Explosive cartridge -  50 explosion on the target PLUS 100 explosion over radius 6.5
                                 (as vanilla "explosive-rocket") - less on the primary target,
                                 but it hits a crowd.
      This restores the vanilla tactical split between the two ammo types, which had been lost.
    - ROCKET DAMAGE RESEARCH NOW APPLIES. Because the cartridges use their own ammo category (so
      they only fit this turret), vanilla's "Rocket damage" and "Rocket shooting speed"
      technologies were never touching them - a fully-researched vanilla rocket hit for 460 while
      these stayed at their 200 base forever. Every rocket damage/speed research effect is now
      mirrored onto the Ballistic ammo category, so the cartridges scale identically to the
      rockets they are built from, at every research level.
    - Note: the barrage still cannot damage your own base (all blasts remain enemy-only). That is
      a deliberate difference from vanilla rockets, which do cause friendly fire.
Version: 1.21.0
Date: 2026-07-22
    - RELEASE. The Ballistic tier rework is feature-complete and confirmed working in-game.
    - Balance locked in: a barrage is 10 missiles followed by a 5 second reload. These are no
      longer map settings - they are fixed in code as the intended balance limitation.
    - Ammo is banded cartridges: one cartridge = one full 10-missile barrage (crafted from 10
      of the matching vanilla rocket + 2 steel plate). A turret holds up to 10 cartridges
      (100 missiles / 10 barrages loaded).
    - The Ballistic debug-log chat option has been removed from the mod settings menu (it was a
      development aid). The barrage-size and reload-seconds settings are removed for the same
      reason (now hardcoded, above).
    - Release tidy-up: development diagnostic logging stripped from the runtime path; no gameplay
      change.
    - Unchanged and confirmed this cycle: rapid-fire artillery volley with single-target lock,
      dedicated targeting remote (full barrage per click), 360-degree slow traverse with the
      native "Automatic targeting" checkbox as the on/off control, structures-only auto-targeting,
      artillery-range-research-aware range limits, and the rocket-launcher turret art.
Version: 1.20.7
Date: 2026-07-21
    - CRASH FIX: using the targeting remote on a base crashed 1.20.6 ("LuaEntity API call when
      LuaEntity was invalid") - the strike-order code destroyed the remote's flare and then read
      its position for the log line. Position is captured before the destroy now.
    - BANDED AMMO CARTRIDGES: one ammo item is now a cartridge of TEN missiles = one full barrage.
      Uses the engine's magazine_size (the turret consumes a tenth of a cartridge per launch, and
      the UI shows the partly-used cartridge). Recipes changed to match the real cost: 1 cartridge
      = 10 of the matching vanilla rocket + 2 steel plate (banding). NOTE: the cartridge is fixed
      at 10 launches; if you change the barrage-size map setting away from 10, barrages and
      cartridges will no longer line up one-to-one (engine limitation - the setting is runtime,
      magazine size is load-time).
    - RANGE RING MISMATCH, likely REAL cause found: the map's artillery ring includes the force's
      ARTILLERY RANGE RESEARCH bonus, which the engine applies to artillery turrets - but the
      script's own range checks were capped at the raw 500 setting, so the turret refused/ignored
      targets in the outer ring band the engine ring correctly showed. All range checks (auto
      acquisition and remote orders) now scale with the researched artillery range bonus, matching
      the ring. If you have NO artillery range research and the ring still looks oversized, the
      remainder is the ring's chunk-resolution outward rounding (engine-drawn, not fixable).
Version: 1.20.6
Date: 2026-07-21
    - REMOTE NOW FIRES A FULL BARRAGE PER CLICK. Root cause of the one-rocket click: remote-dropped
      flares went through a separate "manual flare" path with its own lifetime rules instead of the
      volley machinery. Now a remote click is CONVERTED directly into a normal committed volley for
      every launcher in range (the exact code path auto-barrages use, which demonstrably delivers a
      full barrage per flare): each responding launcher gets its own strike flare at the clicked
      position and fires its complete barrage, paced by its shot counter.
    - This also fixes the "extra rockets after the cooldown" at long range: the old manual flare
      outlived the barrage by design (a timeout), so after reloading the turret re-engaged it. Now
      each launcher's flare is destroyed at exactly its Nth shot - nothing lingers. (Shots are
      counted at LAUNCH, not impact, so missile flight time never affects the count.)
    - Remote-order override: clicking the remote retargets launchers even mid-barrage, but the shot
      counter is NOT reset - shots already fired still count toward the barrage, so spamming the
      remote cannot stretch a barrage past its size or dodge the reload.
    - Map circle slightly larger than true range: that's the engine's artillery-range chart overlay,
      which is drawn at CHUNK resolution (32-tile blocks), so it always rounds outward by up to a
      chunk. Not fixable mod-side; the true hard limit is enforced by the range checks (an order
      beyond max range is refused).
    - Rotating toward the next target during the reload pause: not done - the turret is deliberately
      dormant while reloading (that's what enforces the pause), and artillery turrets expose no
      scriptable "pre-aim" order. The next target's flare IS already placed before the turret wakes,
      so it turns and fires immediately on wake; pre-turning during the pause would only move the
      turn time inside the cooldown, and doing that reliably would need fragile trickery.
Version: 1.20.5
Date: 2026-07-21
    - V2 SIMPLIFICATION (user-directed compromise): the firing cone is GONE. The turret targets a
      full 360 degrees, the vanilla artillery range circle on the map stands as the coverage
      display, and the ground cone wedge is removed (any wedges persisted in a 1.20.3/1.20.4 save
      are wiped on update). Turret traverse is now slow and deliberate (~11s for a full turn).
    - THE NATIVE "AUTOMATIC TARGETING" CHECKBOX IS NOW THE REAL CONTROL - ticked shows on,
      unticked shows off, instantly, exactly like vanilla artillery. The mod side panel is gone in
      artillery mode. Alt+T flips the same flag. This works because the checkbox was only being
      suppressed to enforce the cone - with the cone gone, the engine flag can live.
    - The volley single-target lock survives via FLARE PRIORITY: the script pins its flare on the
      chosen structure and flares outrank the engine's own picks (the same mechanism the vanilla
      remote uses to override auto-targeting). The next volley's flare is placed BEFORE the turret
      wakes from reload, so there is no unlocked window between barrages. Known small imperfection:
      a brand-new turret receiving its first ammo may loose a shot or two at the engine's own pick
      in the moments before the first sweep places its flare (up to ~1/3 s).
    - Toggling auto-targeting OFF now takes effect INSTANTLY (it's the engine flag - no 20-tick
      script sweep in between). An auto-off turret still answers remote strike orders, is held
      asleep when only other turrets' volley flares are around (so it can't poach them), and a
      barrage already in progress still completes (committed-barrage rule).
    - Min/max range checks on auto and remote targeting are unchanged; remote strike refusal
      messages now only have the two real reasons (too close / out of range).
Version: 1.20.4
Date: 2026-07-21
    - AUTO-BARRAGE OFF NOW MEANS OFF. In 1.20.3 a toggled-off turret would still fire the moment
      it had ammo, because it was allowed to service ANY live strike flare - including its own
      leftover volley flare or a neighbouring turret's. Now an auto-off turret responds ONLY to
      manual (remote-ordered) strike flares; with no manual order standing it is held asleep and
      physically cannot fire. Toggling auto-barrage back on (either checkbox or Alt+T) wakes it.
      A barrage already in progress when you toggle off still completes - that's the committed-
      barrage rule working as intended.
    - Map coverage display: NOT technically possible, recorded here for honesty. The map/chart
      view only renders engine-drawn overlays (the artillery-range circle); mod rendering (the red
      cone wedge) exists only in world space - the engine offers no way for a mod to draw shapes
      onto the chart. The wedge IS visible in map view once you zoom in far enough that the map
      switches to live world rendering. Options if the ground wedge isn't wanted: keep it, revert
      to hover-only, or remove it - say the word.
Version: 1.20.3
Date: 2026-07-21
    - CONE OVERLAY IS NOW ALWAYS ON: every Ballistic turret permanently draws its firing cone on
      the ground as a dark-red wedge at 25% opacity (min-range to max-range, centred on its placed
      facing), instead of the hover-only overlay that was impossible to see at 500-tile scale.
      Overlays are rebuilt whenever a turret is built or removed and survive save/load.
    - AUTO-TARGET TOGGLE, ROOT CAUSE FOUND: the mod's own "Auto-barrage" side panel was NEVER
      appearing in artillery mode - the relative-GUI anchor was wrong (artillery windows are
      container-type GUIs; now anchored the same way the proven Smart Artillery Wagons mod does
      it). The only checkbox you could see was the game's NATIVE "Automatic targeting" box, which
      the script must hold off - hence "always unticked but always firing".
      Now: (1) the mod's Auto-barrage checkbox should actually appear to the right of the turret
      window and shows the TRUE state; (2) ticking the game's native checkbox acts as a TOGGLE -
      each tick flips auto-barrage on/off with a chat confirmation (that box itself will always
      display unticked; it is engine-owned and cannot show the script's state).
Version: 1.20.2
Date: 2026-07-21
    - AUTO-TARGET TOGGLE FIXED. The artillery GUI has TWO checkboxes: the game's own "Automatic
      targeting" one, and the mod's "Auto-barrage" one. The script must keep the game's own flag
      permanently off (it owns target selection), so in 1.20.1 re-ticking the NATIVE checkbox just
      snapped straight back off - which is the "can't toggle it back on" glitch. Now ticking the
      native checkbox is interpreted as "turn auto-barrage back ON": the mod re-enables its own
      auto-barrage for that turret (with a chat confirmation) and quietly re-clears the engine
      flag. Either checkbox (or Alt+T) now works to re-enable.
    - The mod's Auto-barrage checkbox also got hardened: it now resolves the turret directly by
      unit number (the old lookup chain could miss on the off->on transition), and it anchors into
      the artillery turret's own GUI slot. Both toggle paths write DIAGNOSTIC log lines now, so if
      anything still misbehaves the log will say exactly which step failed.
    - Honest answers to open questions, recorded here for the changelog trail:
      * Accuracy: yes - confirmed by design. Aim scatter is ANGULAR (0.045 rad) so lateral spread
        grows linearly with distance, and range scatter is a fraction of distance (0.02) - close
        targets get a tight barrage, far targets a wide one.
      * Rocket acceleration after launch: not possible with the artillery delivery - artillery
        shells fly at constant speed (a fixed engine behaviour; acceleration is a feature of the
        plain projectile type used by straight-mode rockets). The constant flight speed (0.9
        tiles/tick) can be tuned up or down for feel.
      * The 360-degree range circle on the map is the engine's artillery-range chart overlay,
        drawn for every artillery-turret; there is no per-prototype way to remove it (checked the
        full ArtilleryTurretPrototype field list). Script rendering can't draw onto the map view
        either, so the cone can't replace it there - the hover cone in-world is the cone display.
Version: 1.20.1
Date: 2026-07-21
    - CRASH FIX: 1.20.0 hard-crashed the moment the volley engine placed its first flare ("Key
      'frame_speed' not found in property tree at ROOT"). Script-created artillery flares require
      four extra spawn fields the remote normally supplies internally (movement, height,
      vertical_speed, frame_speed) - now provided. This was the volley engine's very first
      create_entity call, so NOTHING from 1.20.0's new mechanics has actually been exercised yet -
      all of it still needs its first real test.
    - TURRET RE-SKIN (best-effort, needs your eyes): artillery mode now uses the mod's own
      rocket-launcher art instead of the vanilla artillery turret. The 64-direction rocket-turret
      sheet is mapped onto the artillery rig as the rotating cannon; the vanilla concrete platform,
      barrel layer, recoil and parking animations are removed (the launcher art is one complete
      turret, barrel included). Things to eyeball in-game: sprite centring/pivot, shadow offset,
      and that rotation tracks the aim direction smoothly.
Version: 1.20.0
Date: 2026-07-21
    - THE VOLLEY, COMPLETED (best-effort, needs in-game confirmation): the single-target lock that
      1.19.1 couldn't do is now implemented with a private ARTILLERY FLARE. The script disables the
      turret's native auto-targeting (entity.artillery_auto_targeting = false) and picks targets
      itself: it finds the nearest enemy STRUCTURE (spawner/worm) that is inside max range, outside
      min range AND inside the firing cone, then pins a flare on it. The engine fires the whole
      barrage at that one flare; at barrage-size shots the flare is removed and the reload pause
      starts. If the target dies mid-barrage the flare stays, so the barrage still completes on that
      spot - the intended "committed barrage" limitation. Verified against the official docs:
      ArtilleryFlarePrototype.shot_category means ONLY the Ballistic turret answers our flare.
    - FIRING CONE IS BACK - and enforced on EVERYTHING. The cone (existing Fire pattern / Fire arc
      degree settings, default 45 degrees, centred on the direction the turret was PLACED facing)
      now gates all auto-acquisition, and remote strikes too: a strike no launcher can legally
      engage is refused with a chat message, and while a strike marker is up, launchers that can't
      legally reach it are put to sleep so the engine can't swing them onto an illegal mark.
      LIVE-TEST NOTE: whether entity.direction preserves placement rotation on artillery-turrets
      needs confirming in-game - the registration DIAGNOSTIC log line records each turret's
      direction; if every turret logs direction=0 the cone will always point north and I'll switch
      to tracking placement direction myself.
    - DEDICATED REMOTE: new "Ballistic missile targeting remote" (shortcut-bar button, unlocked by
      the Ballistic tech - cloned from vanilla's own remote+shortcut, so the delivery mechanism is
      known-good; orange-tinted icon). It uses the engine-native artillery-remote capsule action
      pointed at our private flare - zero custom scripting, NOT the old broken script-capsule.
      Each click = one full barrage per responding launcher (marker expires after roughly one
      barrage's duration). The VANILLA artillery remote no longer directs Ballistic turrets
      (its flare is now stamped shot_category="artillery-shell"), and vanilla artillery never
      answers ours. If the shortcut button doesn't appear after research, tell me - for testing you
      can spawn one with: /c game.player.insert("mds-ballistic-targeting-remote")
    - CONE OVERLAY: hovering a Ballistic turret draws its firing cone (min-to-max range wedge) on
      the ground. Best-effort: if the wedge points the wrong way relative to the turret, say so -
      the angle origin of the rendering API needs one in-game look to calibrate.
    - Auto-barrage toggle fixed for artillery mode: the mod's checkbox now anchors to the
      artillery-turret GUI (1.19.1 anchored it to ammo-turret, so it never showed). Alt+T still
      works. The turret's NATIVE "Automatic targeting" checkbox is script-enforced OFF (targeting
      is script-controlled) - use the mod's "Auto-barrage" checkbox instead.
    - Manual (remote) range now equals auto range (manual_range_modifier = 1, was vanilla's 1.25x)
      so remote strikes obey the same max range as everything else.
    - Cleanup: all dead code from the old custom capsule remote removed from control.lua.
    - No entity type change this release - existing turrets in the save survive the update.
      Turrets are re-scanned and registered on load; a placed turret's facing is whatever it was
      built with.
    - STATUS SUMMARY: burst count + reload pause were already CONFIRMED in 1.19.1; everything new
      in this version (flare lock, cone gating, remote, overlay) is BEST-EFFORT UNVERIFIED until
      you run it. All the important moments write DIAGNOSTIC lines to factorio-current.log -
      please send a fresh log after a session with a volley, a remote strike, and a hover.
Version: 1.19.1
Date: 2026-07-22
    - Ammo capacity raised from 15 to 200 rockets (was the vanilla artillery stack limit).
    - Sound: the firing sound is now the missile/rocket launcher instead of the artillery boom, and
      the artillery cannon rotation sound is silenced.
    - Volley hard-lock: the maintenance loop that actually HOLDS a turret on its target for the
      whole volley had been referenced but never added (an oversight) - so the lock did nothing.
      It's now in: a turret holds the target it started its volley on, and if that target dies
      mid-volley the volley ends (shot count resets) rather than the remaining rounds retargeting.
      This works directly for the ammo-turret (straight/stream) modes.
      For ARTILLERY mode it also logs, on each volley's first shot, whether the artillery-turret
      exposes a settable shooting_target (search factorio-current.log for "DIAGNOSTIC volley").
      That one line tells us whether a script lock is even possible on an artillery-turret - I need
      it to finish the artillery volley behaviour.
    - Honest notes: a real artillery-turret rotates 360 degrees and has NO firing cone (the cone was
      an ammo-turret feature), so it shows a range circle, not a wedge. And artillery mode still
      uses the vanilla artillery turret GRAPHICS - re-skinning to the rocket-launcher art is the
      next art task (it needs mapping the sprites onto the artillery base+cannon rig).
Version: 1.19.0
Date: 2026-07-22
    - MAJOR: the Ballistic turret is now a real ARTILLERY-TURRET in its main mode ("arc-artillery",
      now the default Fire style). It's cloned from the vanilla artillery turret and fires our
      rocket ammo through a custom artillery cannon gun ("mds-ballistic-artillery-gun"), carrying
      the tier's range / fire rate (shots-per-second) / min-range across. This is the "rapid-fire
      artillery gun" design, and it inherits the engine's artillery behaviour FOR FREE:
        * Auto-targets enemy STRUCTURES only (spawners/worms) - never wandering biters/spitters.
        * Works with the VANILLA artillery targeting remote natively (the custom remote is gone -
          just use the game's artillery remote to direct fire). No more broken capsule.
        * Commits to targets (no mid-volley target flailing) and has the plunging arc + long range.
    - Straight and stream-lob fire styles are KEPT: choosing them builds the Ballistic turret as the
      previous ammo-turret instead (with the scripted volley hard-lock + ignore_target_mask). The
      Fire style startup setting now switches the entity type.
    - Custom Ballistic remote removed (item/shortcut/recipe) - superseded by the vanilla artillery
      remote in artillery mode.
    - TEST-ON-LOAD / known wrinkles (this is a big change I can't test myself):
        * Appearance: artillery mode uses the VANILLA artillery turret graphics for now (a valid
          rig); re-skinning to the rocket-launcher art is a separate follow-up.
        * MIGRATION: changing the entity type means any Ballistic turrets already PLACED in a save
          will be removed on load - just rebuild them (the item/recipe are unchanged). Fresh builds
          are fine.
        * The scripted volley/reload burst depends on the ammo's shot trigger firing on the
          artillery-turret; if bursts don't pause to reload in artillery mode, tell me and I'll
          switch the shot-detection method.
        * Rapid fire rate vs the cannon's recoil/parking animation may look janky or need tuning.
Version: 1.18.2
Date: 2026-07-22
    - Rocket art: replaced the placeholder sprite with the actual base-game rocket art (the rocket
      icon the user supplied), cropped to a clean 64x64 projectile sprite. Used for both arc modes
      (artillery plunge shell + stream lob), rotatable so it faces its travel direction. Scale is
      easy to nudge if it reads too big/small.
Version: 1.18.1
Date: 2026-07-22
    - Straight mode: reverted the homing added in 1.18.0. This turret is meant to be inaccurate, so
      pinpoint homing was the wrong fix. The straight rocket is unguided again (turn_speed = 0), but
      its launch spread is now a controlled 0.05 aim / 0.025 range deviation instead of the leftover
      0.2 that caused the wild misses. Because aim deviation is angular, it stays tight up close and
      widens with distance - inaccurate-at-range as intended, without scattering wildly. max_range
      stays clamped so a long shot can't be flung past the turret's range into your base. It still
      ignores trees/rocks via the empty collision mask.
Version: 1.18.0
Date: 2026-07-22
    - Rocket art: added a proper rocket projectile sprite (graphics/ballistic/entity/mds-rocket-
      projectile.png) and wired it into BOTH arc modes:
        * Arc - artillery plunge: the shell is now a rocket (was the vanilla artillery shell
          sprite), with rotatable = true so it orients to its travel direction on the way down.
        * Arc - stream lob: the lobbed projectile is now a rocket too (was the re-tinted acid
          blob), keeping a light exhaust trail.
      Sprite scale is easy to tune if it reads too big/small.
    - Straight mode made functional again (was effectively a wild-miss mode): homing was restored
      on the straight-fire rocket projectile. That projectile is only used by the "straight" fire
      style now (the arc modes use their own stream/artillery delivery), so it can behave like a
      normal accurate rocket again - it still ignores trees/rocks via its empty collision mask, but
      now actually lands on its target instead of scattering wildly from the no-homing + deviation
      combo left over from the arc experiments.
    - Lobber (arc - stream) confirmed to still load/fire with the new art; it remains a short-range
      "fun" option alongside the main artillery-plunge mode.
    - Still open (next): the remote (its 1.16 diagnostics printed NOTHING in the 1.17 log - the
      capsule throw isn't raising its script trigger, so the fix is at the capsule level, likely
      switching to on_player_used_capsule), and the scripted volley hard-lock (can_retarget_while_
      starting_attack alone didn't stop mid-volley target switching).
Version: 1.17.0
Date: 2026-07-21
    - Targeting FIXED properly (works in all fire modes, incl. artillery). Removed the old ammo
      target_filter (which the artillery delivery bypassed) and replaced it with the turret's
      native ignore_target_mask = {"ground-unit"}. Biters/spitters are type="unit" and carry the
      "ground-unit" mask by default; spawners and worms do not - so the turret now ignores
      wandering biters/spitters while still auto-firing on biter bases and worms. New startup
      setting "Auto-target mode (Ballistic)": "Structures only" (default) or "Everything".
    - Volley: added can_retarget_while_starting_attack = false so the turret stays committed to
      the target it started its attack on instead of flicking between enemies mid-volley. (If it
      still switches between separate STRUCTURES mid-volley, the next step is a scripted hard lock
      on the initial target for the whole volley - tell me if you still see switching.)
    - Faster shells: artillery shell speed raised from 0.5 to 0.9.
    - Remote: STILL not working, and I can't see why without data. 1.16 added full diagnostics to
      the remote chain. Please craft a remote, use it on some biters, then paste the
      factorio-current.log lines containing "DIAGNOSTIC remote" - they show exactly which step
      fails (throw reaching the handler / enemies found / turrets directed).
    - Rocket art: the artillery projectile's `picture` is a single Sprite (with `rotatable` to
      orient it to travel direction). The mod's rocket PNGs are turret sheets, not a projectile
      sprite, so proper rocket art needs a single rocket sprite - next step is to crop one from a
      rocket sheet, or drop in a small rocket PNG if you have one.
Version: 1.16.0
Date: 2026-07-21
    - Remote: removed the minimum-range gate on remote-directed fire. The remote requires each
      turret to be within max range of the target, but it was ALSO requiring them to be at least
      min-range (80 tiles) away - so directing fire at enemies close to your turrets left no turret
      eligible and nothing fired. Minimum range is an auto-targeting dead-zone concept; a manual
      override should work at any reachable distance. This is the most likely reason "it doesn't
      target anything".
    - Remote: added unconditional diagnostics (factorio-current.log) through the whole remote chain
      - whether the throw reaches the handler, how many enemies were found near the click, the
      chosen target, how many turrets were on the surface, and how many were directed to fire. If
      it still does nothing, these lines will pinpoint exactly which step fails.
    - Artillery mode: added a SCRIPTED smoke trail behind shells in flight (the artillery projectile
      has no native trail field). Light smoke is dropped along each in-flight shell's path. Caveat:
      projectiles are flagged not-on-map, so if they turn out not to be script-findable, no trail
      will appear - tell me and I'll switch to a launch-interpolated trail instead.
    - Still open / next: proper ROCKET art for the artillery shell (currently the vanilla shell
      sprite; the projectile's `rotatable` field means we can orient rocket art to travel direction),
      the free shortcut delivery of the remote (craftable recipe remains the way to get one for
      now), and the dedicated bases/worms-vs-everything targeting setting.
Version: 1.15.0
Date: 2026-07-21
    - Arc - artillery plunge: accuracy reworked. Deviation was far too loose even up close. It now
      uses dedicated, much lower deviation (aim 0.045 rad, range 0.02) so close shots are tight.
      Because aim deviation is ANGULAR, the scatter widens with distance on its own - the further
      the barrage's target, the wider the volley, as intended. Both values are easy to tune.
    - Remote: added a TEMPORARY craftable recipe (1 electronic circuit, available from the start)
      so the remote can finally be obtained and its throw -> target -> turret-fire mechanic tested.
      The free shortcut button is retained but has never delivered a remote in testing; this
      unblocks verifying the remote actually works while that's sorted out separately.
    - Muzzle smoke made clearly visible (a small 3-puff smoke-fast burst per shot). If you now SEE
      this smoke in artillery mode, it also confirms the shot's source_effects fire - which is what
      the barrage/reload counter relies on, so it's a useful signal that the counter works there.
    - HONEST STATUS on the rest of the recent feedback:
        * Higher arc: reverting the claim - height_from_ground turned out to be a render-origin
          offset, not the arc apex, which is why raising it did nothing. Artillery arc height is
          not a directly exposed dial (unlike the stream lob's vertical acceleration). Left as-is.
        * Shell smoke TRAIL: artillery projectiles don't natively carry a flight trail (only a
          muzzle/impact effect). A moving trail would need a scripted approach - can prototype it
          if wanted.
        * Targeting biters: the runtime turret target-priority API exists but is coupled to circuit
          conditions and has known quirks; it's getting its own focused version next so it can be
          verified on its own rather than bundled here.
        * Shot origin (centre vs barrel): deferred, per your note that it isn't a priority.
Version: 1.14.0
Date: 2026-07-21
    - Arc - artillery plunge: first refinement pass from placeholder (all tunable):
        * Higher trajectory: raised the shell's height_from_ground from vanilla's ~4.4 to 9, so it
          flies much higher with a bigger shadow gap and a steeper plunge (answering "can we make
          the arc higher" - yes, this is the dial).
        * Shots now leave the barrel, not the turret centre: projectile_creation_distance pushed
          from 1.2 to 2.5. (Best-effort - if the artillery delivery still spawns it centre-ish,
          tell me and we'll try another offset.)
        * Slower shell: starting_speed lowered from 1 to 0.5 to sit closer to the rockets' speed.
          NOTE: artillery shells fly at a CONSTANT speed - they don't accelerate over time like
          rockets do (that ramp is a rocket-projectile trait). 0.5 is a constant middle-ground;
          there's a tradeoff at very long range (slower to arrive), so shout if you want it tuned.
        * Added a light, short muzzle smoke puff per shot (vanilla artillery-smoke).
    - Kept "Arc - stream lob" as a permanent fun option in the Fire style setting.
    - Still to come (its own focused version so it can be verified on its own): the bases/worms-vs-
      everything TARGETING setting. The ammo target_filter that restricts auto-targeting works in
      straight/stream mode but the artillery delivery bypasses it, so that setting needs script-
      based enforcement rather than the data-stage filter.
    - Art in artillery mode is still the vanilla shell sprite (placeholder); custom rocket art and
      damage/speed balancing come after the trajectory feel is locked.
Version: 1.13.0
Date: 2026-07-21
    - NEW EXPERIMENTAL arc flavour: "Arc - artillery plunge". The Fire style (Ballistic) startup
      setting now has three options: Straight (default, confirmed rocket), Arc - stream lob (the
      1.11/1.12 up-and-over worm-stream arc), and Arc - artillery plunge (new).
    - Artillery-plunge mode is "rapid-fire artillery with rockets": the turret fires a cloned
      artillery-projectile, which flies at altitude with a ground shadow that converges at impact
      (a real plunging arc), over all terrain, at the tier's FULL configured range - fixing the
      stream lob's short-range ceiling. Built the way vanilla artillery actually fires (a
      projectile-type turret attack whose ammo delivers type="artillery"), so the turret keeps its
      original projectile attack and only the ammo delivery changes.
    - Inaccuracy: the artillery delivery reuses the existing aim/range-deviation settings, so the
      barrage scatters over the target area (the "deliberately less accurate" part of the design).
      Firing cone and minimum range are preserved from the straight-mode settings.
    - Payload in artillery mode is a rocket-scale blast (200 explosion in radius 5) that only
      damages hostiles, so a barrage can't hit the player's own base. Uses vanilla artillery shell
      art as a placeholder; custom rocket art comes once the mechanism is confirmed.
    - HONEST STATUS: this tests whether an ammo-turret can deliver an artillery projectile (vanilla
      only does it from artillery-turret/wagon). If Arc - artillery plunge fails to load, the log
      says why - switch Fire style back to Straight (or Arc - stream lob) to recover. Straight mode
      and the stream lob are both unchanged and remain available.
Version: 1.12.0
Date: 2026-07-21
    - Arc mode: restored the predefined firing cone. When rebuilding the turret's attack as a
      stream in 1.11.0, the turn_range field (which limits the turret to its configured firing
      arc) was dropped, so it acquired targets in a full 360 degrees. It now reads the same
      fire-pattern / fire-arc-degree startup settings the straight-mode turret uses.
    - Arc mode: restored a minimum-range dead zone. Streams can't cheaply reach the straight
      mode's 500-tile range, so arc mode has a much shorter effective reach (~96). The
      minimum-range setting is now scaled to that reach so it stays a meaningful band instead of
      the tiny test value from 1.11.0.
    - No change to straight mode, and no change to the arc's trajectory/art/sound yet (still the
      placeholder acid-projectile particle re-tinted orange - custom shell art/sound pending a
      decision on stream-arc vs artillery-height approach).
Version: 1.11.0
Date: 2026-07-21
    - EXPERIMENTAL, OPT-IN: true ballistic arc trajectory for the Ballistic tier, via Factorio's
      stream mechanism (the same tech worms/spitters use to lob acid in a real parabola). New
      startup setting "Fire style (Ballistic)" - default "Straight" (the current, confirmed rocket)
      or "Arc" (experimental). In Straight mode the mod behaves exactly as 1.10.0; the arc code
      no-ops entirely, so there is zero change/risk unless you opt in.
    - Why a stream and not "artillery": verified against wube/factorio-data that artillery shells
      fly dead straight in Factorio - they do NOT arc. The stream is the only vanilla mechanism
      that produces a genuine parabolic arc, and it naturally scatters shots into an area around
      the aim point (which also addresses the straight-mode overshoot: shots land around the
      target instead of flying far past it), and flies over trees/rocks inherently.
    - HONEST STATUS - this is a prototype to evaluate, not a finished feature:
        * The core unknown it tests: no vanilla AMMO-turret fires a stream (only turret/unit/
          fluid-turret do). If Arc mode fails to load, factorio-current.log will say why and we
          pivot. Straight mode is unaffected either way - just switch the setting back.
        * Arc range/scatter/speed are first-look test values (range ~96, independent of the
          straight-mode range settings) to be tuned AFTER seeing it, per the agreed plan.
        * The shell currently reuses vanilla acid-projectile art, re-tinted orange as a
          placeholder - custom shell art comes only once the arc itself is approved.
        * Blast damage/radius in arc mode are placeholder values.
        * Burst/reload counting in arc mode is best-effort (the shot-fired trigger fires on
          impact rather than at launch); may need rework depending on how it behaves.
    - No changes to straight-mode behaviour, settings, or the 1.10.0 barrage fix.
Version: 1.10.0
Date: 2026-07-21
    - CONFIRMED ROOT-CAUSE FIX (evidence-backed, from the user's own factorio-current.log): the
      Ballistic tier's burst-fire-then-reload mechanic has never actually run in any prior version.
      The shot-counting script trigger ("mds-ballistic-shot-fired") was being added to the ammo's
      source_effects with table.insert(), but vanilla stores source_effects as a SINGLE trigger
      effect (a table with a `type` key, for the muzzle-flash), not an array. Inserting at [1] on
      top of that produced a malformed hybrid table (both a dictionary AND a one-element array).
      Factorio treats any table carrying a `type` key as a single effect, so it kept only the
      vanilla create-entity effect and SILENTLY discarded our script effect - meaning the shot
      trigger was never registered, on_script_trigger_effect never fired for it, the per-turret
      burst counter never incremented, the reload pause never happened, and the debug log that was
      added to diagnose all this printed nothing (because the handler it was inside never ran). The
      1.9.0 DIAGNOSTIC dump in the log showed this malformed structure directly. Fixed by wrapping
      the existing single source_effect into a proper array before adding the script effect, so
      both the muzzle-flash and the shot trigger are preserved.
    - Added an unconditional diagnostic line (written to factorio-current.log, independent of the
      Map-tab "mds-ballistic-debug-log" toggle) at the top of the shot-fired handler. After firing
      the Ballistic turret a few times, the log will now contain "DIAGNOSTIC: shot-fired event
      fired..." lines if the counter chain is alive. This is how we confirm the fix worked without
      guessing. It will be removed in a later version once confirmed.
    - NOT YET VERIFIED IN-GAME (I cannot launch Factorio): whether the barrage now correctly caps
      at the configured shot count and reloads, whether launch inaccuracy/scatter behaves, whether
      the base/worm-only auto-target filter and the manual-targeting Remote work end-to-end. Those
      all depend on the shot trigger firing, which this version is the first to actually make
      possible - so they need a fresh in-game test + log check before being called done.
Version: 1.9.0
Date: 2026-07-20
    - Replaced the Alt+T-only auto-targeting toggle with a real checkbox in the Ballistic turret's
      own entity window, matching vanilla artillery's UX. Vanilla's artillery "Auto targeting"
      checkbox turned out to be a hardcoded engine feature specific to the "artillery-turret"
      prototype (not exposed generically to mod-added ammo-turrets), so this is a custom checkbox
      built via the relative-GUI system, anchored into the generic "additional info" section every
      entity window has. Open a placed Ballistic turret and the checkbox appears directly in its
      window; unchecking it stops auto-targeting while remote-directed fire keeps working. Alt+T
      still works too as a quick alternative, and stays in sync with the checkbox.
Version: 1.8.0
Date: 2026-07-20
    - Fixed missiles overshooting the intended engagement area/flying past max range: now that the
      projectile doesn't home (1.7.0), range_deviation could legally push a shot's travel distance
      past max_range (this is documented Factorio behaviour, not a bug in the deviation itself).
      The ammo's action_delivery now explicitly hard-clamps max_range to the tier's own configured
      max range setting, so shots can never travel further than intended regardless of deviation.
    - Reduced the launch angle/range deviation defaults (previous 0.36/0.3 values were tuned
      assuming ~50% of the spread would get corrected out by homing - now that homing is fully
      gone, the raw, uncorrected deviation was far stronger than intended, causing shots to miss
      wildly rather than scatter within a reasonable area). Renamed both settings again
      (mds-ballistic-aim-deviation/mds-ballistic-distance-deviation -> mds-ballistic-launch-angle-
      deviation/mds-ballistic-launch-range-deviation) since they'd already been seen with the old
      values in 1.6.0/1.6.1 and would otherwise keep their stale stored value - same class of issue
      as the earlier fire-rate/min-range bug.
    - Added a "toggle auto-targeting" control for the Ballistic turret: hover/select a placed
      turret and press Alt+T (rebindable in Controls settings) to stop it picking targets on its
      own. It will still fire when manually directed via the Ballistic Missile Remote. Press again
      to re-enable normal (restricted) auto-targeting.
    - Added data-stage diagnostic logging (written to factorio-current.log, not chat) dumping the
      real structure of vanilla rocket/explosive-rocket ammo before and after our modifications -
      needed because the "Debug log (Ballistic)" chat toggle has reportedly not printed anything at
      all, which would mean the shot-fired script trigger itself may not be firing as designed. This
      log will show definitively whether our source_effects/direction_deviation writes are landing
      on the delivery that's actually used at runtime. The single-target-per-barrage behaviour is
      NOT re-touched this release pending that data - changing it further without knowing why the
      debug log is silent would be guessing blind.
    - Reminder: the true artillery-style visual firing arc remains parked, as agreed earlier in this
      project - not forgotten, just still deprioritized behind the mechanical/balance work above.
Version: 1.7.0
Date: 2026-07-20
    - Found the real cause of the barrage being "too accurate" no matter how high the aim/range
      deviation settings were pushed: vanilla's "rocket"/"explosive-rocket" projectiles are homing
      (turn_speed = 0.003, with turning speed increasing exponentially with projectile speed) - they
      steer back onto their target mid-flight regardless of launch deviation, which silently
      nullified the spread settings entirely. The Ballistic tier's projectile clones now have
      turn_speed = 0, making them true unguided, artillery-style projectiles - launch inaccuracy now
      actually determines where they land. Updated the ammo's flavour text to match ("unguided,
      artillery-style missile" instead of "guided missile").
    - The Ballistic Missile Remote is no longer a craftable item. Like vanilla's own artillery-
      targeting-remote/spidertron-remote, it's now obtained for free from a shortcut toolbar button
      (unlocked once the Ballistic tier is researched) that spawns one directly into your inventory
      - no recipe, no ingredients. Uses the same shortcut mechanism and icon as vanilla's artillery
      remote.
    - Added a "Debug log (Ballistic)" setting in 1.6.1 remains available for verifying barrage/
      reload/retarget behaviour directly in chat if anything still looks off after this build.
Version: 1.6.1
Date: 2026-07-20
    - Fixed the fire rate still showing 3/sec: "mds-ballistic-fire-rate" -> "mds-ballistic-burst-
      fire-rate" was already renamed once in 1.5.0/1.5.3, so it already had a stored value (3.0)
      by the time 1.6.0 tried to bump its default to 6.0 - same class of issue as the earlier
      fire-rate/min-range bug, just missed on this specific setting. Renamed again to
      "mds-ballistic-shots-per-second" so 6.0/sec actually takes effect.
    - Found a real precision bug in the barrage spread: per Factorio's own docs, direction_deviation
      and range_deviation are applied as HALF their configured value (max deviation = value / 2),
      so the 1.6.0 defaults (0.18, 0.15) were only half as strong as intended - part of why it was
      "still too accurate". Doubled to 0.36/0.3 to compensate; these are brand new setting names
      this release so the fix takes effect immediately.
    - The Ballistic Missile Remote is no longer consumed when used - like vanilla's artillery-
      targeting-remote, it's a reusable targeting tool (uses_stack = false), not a one-shot
      consumable. Previously it behaved like a craft-and-consume item, which wasn't intended.
    - Added a "Debug log (Ballistic)" setting (off by default, Settings > Mod Settings > Missile
      Defense Systems, runtime-global so it can be toggled without restarting). When enabled it
      prints each Ballistic shot/reload/retarget event to chat, to directly verify barrage/reload/
      remote behaviour rather than relying on visual impression alone.
Version: 1.6.0
Date: 2026-07-20
    - Doubled the Ballistic tier's fire rate again (default 3.0/sec -> 6.0/sec).
    - Fixed the turret firing more than 10 consecutive rounds: the burst counter was reset whenever
      the turret's current target changed (e.g. a target dying mid-barrage caused it to auto-
      acquire a new one), so it could fire well past the intended 10 shots before ever reloading.
      The counter is now a simple per-turret total that counts every shot regardless of target
      changes, so it always reloads after exactly mds-ballistic-barrage-size shots.
    - The Ballistic Missile Remote now keeps a manually-directed barrage going for the full 10
      shots even if the chosen target dies early: if the target becomes invalid before the barrage
      completes, the turret automatically re-targets the next nearest enemy near the original
      click point (bypassing the normal bases/worms-only auto-target restriction, since this is
      still part of the same manually-initiated engagement) rather than falling silent.
    - Barrage spread increased and now scales much more noticeably with range: aim deviation
      default 0.05 -> 0.18 radians, giving roughly a biter-base-sized spread (about +/-15 tiles) at
      the tier's minimum range and a much wider spread at extreme range - "more inaccurate the
      further away the target is" falls out naturally from using a fixed angular deviation.
    - Renamed several Ballistic settings so their updated defaults actually take effect on existing
      saves/mod-settings (Factorio doesn't retroactively apply a changed default_value to an
      already-stored setting - this bit the fire-rate/min-range settings in 1.5.3, and the same
      class of issue would otherwise have silently affected barrage size, reload time, and aim/
      range deviation too):
        - mds-ballistic-burst-size -> mds-ballistic-barrage-size
        - mds-ballistic-reload-time -> mds-ballistic-reload-seconds
        - mds-ballistic-direction-deviation -> mds-ballistic-aim-deviation
        - mds-ballistic-range-deviation -> mds-ballistic-distance-deviation
      If you'd previously tuned any of these manually, you'll need to re-tune them under their new
      names (Settings > Mod Settings > Missile Defense Systems) - the old names/values are now
      orphaned and ignored.
Version: 1.5.3
Date: 2026-07-20
    - Fixed the un-linked fire rate/min range settings appearing to "revert" to old values: they
      reused the exact names of this mod's old (pre-1.4.0) "mds-ballistic-fire-rate"/
      "mds-ballistic-min-range" settings. Factorio's stored mod settings survive a setting being
      temporarily removed, so those names picked up years-old stale stored values instead of the
      new defaults. Renamed to "mds-ballistic-burst-fire-rate" (default 3.0/sec) and
      "mds-ballistic-minimum-range" (default 80 tiles), which is a genuinely fresh name and will
      correctly take the new defaults.
    - If your Barrage size / Reload time (Ballistic) settings also look like the old 1.4.0 numbers
      (20 shots / 10 seconds) rather than the new ones (10 / 5), that's the same underlying
      Factorio behaviour - those two settings kept their names across versions, so only their
      default_value changed and an already-stored value won't auto-update. Open Settings > Mod
      Settings > Missile Defense Systems and adjust (or reset) them manually if needed.
Version: 1.5.2
Date: 2026-07-20
    - Fixed another mod load error: the Ballistic Missile Remote used subgroup "military", which
      isn't a real Factorio 2.0 item-subgroup. Now uses the same subgroup as vanilla's own
      artillery-targeting-remote (falls back to "capsule" if that can't be found).
Version: 1.5.1
Date: 2026-07-20
    - Fixed a mod load error: the Ballistic Missile Remote's capsule attack_parameters didn't
      declare an ammo_category, which the game requires even for a capsule action that doesn't
      consume ammo items. Added a dedicated "mds-ballistic-remote" ammo category for it.
Version: 1.5.0
Date: 2026-07-20
    - Fixed the barrage/reload pause never triggering: the shot-fired handler was reading
      args.target_entity, which is nil for a source_effects-triggered event. It now reads
      args.source_entity (the turret that just fired), so the burst counter actually increments
      and the turret correctly pauses to reload after a full barrage.
    - Burst counting is now also tracked per-target: 10 shots means 10 shots at whatever the
      turret is currently locked onto. Switching targets mid-burst restarts the count for the new
      target, rather than counting shots across unrelated retargets.
    - Un-linked the Ballistic tier's fire rate and min range from the Basic/Advanced tiers - they
      are independent startup settings again ("Fire rate (Ballistic)", default 3.0/sec; "Min range
      (Ballistic)", default 80 tiles, matching the previously-confirmed-correct in-game values).
    - Increased the default Ballistic fire rate from 2/sec to 3/sec (even faster, per feedback).
    - Reduced the default barrage size from 20 to 10 shots, and the default reload time from 10 to
      5 seconds.
    - The Ballistic tier's auto-targeting now defaults to only engaging biter base structures
      (spawners and worm turrets), leaving wandering biters/spitters alone. This is built
      dynamically from installed prototypes (via a target_filter on the ammo), so spawner/worm
      entities added by other mods are automatically included too.
    - Added the "Ballistic Missile Remote" item (unlocked with the rest of the Ballistic tier):
      click a target to direct nearby Ballistic turrets to fire on it, overriding the auto-target
      restriction above for that engagement - useful for manually engaging a passing swarm.
    - Ballistic missile/explosive missile ammo now use custom "rocket cartridge" icon art (gold
      tips for standard, orange-red tips for explosive) instead of vanilla's rocket icon.
Version: 1.4.0
Date: 2026-07-20
    - Ballistic tier reworked into a distinct high-tier "barrage" weapon rather than a slow single-shot
      turret, to properly compete with artillery:
        - In-burst fire rate is now locked to double the Basic tier's fire rate.
        - Min range is now locked to double the Advanced tier's min range.
        - Fires missiles in fast barrages of a configurable size (default 20), then pauses to reload
          for a configurable duration (default 10 seconds) before firing again.
        - Missiles now have configurable aim/range inaccuracy (small by default) - a wide-area barrage
          weapon rather than a pinpoint sniper, trading precision for weight of fire.
    - Removed the now-redundant "Fire rate (Ballistic)" and "Min range (Ballistic)" settings, since
      both are derived from the Basic/Advanced tiers' settings (see above). Added new settings for
      barrage size, reload time, and aim/range inaccuracy.
Version: 1.3.3
Date: 2026-07-20
    - Fixed the actual bug behind the Ballistic turret accepting no ammo at all: ammo_category is a
      field on the ammo item itself, not inside ammo_type. The previous code tried to set
      ammo_type.category, which does not exist and silently did nothing, so the new Ballistic
      missile/explosive missile items kept vanilla "rocket" as their category the whole time -
      hence they still worked in the Basic/Advanced turrets and the Ballistic turret matched
      nothing. Both are now fixed: the new ammo is Ballistic-only, and the Ballistic turret only
      accepts it.
    - Tightened the projectile's collision mask to be fully empty (previously it still collided
      with player-built structures). It now cannot be intercepted by anything it flies over -
      trees, rocks, walls, other turrets - and only ever detonates on the specific target it was
      fired at.
Version: 1.3.2
Date: 2026-07-20
    - Fixed: some other mods that rework ammo/turret data in their own data-final-fixes.lua
      (e.g. Combat Mechanics Overhaul) load after this mod and were resetting the Ballistic
      turret's ammo category, leaving both ammo slots showing no accepted ammo at all. Added
      this mod's own data-final-fixes.lua which re-asserts the Ballistic ammo category, the
      turret's attack_parameters, and the arcing projectile collision masks last, so they can
      no longer be overwritten by other mods loading earlier in the sequence.
Version: 1.3.1
Date: 2026-07-20
    - Fixed: on saves where "Ballistic missile defense systems" was already researched before
      updating to 1.3.0, the new Ballistic missile / Ballistic explosive missile recipes never
      unlocked (technology effects only fire the moment research completes, not retroactively),
      leaving the turret with no ammo it could load. Added a migration that force-unlocks both
      recipes for any force that already has the technology researched.
Version: 1.3.0
Date: 2026-07-20
    - Ballistic missile defense system now fires dedicated "Ballistic missile" / "Ballistic explosive
      missile" ammo (same crafting cost as vanilla rocket / explosive rocket, unlocked by the same
      technology) instead of vanilla rocket ammo.
    - These new missiles ignore trees and rocks in flight, similar to how artillery shells fly over
      obstacles. At the Ballistic tier's very long ranges, plain rocket ammo would frequently detonate
      early against scenery sitting on the straight-line flight path instead of reaching its target.
    - Basic and Advanced tiers are unaffected and still use vanilla rocket ammo.
Version: 1.2.1
Date: 2025-11-19
    - Changed internal naming convetion to better support factoriopedia.
    - Implementation was adjusted regarding the map revealing missiles. Multiple action_delivery items
      were causing compatibility issues with exiting mods like the 'spidertron loadout' or 
      'Enemy Race Manager (ERM) - Red Army'
    - Updated README.md
Version: 1.2.0
Date: 2025-11-17
    - Updated for Factorio 2.0 API
    - Missiles (normal. explosive and nuclear) were adjusted to reveal the map where they shoot.
      This was added so in case the range is longer than visible territory, the turrets will eventually
      reveal the map based on enemy activity. Also. nor seeing a nuclear blast shot from ballistic
      launcher was a crime.
    - Fixed typo of mod description changing 2 -> 3
Version: 1.1.3
Date: 2023-10-25
    - advanced missile turret can damage walls with explosive missiles. To avoid it,
      adjusted the min and max range of advanced missile turret. The arc is also adjusted
      for similar reason. 
      Also adjusted min and max range of the other turrets to be in line with advanced.
Version: 1.1.2
Date: 2023-10-23
    - fixed the switched up localization text for min and max range mod settings
Version: 1.1.1
Date: 2023-10-23
    - Updated 'changelog'
Version: 1.1.0
Date: 2023-10-23
    - Got rid of the recolored ballistic missile GFX
    - The advanced missile silo is the new ballistic missile silo GFX
    - Incorporated new GFX for advanced missile silo (one from 'Additional turrets')
    - Updated 'readme'
Version: 1.0.2
Date: 2023-10-23
    - Added configuration settings for firing pattern and arc degree
    - reordered the configuration settings: fire-pattern, arc-degree, min-range, max-range, fire-rate
    - reordered the inventory items: basic, advanced, ballistic
Version: 1.0.1
Date: 2023-10-21
    - change thumbnail
Version: 1.0.0
Date: 2023-10-21
    - initial version
    - 3 types of missile turrets with varying roles:
        - close/wide range quick firing missile platform
        - long/narrower range slower firing missile platform
        - extremely long range/very narrow range really slowly firing missile platform