SKKmods Posted June 19, 2018 Share Posted June 19, 2018 (edited) Trying to make companion hostile to an NPC for random acts of autonomous violence and the results are ... unpredictable. CompanionHostileToNPC faction which is hostile to NPCHostileToCompanion factionNPCHostileToCompanion faction which is hostile to CompanionHostileToNPC faction NPC.RemoveFromAllFactions() NPC.AddToFaction(NPCHostileToCompanion)Companion.AddToFaction(CompanionHostileToNPC) Run a lookup against all 700 base game factions and the only faction NPC is a member of is NPCHostileToCompanion. Logic would suggest NPC.IsHostileToActor(Companion) is true, but it actually returns false. There are no more factions to remove ... Force NPC.StartCombat(Companion) and they turn hostile, but if they break line of sight and disengage (edit: or companion goes into bleedout) they stop combat and IsHostileToActor turns false again. WTF ? Edited June 19, 2018 by SKK50 Link to comment Share on other sites More sharing options...
NikaCola Posted June 19, 2018 Share Posted June 19, 2018 Hmm....honestly I am just throwing this out there, but are the aggression/etc. settings for the companion and hostile NPC such that they won't give up combat easily? I'm not really sure what else might cause this unfortunately. =( Link to comment Share on other sites More sharing options...
SKKmods Posted June 19, 2018 Author Share Posted June 19, 2018 AI aggression is set to (1) Aggressive, engage hostiles. If I add the NPC to PlayerHostileFaction then things work as expected and IsHostileToActor returns true. Its as if a companion is not allowed to be unilaterally hostile without the player regardless of factions. Issue is that the NPC then instantly attacks the player which is exactly not the UX I want. Autonomous companion <> NPC spectator aggro is the thing. Workaround is to have a timer that forces StartCombat() whenever IsInCombat() is false until OnDeath, but that's like the opposite of elegant AI management. Link to comment Share on other sites More sharing options...
Recommended Posts