[Request] Take slowdown into account when calculating turret leading

User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2529
Joined: Fri Nov 06, 2015 7:41 pm

[Request] Take slowdown into account when calculating turret leading

Post by Deadlock989 »

Hi,

This is less of an interface request and more of a game mechanics request, I guess, but anyway.

You can use lead_target_for_projectile_speed to make a turret (worm, etc.) fire ahead of their target so that the projectile or stream hits the location the target will be once the projectile gets there. It works really well for projectiles with a constant speed - except that slowdown stickers are not taken into account. The turret/worm still fires as if the target is moving at full speed, so it leads too far ahead for the duration of the slowdown.

This actually has an implication for the vanilla game. Spitters and worms fire a missile which applies a slowdown if it hits. It means that a successful hit means all subsequent missiles are much more likely to miss the player.

My own use case is that I have an electric turret that does very little damage but applies an area-effect slowdown field. The idea is you use it to get a better fix on running biters - you webify them, then conventional turrets take them out. Unfortunately it has the opposite effect - slowing them down makes it much more likely that any projectile turrets will miss.

Could the algorithm for turret firing take slowdown into account?
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5289
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [Request] Take slowdown into account when calculating turret leading

Post by Klonan »

The target leading will take into account the slowdown modifier in the next release
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2529
Joined: Fri Nov 06, 2015 7:41 pm

Re: [Request] Take slowdown into account when calculating turret leading

Post by Deadlock989 »

That's brilliant. Thanks very much.
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2529
Joined: Fri Nov 06, 2015 7:41 pm

Re: [Request] Take slowdown into account when calculating turret leading

Post by Deadlock989 »

Tested this in 0.17.38, works perfectly now. Thanks again.
Post Reply

Return to “Implemented mod requests”