Artillery turret targeting logic control

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
User avatar
Reika
Filter Inserter
Filter Inserter
Posts: 587
Joined: Tue May 19, 2015 1:56 am
Contact:

Artillery turret targeting logic control

Post by Reika »

In particular, the ability to add or remove entity types from the "valid targets" (so I can make them ignore lone worms, or also target some modded entity), the ability to prioritize bases relative to one another (eg spitter spawners over biter ones), or the like.

An additionally useful thing would be a way to prevent it from firing upon the same base twice (my new AoE for it makes it "waste" shots as it does not appear to compensate for the fact that shells now kill everything in the vicinity, eliminating the need for additional rounds into adjacent spawners).
Image
Qon
Smart Inserter
Smart Inserter
Posts: 2164
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: Artillery turret targeting logic control

Post by Qon »

Reika wrote: Sat Jul 25, 2020 9:21 pm An additionally useful thing would be a way to prevent it from firing upon the same base twice (my new AoE for it makes it "waste" shots as it does not appear to compensate for the fact that shells now kill everything in the vicinity, eliminating the need for additional rounds into adjacent spawners).
The current artillery does avoid targeting things that will die to the explosion AoE, and fires again before the shots has landed on targets a bit away from the first. It can also fire multiple shots on the same target if necessary to ensure killing it, and retargets before it dies but only firing (maybe about) as many shells at it as necessary to kill it (Light Artillery mod has weaker shells if you want to see it). So the game does account for damage done when it fires (old laser turrets with heat seeking laser bullets did this as well).

So you are saying it uses the constant as predictive radious and doesn't account for the changes your mod does? Sounds like a bug and not a lacking interface, if you are actually just increasing the damage radious and simple things like that.
If you are applying explosions after the hit with Lua then obviously the game can't account for it and some interface to tell the game about the predicted radius and damage would be necessary.
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
User avatar
Reika
Filter Inserter
Filter Inserter
Posts: 587
Joined: Tue May 19, 2015 1:56 am
Contact:

Re: Artillery turret targeting logic control

Post by Reika »

Qon wrote: Sun Jul 26, 2020 11:24 am So you are saying it uses the constant as predictive radious and doesn't account for the changes your mod does?
Effectively yes. I used the prototypes to add a radius-15 AoE of damage (no scripting) and it does indeed fire shots at "will already be dead from the first hit" spawners nearby. Not all of them - I can see there is some kind of radius prediction - but definitely some.
Image
Qon
Smart Inserter
Smart Inserter
Posts: 2164
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: Artillery turret targeting logic control

Post by Qon »

Then report it as a bug. But I still think a mod interface request is also warranted, because if you want to use the artillery turret logic but spawn custom effects on the explosion with Lua then having some way to tell Factorio what the actual eventual radius and damage that will be applied by you seems like a good idea.
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
Post Reply

Return to “Modding interface requests”