Hello,
I've been experimenting with setting the turn_range under attack_parameters on ammo-turrets.
It works perfectly if turn_range is set at .25 or lower. The turret will only engage and fire at target enemies that fall within the green.
However, if the turn_range is larger than .25, the turret can rotate itself if the target would fall within the green area from various orientations.
Here is a quick test with a gun turret with turn_range set to .5. There is a potential target circled in red.
I plop the turret facing north. As soon as it engages the target, it rotates itself to the west, and remains at that orientation after the target is destroyed.
Perhaps there is another setting I'm over looking? It would be great if I could get turn_range to work the same way on ammo-turrets as it does on fluid-turrets.
Thanks!
ammo-turret turn_range Improvements
Re: ammo-turret turn_range Improvements
turn_range was never meant to be used on a turret that's meant to have 360 degree orientation and as such has weird quirks like you see.
If you want to get ahold of me I'm almost always on Discord.
Re: ammo-turret turn_range Improvements
Maybe a 'can_change_orientation' prototype flag would be enough to resolve this, such that is the flag is false, the turret will always return to its original directionRseding91 wrote:turn_range was never meant to be used on a turret that's meant to have 360 degree orientation and as such has weird quirks like you see.
Re: ammo-turret turn_range Improvements
That wouldn't work. The fluid turret stores an extra property to remember the original direction. Ammo turrets do not.Klonan wrote:Maybe a 'can_change_orientation' prototype flag would be enough to resolve this, such that is the flag is false, the turret will always return to its original directionRseding91 wrote:turn_range was never meant to be used on a turret that's meant to have 360 degree orientation and as such has weird quirks like you see.
If you want to get ahold of me I'm almost always on Discord.
Re: ammo-turret turn_range Improvements
I hope you can implement such extra property for ammo turrets, maybe even for vanilla Factorio. I remember the first day when I started playing with turrets, I felt weird that some turrets changed their directions, until I figured out that happened after they engaged enemies. You know there are people who love turrets to face outside from their base, just like they are really protecting the base instead of monitoring the base. If ammo turrets can return to their original direction when back to idle, we will be much happier.Rseding91 wrote:That wouldn't work. The fluid turret stores an extra property to remember the original direction. Ammo turrets do not.Klonan wrote:Maybe a 'can_change_orientation' prototype flag would be enough to resolve this, such that is the flag is false, the turret will always return to its original directionRseding91 wrote:turn_range was never meant to be used on a turret that's meant to have 360 degree orientation and as such has weird quirks like you see.
Re: ammo-turret turn_range Improvements
For 0.15, I added "turret_base_has_direction" to all three turret entity types, but it has to be always true for fluid-turret, because of pipe connections. When true, turn_range will work properly and turret will remember its original direction and will always return to it.
Re: ammo-turret turn_range Improvements
Thank you very much guys!
I really appreciate the devs taking time to look into this.
I've been experimenting with a mod that would replace the 360 degree gun turrets with concrete bunkers with a narrow lane of fire. I've added line of fire to the bullets, so a player would need to carefully design bunker layouts to maximize firing areas while minimizing friendly fire.
This will also be a nice feature to have for modded turrets that shoot rounds with a high area of effect, so players can avoid friendly fire.
I'm super pumped for the other new features in .15, especially the new turret control features. Thanks again guys for listening to player input!
I really appreciate the devs taking time to look into this.
I've been experimenting with a mod that would replace the 360 degree gun turrets with concrete bunkers with a narrow lane of fire. I've added line of fire to the bullets, so a player would need to carefully design bunker layouts to maximize firing areas while minimizing friendly fire.
This will also be a nice feature to have for modded turrets that shoot rounds with a high area of effect, so players can avoid friendly fire.
I'm super pumped for the other new features in .15, especially the new turret control features. Thanks again guys for listening to player input!