Artillery Time on Target synchronization

by indrekk

Groups artillery fire missions and synchronizes shell landing times using simulated annealing optimization.

Tweaks
an hour ago
2.0
0
Combat
Owner:
indrekk
Source:
N/A
Homepage:
N/A
License:
The Unlicense (Public Domain)
Created:
6 hours ago
Latest Version:
0.4.0 (an hour ago)
Factorio version:
2.0
Downloaded by:
0 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 and worms.

  2. Optimizes shot placement using each shell's area of effect. When structures are close enough together, the mod places a single shot at the midpoint instead of wasting a round on each one individually. 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 target 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.
  • 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.

TECHNICAL NOTES:

  • Position optimization uses damage radius read directly from the artillery projectile prototype, so it adapts automatically to modded shells with different AoE.
  • 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.
  • 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.