Hello Nivex,
sadly i cant fix that by myself. If i shoot the NPC it get damage but if the NPC Shoot me i dont get damage. here is the Trace Result. First NPC Shoot me second i shoot the NPC.
======================
== STARTING TRACE ==
== 17:43:26.25180 ==
======================
From: BasePlayer, player
To: BasePlayer, player
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: players
Evaluating Rules...
Checking direct initiator->target rules...
Evaluating "players->players"...
Match found; allow damage? False
======================
== STARTING TRACE ==
== 17:43:28.20201 ==
======================
From: BasePlayer, player
To: BasePlayer, player
No shared locations (empty location) - no exclusions
No exclusion found - looking up RuleSet...
Using RuleSet "default"
Initiator or target is HumanNPC, with HumanNPCDamage flag set; allow and return
HumanNPC dont get damagedSolved
TruePVE.json looks like:
{
"Config Version": "2.0.1",
"Default RuleSet": "default",
"Configuration Options": {
"handleDamage": true,
"useZones": true
},
"Mappings": {
"default": "default"
},
"Schedule": {
"enabled": false,
"useRealtime": false,
"broadcast": false,
"entries": []
},
"RuleSets": [
{
"name": "default",
"enabled": true,
"defaultAllowDamage": false,
"flags": "HumanNPCDamage, LockedBoxesImmortal, LockedDoorsImmortal, TrapsIgnorePlayers, TurretsIgnorePlayers",
"rules": [
"anything can hurt dispensers",
"anything can hurt resources",
"anything can hurt barricades",
"anything can hurt traps",
"anything can hurt heli",
"anything can hurt npcs",
"anything can hurt players",
"nothing can hurt ch47",
"nothing can hurt cars",
"nothing can hurt mini",
"nothing can hurt guards",
"nothing can hurt ridablehorses",
"cars cannot hurt anything",
"mini cannot hurt anything",
"ch47 cannot hurt anything",
"scrapheli cannot hurt anything",
"players cannot hurt players",
"players cannot hurt traps",
"guards cannot hurt players",
"fire cannot hurt players",
"traps cannot hurt players",
"highwalls cannot hurt players",
"barricades cannot hurt players",
"mini cannot hurt mini"
]
}
],
"Allow Killing Sleepers": false,
"Entity Groups": [
{
"name": "barricades",
"members": "Barricade, icewall, GraveYardFence",
"exclusions": "barricade.concrete, barricade.sandbags, barricade.metal, barricade.stone, barricade.wood, barricade.woodwire"
},
{
"name": "dispensers",
"members": "BaseCorpse, HelicopterDebris, PlayerCorpse, NPCPlayerCorpse, HorseCorpse",
"exclusions": ""
},
{
"name": "fire",
"members": "FireBall, FlameExplosive, FlameThrower, BaseOven, FlameTurret, rocket_heli_napalm, napalm, oilfireball2",
"exclusions": ""
},
{
"name": "guards",
"members": "bandit_guard, scientistpeacekeeper, sentry.scientist.static",
"exclusions": ""
},
{
"name": "heli",
"members": "BaseHelicopter",
"exclusions": ""
},
{
"name": "highwalls",
"members": "SimpleBuildingBlock, wall.external.high.ice, gates.external.high.stone, gates.external.high.wood",
"exclusions": ""
},
{
"name": "ridablehorses",
"members": "RidableHorse",
"exclusions": ""
},
{
"name": "cars",
"members": "BasicCar, ModularCar, BaseModularVehicle, BaseVehicleModule, VehicleModuleEngine, VehicleModuleSeating, VehicleModuleStorage, VehicleModuleTaxi, ModularCarSeat",
"exclusions": ""
},
{
"name": "mini",
"members": "MiniCopter",
"exclusions": ""
},
{
"name": "scrapheli",
"members": "ScrapTransportHelicopter",
"exclusions": ""
},
{
"name": "ch47",
"members": "ch47.entity",
"exclusions": ""
},
{
"name": "npcs",
"members": "ch47scientists.entity, BradleyAPC, HTNAnimal, HTNPlayer, HumanNPC, NPCMurderer, NPCPlayer, Scientist, ScientistNPC, Zombie",
"exclusions": ""
},
{
"name": "players",
"members": "BasePlayer",
"exclusions": ""
},
{
"name": "resources",
"members": "ResourceEntity, TreeEntity, OreResourceEntity, LootContainer",
"exclusions": "hobobarrel.deployed"
},
{
"name": "samsites",
"members": "sam_site_turret_deployed",
"exclusions": "sam_static"
},
{
"name": "traps",
"members": "AutoTurret, BearTrap, FlameTurret, Landmine, GunTrap, ReactiveTarget, TeslaCoil, spikes.floor",
"exclusions": ""
}
]
}
Merged post
I Tried your Fix from another Post but sadly that didnt work too:
add entity group
{
"name": "humans",
"members": "HumanNPC",
"exclusions": ""
},
then add "humans can hurt players" to the ruleset
you can use tpve_prod on the entity to see what it is and add that type to the entity group
NPCPlayer will cover most other npcs, including HumanNPC, and HTNPlayer will cover the newer npcs
ah, don't add any more npcs to an entity group. it will be redundant since the npcs entity group covers all npcs, therefore just add:npcs can hurt players
as a rule and it will work. i will add this in the default config for next update. not sure how I overlooked this, sorry :P
it looks like the Plugin only check if the Target is an NPC and not if the Initiator is an NPC
Merged post
Added "npcs can hurt players" all other NPC Work but Human NPC still cant damage the Player
Merged post
Like i say in the First part, the Plugin is only checking if its an NPC when you damage the NPC not when the NPC Damage you. you can see that in the Trace
Merged post
Oh the title is wrong player dont get damage from the npc. The npc can get damage from the player.
Merged post
Still dont work ;)
Merged post
If i shoot the NPC it get damage but if the NPC Shoot me i dont get damage. here is the Trace Result. First NPC Shoot me second i shoot the NPC.
======================
== STARTING TRACE ==
== 17:43:26.25180 ==
======================
From: BasePlayer, player
To: BasePlayer, player
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: players
Evaluating Rules...
Checking direct initiator->target rules...
Evaluating "players->players"...
Match found; allow damage? False
======================
== STARTING TRACE ==
== 17:43:28.20201 ==
======================
From: BasePlayer, player
To: BasePlayer, player
No shared locations (empty location) - no exclusions
No exclusion found - looking up RuleSet...
Using RuleSet "default"
Initiator or target is HumanNPC, with HumanNPCDamage flag set; allow and return
HumanNPC plugin or just regular HumanNPC from the game?
The HumanNPC plugin
Merged post
if i disable TruePVE i can get damaged from the HumanNPC, i will the the new Version Today but i think it wont change anything
Merged post
Nothing changed, i can make a Trace again but i dont think it will look differend from bevor. it looks like the NPC didnt get checkt if its an human NPC or not when he is the attacker, only when the player is the Initiator , TruePVE check if the target is a HumanNPC.
Merged post
the "npcs can hurt players" Rule is in, Normal NPC works fine only when the NPC Shoot the Player he didnt do damage, Players can hurt the NPC.
The issue is the HumanNPC plugin where it sets the initiator as the target, instead of setting the initiator as the npc. This means HumanNPC is saying that the target is hurting itself, when it should be saying that the npc is hurting the target.
Edit HumanNPC.cs and change:
if (!miss) ApplyDamage(target, target.transform.position, vector32, target);To:
if (!miss) ApplyDamage(target, target.transform.position, vector32, npc.player); thank you so much, that works! You are a Legend!