Jump to content

Need assistance with disabling combat ai


Recommended Posts

Hello I'm making a worldspace that needs to have all combat disabled somewhow.

 

In the command prompt in game there is tcai but I do not know how to replicate that as a built in feature tied to the worldspace I'm building.

 

I had originally had a script given to me that would disable the player's ability to use combat controls. However after I've navmeshed I'm realizing that the player now that he can have a follower accompany him from the worldspaces bethesda made the player would be able to command the following npc to attack an npc in the worldspace I built. So I need a way to either disable the option in the command menu when the player interacts with the follower while in the worldspace I made and re-enables it once they decide to leave Or a script that would completely disable all combat ai in the worldspace. Or a way to disable all npc's ability to even initiate battles. I noticed when I used to use tcai in the command prompt that the characters would prepare to fight but not be able to actually do so. Which is also not what I want. The goal is for the npc's to be unable to even a fight at all. Perhaps by disabling the player's ability to access the command menu during dialogue with the follower only when in the worldspace. Any ideas at all would be wonderful. Thank you very much.

Billie

Link to comment
Share on other sites

Have a read of the AI Data Page.

 

What you probably want to set on all actors is the aggression value.

 

 

 

ActorValue Property pAggression	Auto Const Mandatory
ActorValue Property pSKK_CSOriginalAggression Auto Const Mandatory

Function NoCombat(ObjectReference ThisActorREF) 
   ThisActorREF.SetValue(pSKK_CSOriginalAggression, ThisActorREF.GetValue(pAggression)) ;store the original 
   ThisActorREF.SetValue(pAggression, 0.0)  ;No more fighting
   (ThisActorREF as Actor).StopCombat() ;Incase they are already in a fight
EndFunction

Function RestoreCombat(ObjectReference ThisActorREF) 
   ThisActorREF.SetValue(pAggression, ThisActorREF.GetValue(pSKK_CSOriginalAggression))
EndFunction

 

 

Link to comment
Share on other sites

characters that bethesda made can be recruited as followers and those followers ai packs may cause issues with bethesda quests if their aggression is set to non aggressive. If this mod edits the regular bethesda built parts too much folks might not want to use it and it could break their game.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...