Target masks for active-defense-equipment and artillery turret

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
Filter Inserter
Filter Inserter
Posts: 896
Joined: Sun Oct 14, 2018 8:13 am

Target masks for active-defense-equipment and artillery turret

Post by Pi-C »

Most entities have a trigger_target_mask. Most turrets have attack_target_mask and ignore_target_mask (the artillery turrets apparently don't). This way, it's easy to make new turrets that will attack only specific entities, or make entities that won't be attacked at all.

Unfortunately, excluding entities from being attacked only works for automated killing (it won't if you use artillery turrets). But that leaves out the human factor! Players may equip some Personal Laser Defense which will automatically shoot at every enemy entity in its range. From this perspective, PLD actually are a kind of mobile turret you carry in your backpack.

I would like to be able to assign attack_target_mask and ignore_target_mask to PLDs (or rather: entities based on the active-defense-equipment prototype) as well. Currently, PLD breaks my mod because it attacks things it isn't meant to attack as it can't damage them anyway. If I could add these entities to the PLD's ignore_target_mask, this would be a quick solution to half of my problems.

The other half is that artillery turrets also shoot at entities they shouldn't shoot at. I've just noticed that artillery turrets attacking my dummies is the expected behavior because my dummies are based on entity-with-force, which is considered a military structure according to this. In this light, adding attack_target_mask and ignore_target_mask to artillery turrets as well does make sense because mods may use simple-entity-with-force for doing their magic.

So, if it's possible in any way, please add attack_target_mask and ignore_target_mask to the properties of the active-defense-equipment and the active-defense-equipment prototypes! :-)
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!

Post Reply

Return to “Modding interface requests”

Who is online

Users browsing this forum: No registered users