[2.0.18] Turret rotates past its firing arc limit.

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
User avatar
wodzu93
Inserter
Inserter
Posts: 35
Joined: Thu Apr 20, 2017 3:57 pm
Contact:

[2.0.18] Turret rotates past its firing arc limit.

Post by wodzu93 »

Turret that has limited firing arc, no turret base direction (turret_base_has_direction = false) and matches any of these situations:
  • turn_range >= 1/4 AND placeable in four directions (N, E, S, W)
  • turn_range >= 1/8 AND placeable in eight directions (N, NE, E, SE, S, SW, W, NW) ("building-direction-8-way" flag)
  • turn_range >= 1/16 AND placeable in sixteen directions (has "building-direction-16-way" flag)
will shift its facing direction, and therefore firing arc, when tracking a target sufficently close to the left/right edge of it's arc, and STAYS facing that direction after target leaves or dies.

Here's the demonstration, with an ammo turret prototype with:
  • "building-direction-8-way"
  • turn_range = 1/3 (exceeds 1/8 for 8-way directional placing)
  • turret_base_has_direction = false
Turret is placed facing NW, and after leading a biter group past it, rotates towards NE and stays facing that direction, way past it's supposed firing angle. This would ruin any defense line after any attack, since it no longer faces the desired direction.
Anim2D.gif
Anim2D.gif (23 MiB) Viewed 310 times


Note, changing "turret_base_has_direction" to "true" fixes this behaviour, but has a side effect of rotating the collision box of the turret base, which is not desired for my use case.
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: 5341
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [2.0.18] Turret rotates past its firing arc limit.

Post by Klonan »

wodzu93 wrote: Thu Nov 14, 2024 7:49 pm Note, changing "turret_base_has_direction" to "true" fixes this behaviour, but has a side effect of rotating the collision box of the turret base, which is not desired for my use case.
Well, unfortunately that flag is exactly what control this behavior, so this is more of a feature request than a bug report, or at least, a currently unsupported case

I will move this to modding interface requests
Post Reply

Return to “Modding interface requests”