Synchronized Artillery Strikes - Smart Area Targeting & Carpet Bombing

by indrekk

Area-select artillery tool with synchronized shell landing times, smart AoE shot placement, and automatic shell count calculation. The most time- and ammo-efficient way to kill biters yet!

Tweaks
10 days ago
2.0
101
Combat
Owner:
indrekk
Source:
N/A
Homepage:
N/A
License:
The Unlicense (Public Domain)
Created:
11 days ago
Latest Version:
0.7.0 (10 days ago)
Factorio version:
2.0
Downloaded by:
101 users

Default Factorio artillery has two problems. First, when multiple turrets fire at the same area, rounds arrive over a wide time window because each turret is at a different distance. Biters scatter after the first impact, and follow-up rounds hit empty ground. Second, there is no efficient way to order a full strike against a biter-infested region without clicking dozens of times.

This mod provides an area selection tool that solves both problems. Select a region, and the mod handles the rest: target identification, shot placement, ammunition calculation, and precision timing so that all rounds impact simultaneously.

HOW IT WORKS:

Drag select an area using the toolbar shortcut. The mod:

  1. Scans the area for all spawner nests, worms, and other enemy structures.

  2. Optimizes shot placement using each shell's area of effect. When two or three structures are close enough together, the mod places a single shot at their midpoint or centroid instead of wasting separate rounds on each one. This can significantly reduce ammunition expenditure compared to one-shot-per-target approaches.

  3. Calculates the exact number of shells needed per fire position based on the toughest structure's actual health, your force's artillery damage research level, and the target's explosion resistance. No wasted rounds on structures that are already dead.

  4. Runs a simulated annealing solver to assign targets across all available turrets so that every shell lands within the tightest possible time window. Distant turrets fire first. Close turrets hold and fire later. Rounds converge on the target area simultaneously.

  5. Executes the fire mission with muzzle flash, smoke, and firing sound at each turret.

Alt-drag provides a carpet fire mode that blankets the selected area with evenly spaced shots, also with synchronized timing.

GOOD TO KNOW:

  • The mod assumes turrets are continuously resupplied by your logistics network. Ammo is consumed from each turret at the moment of fire.
  • If a turret runs dry mid-mission, the mod automatically reassigns that shot to another turret at a similar distance, preserving synchronization.
  • Selecting an overlapping area won't waste shells on structures already targeted by an active mission. Tracking expires the moment the last shell lands, so surviving structures become immediately re-targetable.
  • Large selections are automatically split into spatial salvos for fast computation. You can select huge areas without freezing the game.
  • Works with both artillery turrets and artillery wagons.
  • Normal artillery remote behavior is unchanged.
  • Barrel rotation animation is not available due to engine limitations. Rounds still land on time.

SETTINGS:

All configurable in Mod Settings:

  • Overkill factor: multiplier on shell count (1.0 = exact, increase if structures occasionally survive)
  • Shell base damage: base damage before research bonuses (800 for Space Age, 500 for vanilla)
  • Max shells per mission: safety cap for very large selections
  • Carpet grid spacing: tile distance between carpet mode shots
  • Solver iterations: optimization passes per salvo (500 default, increase for tighter TOT)
  • Track targeted structures: prevents duplicate shells on overlapping selections

TECHNICAL NOTES:

  • Position optimization uses damage radius read directly from the artillery projectile prototype, so it adapts automatically to modded shells with different AoE. Merges clusters of 2 or 3 nearby structures into single shots at the optimal midpoint/centroid. Triple merging is automatically disabled for selections over 100 structures to maintain performance.
  • Shell count calculation reads entity health, explosion resistance values, and force ammo damage modifiers at mission time. No hardcoded assumptions about how many shells a spawner "should" take.
  • Shot scheduling accounts for your force's artillery fire rate research, so upgraded turrets fire faster sequences.
  • If ammo runs out on a turret mid-mission, the fallback searches a cached turret list (no map rescan) for the turret with the closest matching distance, minimizing flight time deviation from the original firing solution.
  • Large target lists are split into spatial salvos of ~100 targets each. Each salvo is solved and scheduled independently. This keeps computation fast regardless of selection size.
  • The solver minimizes the maximum internal landing-time spread across all turrets. Within each turret, targets are ordered by descending flight time so that the cooldown between shots compensates for shorter distances. The mathematical minimum spread is achieved when all turrets' landing windows can be aligned by adjusting per-turret fire offsets.

End of briefing. Splash is worth watching.

P.S. Let me know if you have suggestions or feature requests. I'm not super skilled at modding but will do my best!