Hi,
I have a plugin 'personal animals' allows a pet to loot, kill on command. Works fine with vanilla NPC's. However when adding BetterNpc's , it does not damage those npc's. I raised this with 'personal animals' creator and he tells me he does nothing with damage in plugin, so raise issue with BetterNPC . They say TruePVE will overwrite damage and to ask about config for TruePVE, so here I'am can you please help if there is a config to allow npc to fight with BetterNpc types ?
Also I tried trace command, it does not register in the logs when pet attacks BetterNpc spawned entity.
Thank you
Npc killing npc
truepve doesn't block damage from animals or npcs by default
is there a setting that does that ? might be enabled in my config.
you can post your config but I doubt it.
Try this, work´s for me. Better Npc use scientistnpc_oilrig
{ "name": "npcs", "members": "ch47scientists.entity, BradleyAPC, HumanNPC, NPCPlayer, ScientistNPC, TunnelDweller, SimpleShark, UnderwaterDweller, Zombie, ZombieNPC, scientistnpc_oilrig, CustomScientistNPC, scientistnpc_heavy, ScarecrowNPC", "exclusions": "" },
omegablueTry this, work´s for me. Better Npc use scientistnpc_oilrig
{ "name": "npcs", "members": "ch47scientists.entity, BradleyAPC, HumanNPC, NPCPlayer, ScientistNPC, TunnelDweller, SimpleShark, UnderwaterDweller, Zombie, ZombieNPC, scientistnpc_oilrig, CustomScientistNPC, scientistnpc_heavy, ScarecrowNPC", "exclusions": "" },
Tried that, the pet still does not damage the BetterNpc spawned npcs. Does that work for you with the 'personal animals' plugin ? If so could you maybe dm your config ?
you should update TruePVE, and your trace is not enabled so tpve.trace won't print
"Trace To Player Console": true,
"Trace To Server Console": true,
"Maximum Distance From Player To Trace": 50.0,
you can try it again, but NpcsCanHurtAnything will allow the damage unless another plugin blocks it (OnEntityTakeDamage or CanEntityTakeDamage)
I can't tell you since I don't own that plugin.
ok , I did that and here are my logs
When I attack an npc spawned by BetterNpc & when the wolf pet from personal animals attacks a vanilla npc
======================
== STARTING TRACE ==
== 16:15:29.18740 ==
======================
From: BasePlayer, player
To: CustomScientistNpc, scientistnpc_heavy
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
======================
== STARTING TRACE ==
== 16:17:30.50277 ==
======================
From: Wolf, wolf
To: ScientistNPC, scientistnpc_junkpile_pistol
No shared locations (empty location) - no exclusions
No exclusion found - looking up RuleSet...
Using RuleSet "default"
Initiator is NPC; flag set; allow damage and return
No logs are thrown when the wolf pet attacks a npc spawned by BetterNpc, so does this indicate TruePve can't detect the type so 1. it will allow damage 2. throw into the log ? NpcSpawn is used by BetterNPC to spawn the npcs
NpcSpawn uses the CanEntityTakeDamage hook provided by TruePVE
it does not have a statement to allow damage from BaseNpc (your animals) so the damage is blocked
open NpcSpawn.cs and change line 2082 from:
return false;to
return attacker is BaseNpc;Unfortunately still does not work, and still not throwing in the trace logs. What I don't get is the animal 'wolf' can damage vanilla npc's and that triggers the logs, but the betternpc do not ?
Does the return need to be something other than BaseNpc ?
I don't know since I don't own that plugin
you can change it to return true; on line 2082 to rule that out
if that doesn't work then something else is still blocking the damage.
Sorry for the late response tried that, still no good. I used the /tpve_prod for the Npcs and here is what I got.
type= Oxide.Plugins.Npcspawn+CustomScientistNpc,
prefab=scientistnpc_heavy
do I need to do something with the type to get damage to work ?
that's already in the config. your trace shows that the damage is allowed. so it's likely not truepve.
you're right, I've found the issue in NpcSpawn plugin, now to just get the dev to help me resolve it.