Reactive Target still gest damageSolved

I am not sure if this is intended, since you "want" to damage the reactive target.
I wanted to forbid damage to the reactive target:

"players cannot hurt traps",​

--- and

{
      "name": "traps",
      "members": "AutoTurret, BearTrap, FlameTurret, Landmine, GunTrap, TeslaCoil, sam_site_turret_deployed, FireBall, ReactiveTarget, reactivetarget_deployed",
      "exclusions": ""
    },

I traced and it "should" work. He finds the rule and says the damage is not allowed:

======================
==  STARTING TRACE  ==
==  21:50:11.87898  ==
======================
 From: BasePlayer, player
 To: ReactiveTarget, reactivetarget_deployed
   No shared locations (empty location) - no exclusions
 No exclusion found - looking up RuleSet...
 Using RuleSet "default"
 DamageType is suicide; blocked? false; continue processing

======================
==  STARTING TRACE  ==
==  21:50:11.88299  ==
======================
 From: BasePlayer, player
 To: ReactiveTarget, reactivetarget_deployed
   No shared locations (empty location) - no exclusions
 No exclusion found - looking up RuleSet...
 Using RuleSet "default"
 No match in pre-checks; evaluating RuleSet rules...
  Initator EntityGroup matches: players
  Target EntityGroup matches: traps
   Evaluating Rules...
    Checking direct initiator->target rules...
     Evaluating "players->traps"...
      Match found; allow damage? False

The second entry says damage is not allowed. I dunno what the first one wants me to tell.
But the reactive target infact gets damage ingame.
Anyone knows?

hi, not intended. post the whole config as a code sample or from pastebin

I am pretty sure it is the reactive target itself.
The other traps from the same entity group are protected as intended
(i was testing in "default")
https://pastebin.com/2szzjKB5

"nothing cannot hurt traps",
"players cannot hurt traps",

maybe this is why?

it should be:
nothing can hurt traps, or anything can hurt traps
and then players cannot hurt traps

Also, there are generalized RuleSet names available to define a broader application - the words "anything", "nothing", "everything", "all", "any", and "none" can be used either for RuleSet 1 or RuleSet 2. Again though, semantics are taken into account, so "nothing" or "none" will effectively invert the rule meaning again. So using double-negatives like "players can't hurt nothing" will translate to "players can hurt everything", as well as likely prevent you from joining any yacht clubs.​


Merged post

also you don't need both ReactiveTarget and reactivetarget_deployed

still doesn't explain why other traps don't take damage. but just change it and let me know :P

Oh my fault, i copied it wrong.
I tried different things and copied the wrong one here.
I tried:

nothing can hurt traps
players cannot hurt traps
none can hurt traps
everything cannot hurt traps​

the config that i just copied to pastebin was the unholy mix from one of my last tries.
As you can see in the trace log, i tried the "players cannot hurt traps" there

sure, try again with simply players cannot hurt traps

remove all other rules for traps

Ok i think you got me wrong.
As you can see in my very first post, i already used "players annot hurt traps".
I only copied the wrong config to the pastebin, after i tried different rules and mixed them in the end.

But i tried again and it is the same trace:

======================
==  STARTING TRACE  ==
==  23:31:37.55715  ==
======================
 From: BasePlayer, player
 To: ReactiveTarget, reactivetarget_deployed
   No shared locations (empty location) - no exclusions
 No exclusion found - looking up RuleSet...
 Using RuleSet "default"
 DamageType is suicide; blocked? false; continue processing

======================
==  STARTING TRACE  ==
==  23:31:37.56116  ==
======================
 From: BasePlayer, player
 To: ReactiveTarget, reactivetarget_deployed
   No shared locations (empty location) - no exclusions
 No exclusion found - looking up RuleSet...
 Using RuleSet "default"
 No match in pre-checks; evaluating RuleSet rules...
  Initator EntityGroup matches: players
  Target EntityGroup matches: traps
   Evaluating Rules...
    Checking direct initiator->target rules...
     Evaluating "players->traps"...
      Match found; allow damage? False​

the used config:
https://pastebin.com/0FVzq4gv

(the initial one with "players cannot hurt traps")

so it's taking 1 damage each time?

Merged post

the suicide damage is intended and is vanilla, per the assembly code:

Hurt(1f, DamageType.Suicide, info.Initiator, false);​

 

and from Rustafied news:

Health: 250hp total, each hit does 1hp damage (can be repaired)​

we can confirm that this is how it should work. so rather than the reactive target taking full damage from a bullet it is applied to knocking it down instead, while the rest is mitigiated by bullet protection.

the reason your rules did not work is because suicide damage is handled by the SuicideBlocked flag. this is why it is in the trace, and even though it stated it would continue processing it immediately allowed the damage afterwards. it has been bugged since release.

it's basically the same issue that we had with the SelfDamage flag. both the SelfDamage and SuicideBlocked flags were intended to work for players only, and when the plugin was written only players took self or suicide damage. so having it as-is wasn't an issue, but eventually Rust decided to apply these damage types to new entities such as the minicopter, scrap heli and reactive targets.

the solution here is to apply the SuicideBlocked flag specifically to players, and have it continue processing as it states it should, so that it may continue to evaluate the rest of the ruleset and therefore be blocked by the rule players cannot hurt traps.

Ok, i already thought it must be the nature of the reactive target itself to get 1damage with each hit. Thanks for your fast help and the update.

Locked automatically