Page 1 of 1

Target masks for active-defense-equipment, artillery turret and spidertron

Posted: Sat Oct 17, 2020 10:23 am
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! :-)

Re: Target masks for active-defense-equipment, artillery turret and spidertron

Posted: Fri Oct 30, 2020 3:39 pm
by Pi-C
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. :-)

Re: Target masks for active-defense-equipment, artillery turret and spidertron

Posted: Wed Nov 18, 2020 10:56 pm
by JonnyOnSeSocks
+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!

Re: Target masks for active-defense-equipment, artillery turret and spidertron

Posted: Mon Aug 02, 2021 5:12 pm
by Deadlock989
+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

Posted: Sat Apr 30, 2022 3:58 pm
by sh4dow
+1

Re: Target masks for active-defense-equipment, artillery turret and spidertron

Posted: Sun Feb 05, 2023 9:45 pm
by Rafiz
+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...