Cannon Turret

by VortiK

Adds a cannon mounted turret and specific cannon shell magazine ammunition that behave like the tank shells without friendly fire colliding. Bonus setting use vanilla cannon shells and to make custom ammo explosions not do friendly damage.

Content
5 months ago
0.15 - 2.0
32.9K
Combat

i [CAN'T FIX SO FAR] Shell/magazine range issue with Hero Turret mod

5 months ago

The range of the turrets is greater than the magazines, causing shots fired at distant enemies to fall short. This is amplified when using mods like Hero Turrets that can further increase the range of the turrets through 'combat experience'. Is there a way that the range limit on ammunition can be altered, or removed entirely?

The vanilla shells have a range of 50, and the magazines from this mod are 30, with the cannon turret having a base range of 35.

5 months ago

Hello, thank for your message. This might be an oversight I'll take a look when I can to fix this.

5 months ago

After some testing, the cannon magazine projectiles have the same range as vanilla cannon projectile (the prototype is actually copied to be the same !) and they are both 30 max_range.

I've tested a Legendary Cannon Turret with a 52 range and it could hit target at is max range. So I can't reproduce the issue you are facing. It is probably an other mod you mentionned that changes the turret or projectiles and not the Cannon Turret Magazine ammo which make it different.

If I remove the max range, the projectile will fly up the the default max_range of 1000 which would be kinda weird https://lua-api.factorio.com/latest/types/ProjectileTriggerDelivery.html#max_range

https://github.com/wube/factorio-data/blob/d0e464ce7504d7c7dab3be62cd1d97d55d7b4748/base/prototypes/item.lua#L3026C11-L3026C20

Nevertheless I've increased the max_range of magazine ammo from 30 to 35 and it should feel more consistant at max range, let me know how it run !

5 months ago
(updated 5 months ago)

It turns out that Lex's Aircraft increases the base shells' range to 50, thanks for the heads up on getting me to double check my other mods. :D

In testing, the increased magazine range does make a slight difference, but the underlying issue persists even when removing all mods to just Hero Turrets, & Cannon Turret. It's as though the shots are automatically detonating when they hit 30-35 tiles regardless of turret range.

https://i.gyazo.com/2d53826cbd729c0ddd3e405a50d7ffa1.gif
Highlighted turret has range of 56 tiles
https://mods.factorio.com/mod/HeroTurretRedux

Hope this info is helpful.

Edit: I don't have space age, so can't test the quality variations.

5 months ago

Hello, I can reproduce the issue and indeed Hero turret increase the range of turrets as they level up, however ammo still has the same max range, hence the problem.

I'm not sure how to fix this, in theory the hero turret mod should update the ammo to have the same range as the turret that's firing it, but I don't see a simple solution for now.

5 months ago

So I've tested a bit more and removing max_range on ammo will indeed make them fly up to the default of 1000 tiles. I could increase the max range to something like 50-60 but it would look weird to have ammo hit so farther when it miss.

I've also tested to make hero turret a soft dependancy but it doesn't fix the issue. What is surprising is that Quality increases turret range and it applies to ammo automatically but not for Hero turret mod.

So sorry but for now I can't fix this.

5 months ago

Quite alright, thanks for looking into it. Love the mod regardless, keep up the amazing work!

New response