Page 1 of 1

Turret "Prime for unlisted targets" setting

Posted: Fri Jan 10, 2025 4:50 pm
by Hellpest
TL;DR
Subsetting for turrets beneath "Ignore unlisted targets" that will cause the turret to wake for and track unlisted targets without actually firing at them, making them immediately ready for a listed target without going through the activation sequence.

What?
Like with, for example, asteroid collectors having a "Read hands" circuit subsetting that is only enableable when "Read contents" is enabled, turrets should have a "[Wake for / Prime for / Track] unlisted targets" subsetting of "Ignore unlisted targets". This setting will cause the turret to ready and track any target that enters it's range - like a turret that is out of ammo - but to not fire on targets that are not included in it's priority list.

Why?
On space platforms you are encouraged to use multiple types of turret in tandem - for example, using laser turrets on small asteroids to save ammo for gun turrets on mediums. However, as shown in the screenshot below, what seems like a sensible combination ends up being more convoluted in practice.
Image
The screenshot shows a gun turret having just destroyed a medium asteroid, then immediately all of the small asteroids (hence the collector arms) before the laser turrets have even started to turn. Whilst the first thought may be to just disable the gun turret from targetting small asteroids, this means you are completely defenseless whilst the laser turrets do their activation animation, then turn to target the asteroids. At speeds of ~300km/s and above, this leaves enough time for some asteroids to impact your ship.

Whilst the above example is one that can be worked around by, ie, having laser turrets target medium asteroids (waste power) or gun turrets target small (waste ammo, laser turrets are redundant), this is the lowest-risk example of where this behaviour causes issues. Faster ships have this issue much more severely - at the extreme end I've built a ship fast enough where if I turn on exclusive targetting on my gun turrets, the ship will instantly disintegrate as the laser turrets cannot hit a single small asteroid, and the influx is high enough that the defenses cannot be rebuilt or repaired in time. The delay also causes worse response times in most combat scenarios where exclusive priority is set - if you have a wave of biters targetting your walls and laser turrets prioritising spitters, the spitters will get much closer if the laser turrets are set to exclusive priority as they'd otherwise prime as soon as the faster biters enter their attack radius; I expect this is an even larger issue when it comes to mods that add more unit and turret types.

A similar issue just got fixed as a bug with railguns (123146): railguns would replay their charge-up animation whenever a target was killed, and therefore never fire if their targets kept being killed (ie, if they didn't exclusively target huge asteroids). However, all turrets essentially have this behaviour when a target first enters their targetting radius - a stream of medium asteroids entering the targetting radius of laser turrets set to small and gun turrets set to medium only will always either have the laser turrets do nothing and gun turrets waste ammo, or the lasers waste energy on doing very little against medium asteroids.

This would also allow much more precise circuit control of turrets - if for whatever reason you wanted to decide exactly when or how often a turret fires, you would simply have to pulse the target signal (or pulse off ignore unlisted - though I could see this causing issues for the subsetting) and the turret would be immediately able to fire. Besides several niche and aesthetic uses, this would be useful in particular as an emergency "we're taking damage, throw everything we have at them" activation for backup turrets, without the activation sequence allowing potentially disasterous damage in the meantime.

In my opinion, this should be a setting and not default behaviour, as there are also times you do not need a turret to point at everything - a rocket turret tracking every medium and small asteroid would look kinda strange, if not a amusing parallel to AA cannon behavour irl.