[1.1.36] Cannon/Tank Gun Projectiles Ignore Ammo's range_modifier
Posted: Sat Jul 17, 2021 10:25 pm
Story time: I was messing with the True Nukes mod, and found that the nuclear cannon shells (which have a range modifier of 200%) were not actually firing any farther than the normal cannon shells.
So, I made a mod that takes the normal cannon shells and adds range modifiers, to see if it was just True Nukes being goofy. The issue persisted...
I then tested it with rockets and firearm ammo, and found that they worked how you would expect, and changed how far the bullet/rocket can travel by the range_modifier property.
I also added K2 Turrets, because that mod has turrets which can fire rockets and cannon shells, to see how cannon shells behave in a turret.
It turns out that the cannon shells with range modifiers do modify the range of the turret they're in (in this case the Railgun from K2 Turrets), but not the distance that the projectile travels, so it was targeting enemies, but couldn't hit them because the cannon projectile didn't live long enough.
For giggles, I made a cannon shell that has 50% range, and threw it in the tank, only to discover that it still travelled the same distance as a cannon shell with 100% range.
Essentially this is what it comes to: Cannon projectiles ignore the range_modifier property and always travel the unmodified range of the gun they're being fired out of, when you would expect their range to change in relation to the range_modifier property.
I've attached a video of me demonstrating this. There's also the attached log file.
Yes, I have other mods installed in the video, but the issue is the same when the only active mod is the one that adds modified cannon shells.
(here's the mod: https://mods.factorio.com/mod/long_range_ammo)
Video:
So, I made a mod that takes the normal cannon shells and adds range modifiers, to see if it was just True Nukes being goofy. The issue persisted...
I then tested it with rockets and firearm ammo, and found that they worked how you would expect, and changed how far the bullet/rocket can travel by the range_modifier property.
I also added K2 Turrets, because that mod has turrets which can fire rockets and cannon shells, to see how cannon shells behave in a turret.
It turns out that the cannon shells with range modifiers do modify the range of the turret they're in (in this case the Railgun from K2 Turrets), but not the distance that the projectile travels, so it was targeting enemies, but couldn't hit them because the cannon projectile didn't live long enough.
For giggles, I made a cannon shell that has 50% range, and threw it in the tank, only to discover that it still travelled the same distance as a cannon shell with 100% range.
Essentially this is what it comes to: Cannon projectiles ignore the range_modifier property and always travel the unmodified range of the gun they're being fired out of, when you would expect their range to change in relation to the range_modifier property.
I've attached a video of me demonstrating this. There's also the attached log file.
Yes, I have other mods installed in the video, but the issue is the same when the only active mod is the one that adds modified cannon shells.
(here's the mod: https://mods.factorio.com/mod/long_range_ammo)
Video: