[Klonan] [2.0.28] Target leading interferes with range bonuses in turrets

This subforum contains all the issues which we already resolved.
User avatar
wodzu93
Inserter
Inserter
Posts: 35
Joined: Thu Apr 20, 2017 3:57 pm
Contact:

[Klonan] [2.0.28] Target leading interferes with range bonuses in turrets

Post by wodzu93 »

When an ammo turret uses target leading functionality AND its ammo is both non-homing and has a range bonus, projectiles will detonate prematurely when reaching base maximum range of the turret. If I remove "lead_target_for_projectile_speed = 1" from the turret prototype, projectiles correctly reach the target in the extended range. This issue was introduced in Factorio version 2.0.24 where turrets can now receive ammo range bonuses (modifier did nothing for them before that point).

Attached savefile (Test.zip) and a mod for the testing. Load the cannon ammo from the character inventory into the turrets to recreate the problem. Then open the turret prototype (its "w93-lcannon-turret"), remove "lead_target_for_projectile_speed = 1" and try the save again, shells shoud reach the nest now.

Mod modifies cannon ammo to play nice with its turrets by doing the following changes:

Code: Select all

	data.raw["ammo"]["cannon-shell"].ammo_type.target_type = "position"
	data.raw["ammo"]["cannon-shell"].ammo_type.action.action_delivery.max_range = nil
	data.raw["ammo"]["cannon-shell"].ammo_type.action.action_delivery.direction_deviation = nil
	data.raw["ammo"]["cannon-shell"].ammo_type.action.action_delivery.range_deviation = nil
	data.raw["projectile"]["cannon-projectile"].force_condition = "not-same"
	data.raw["projectile"]["cannon-projectile"].direction_only = false
	data.raw["projectile"]["cannon-projectile"].hit_collision_mask = {layers={object=true, player=true, train=true, trigger_target=true}}
Screenshot showing the issue:
Screenshot.png
Screenshot.png (4.17 MiB) Viewed 437 times
Attachments
Test.zip
(1.95 MiB) Downloaded 11 times
scattergun_turret_8.0.7.zip
(9.34 MiB) Downloaded 10 times
IT student that likes modding in his free time.

Shameless self-promotion:
http://steamcommunity.com/sharedfiles/f ... =555765765
http://steamcommunity.com/sharedfiles/f ... =575758597
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5311
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [Klonan] [2.0.28] Target leading interferes with range bonuses in turrets

Post by Klonan »

Thanks for the report,

This is fixed for 2.0.30
Post Reply

Return to “Resolved Problems and Bugs”