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!
Target masks for active-defense-equipment, artillery turret and spidertron
Target masks for active-defense-equipment, artillery turret and spidertron
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
Re: Target masks for active-defense-equipment, artillery turret and spidertron
An addition: Spidertrons don't have ignore_target_mask and attack_target_mask either, so they attack dummies from Water Turret as well although they can't hurt them. So it would be great if they could get target masks as well.
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
-
- Manual Inserter
- Posts: 4
- Joined: Tue Nov 17, 2020 10:11 pm
- Contact:
Re: Target masks for active-defense-equipment, artillery turret and spidertron
+1
I just found this request as I had the same issue with the artillery turret attacking enemy "dummy target entities" of the simple-entity-with-force prototype. I could also use the combat-robot or land-mine prototype workaround to keep the artillery from firing at the dummy entities but just realized the laser defense and spidertron issue due to this post.
After a little more investigation I also found the same issue with combat-robots and the automatic player targeting (pistol, SMG) shooting at the dummy entities but there is no option to set the ignore_target_mask or attack_target_mask and the unit type prototype workaround does not work in this case like for the artillery.
I think it would be great to add ignore_target_mask and attack_target_mask to the gun prototype as it would solve the player, artillery and spidertron issue (all use gun prototypes to shoot) as well as to the combat-robot and active-defense-equipment.
This would enable mods to use the simple-entity-with-force prototype as targetable military enemy structure (to do their magic ) and would complete the target_mask integration for the rest of the automatically attacking prototypes (hope I did not miss any). I also think this would open up interesting options for PvP mods.
so in summary:
please add ignore_target_mask and attack_target_mask to prototypes
> gun
> active-defense-equipment
> combat-robot
TY!
I just found this request as I had the same issue with the artillery turret attacking enemy "dummy target entities" of the simple-entity-with-force prototype. I could also use the combat-robot or land-mine prototype workaround to keep the artillery from firing at the dummy entities but just realized the laser defense and spidertron issue due to this post.
After a little more investigation I also found the same issue with combat-robots and the automatic player targeting (pistol, SMG) shooting at the dummy entities but there is no option to set the ignore_target_mask or attack_target_mask and the unit type prototype workaround does not work in this case like for the artillery.
I think it would be great to add ignore_target_mask and attack_target_mask to the gun prototype as it would solve the player, artillery and spidertron issue (all use gun prototypes to shoot) as well as to the combat-robot and active-defense-equipment.
This would enable mods to use the simple-entity-with-force prototype as targetable military enemy structure (to do their magic ) and would complete the target_mask integration for the rest of the automatically attacking prototypes (hope I did not miss any). I also think this would open up interesting options for PvP mods.
so in summary:
please add ignore_target_mask and attack_target_mask to prototypes
> gun
> active-defense-equipment
> combat-robot
TY!
- Deadlock989
- Smart Inserter
- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
Re: Target masks for active-defense-equipment, artillery turret and spidertron
+1 for ignore_target_mask at least on ADEs. It is currently impossible to get them to ignore entities that a turret entity equivalent ignores.
Re: Target masks for active-defense-equipment, artillery turret and spidertron
+1, bump. I made mod with harder walls and siege turrets... But walls MUST be military target in order to get even considered and PLD now focuses walls that have high health...
-
- Burner Inserter
- Posts: 14
- Joined: Mon Aug 24, 2020 1:02 pm
- Contact:
Re: Target masks for active-defense-equipment, artillery turret and spidertron
Okay, I was able to make an ammo-turret that looks like the artillery turret. It doesn't have the barrel recession animation, but behind all the muzzle fire, shell casing, explosive sound effect, and the artillery shell itself, I don't think you'd notice.