Can't damage / destroy underground train barricades when slowly driving intoSolved

I just tried this plugin for my personal PVE Server and tried to slowly destroy a underground train barricade (trainbarricadeheavy) with the workcart but it didn't damage it at all. When i hit it with speed it was instantly destroyed as expected but the slower way is impossible somehow. Is there a known way how to fix this? Also the train didn't take any damage at all, thats also a point i would like to change.
Thank you!

== STARTING TRACE ==
== 08:00:31.93131 ==
======================
[TruePVE] From: Unknown_Weapon, Unknown_Prefab
[TruePVE] To: TrainBarricade, trainbarricadeheavy
[TruePVE] No shared locations (empty location) - no exclusions
[TruePVE] No exclusion found - looking up RuleSet...
[TruePVE] Using RuleSet "default"
[TruePVE] Initiator empty; allow and return

Thats the output of the trace, so it seems the workcart isn't tracked as entity. Do I have to add it to the config file as a new entity group or do I have to add it to the plugin file itself?

Merged post

We're tried a bit the last days but nothing really helped, neither creating new entity groups, nor coding the workcart entities into the plugin itself. For some reason the plugin or the game itself doesnt know the train when slowly speeding into the barricades. When running into the barricades with higher speed the trace prints

== STARTING TRACE ==
== 13:33:13.83367 ==
======================
[TruePVE] From: TrainBarricade, trainbarricadeheavy
[TruePVE] To: TrainEngine, workcart_aboveground.entity
[TruePVE] No shared locations (empty location) - no exclusions
[TruePVE] No exclusion found - looking up RuleSet...
[TruePVE] Using RuleSet "default"
[TruePVE] No match in pre-checks; evaluating RuleSet rules...
[TruePVE] Initiator EntityGroup matches: barricades
[TruePVE] Target EntityGroup matches: trains
[TruePVE] Evaluating Rules...
[TruePVE] Checking direct initiator->target rules...
[TruePVE] Evaluating "barricades->trains"...
[TruePVE] No match found
[TruePVE] No direct match rules found; continuing...
[TruePVE] Evaluating "barricades->any"...
[TruePVE] No match found
[TruePVE] No matching initiator->any rules found; continuing...
[TruePVE] Evaluating "any->trains"...
[TruePVE] No match found
[TruePVE] No matching any->target rules found; returning default value: False

So it detects the train as "TrainEngine, workcart_aboveground.entity", tested some other TruePVE Servers aswel and ervery server had this kind of bug.

so that's 2 issues. 1 is a game bug and 1 is a missing rule

1.
looks like you need to use barricades can hurt trains

where barricades entity group should contain TrainBarricade

lmk if that works and ill add to the default config

2.

as for the unknown weapon/prefab game bug you can look for this and add entity is TrainBarricade to it.

// allow damage to door barricades and covers

if (entity is TrainBarricade || entity is Barricade && (entity.ShortPrefabName.Contains("door_barricade") || entity.ShortPrefabName.Contains("cover")))​

it should look like this when you're done. this will allow the train to destroy the barricade. the higher the speed the quicker it will die. so at low speed it will take a few seconds to break through it.

So i just tried it out. 
With the 'barricades can hurt trains' it didn't work but changing the if statment to

if (entity is TrainBarricade || entity is Barricade && (entity.ShortPrefabName.Contains("door_barricade") || entity.ShortPrefabName.Contains("cover")))​
did work, even without the barricades can hurt trains. 
Also i did add the trainbarricadeheavy to the default entity group of barricades so it looks like this:
    {
      "name": "barricades",
      "members": "Barricade, icewall, GraveYardFence, barricade.concrete, trainbarricadeheavy",
      "exclusions": "barricade.sandbags, barricade.metal, barricade.stone, barricade.wood, barricade.woodwire"
    },​

then the condition "anything can hurt barricades" should work, at least it did for me.


Tyvm for your help! Working great now.

np, you should change trainbarricadeheavy to TrainBarricade so it covers all of them

Locked automatically