[boskid][2.1.20] Electric turret firing projectiles can suddenly drain its buffer
Posted: Tue Sep 29, 2026 12:51 pm
I'm not familiar with this part of the API concerning turrets, so I apologise if this ends up being programmer error.
I've created a reproduction mod that defines a new "Zap turret". This turret
I expect buffer energy to not be expended if the turret is unable to fire or needs to cancel out of its animation.
-------------------------------------------------
You can see a second bug by turning on the mod's startup setting "Enable exact-sized buffer bug". This lowers the energy buffer to 10MJ, exactly equal to the energy cost of the projectile.
This causes the Zap turret to track the enemy, but it can never fire despite having the required energy.
-------------------------------------------------
I do not believe either of these behaviours occurred in Factorio 1.1.110.
I've created a reproduction mod that defines a new "Zap turret". This turret
- Fires an exploding ball projectile
- Has a slow rate of fire and an expensive energy cost per projectile
- Has a long, limited-angle range with a minimum range (similar to flamethrower turrets)
- The game is in Editor mode, paused and ready to be started
- Two Zap turrets are behind a wall, as the front-line of defence
- Four standard Laser turrets are behind them, to serve as backup
- A group of biters are spawned to the east, ready to attack
- Load into the save file
- Advance time by 270 ticks. Keep an eye on the southern Zap turret
- Near the end of this time period, this turret's buffer will drain completely, but it will not fire any projectile.
- Advance time by a few more ticks and watch the northern Zap turret, and the same thing will happen to it.
I expect buffer energy to not be expended if the turret is unable to fire or needs to cancel out of its animation.
-------------------------------------------------
You can see a second bug by turning on the mod's startup setting "Enable exact-sized buffer bug". This lowers the energy buffer to 10MJ, exactly equal to the energy cost of the projectile.
This causes the Zap turret to track the enemy, but it can never fire despite having the required energy.
-------------------------------------------------
I do not believe either of these behaviours occurred in Factorio 1.1.110.