Jump to content

Modifying AI data.


Jojash

Recommended Posts

Recently I've been attempting to modify aggression, confidence and assistance via script, however, using modvalue seems not to work, I've also tried to modify these values via a spell added to refaliases that my actors are attached to with similarly little luck. Is it possible to modify these values without touching them on the actor's form in the CK?

 

Thanks in advance!

Link to comment
Share on other sites

Yes modifying unique and spawned NPC posture works overlaying the actorbase form, this is in production straight after PlaceActorAtMe():

Function SetNPCActorValue(ObjectReference akActorRef) ; avoid spawned npc aggro on neutral bystanders

	akActorRef.SetValue(pAggression, 1.0) ; Aggressive will attack Enemies on sight NOT neutrals.
	akActorRef.SetValue(pAssistance, 1.0) ; Helps Allies Will only help Allies.
	akActorRef.SetValue(pConfidence, 4.0) ; Foolhardy will never avoid/flee from anyone.

EndFunction
Link to comment
Share on other sites

Thanks a ton! Switched from modvalue to setvalue (usually I'm apprehensive about using setvalue - it's a holdout habit from FNV modding) and apparently that now works, seems odd to me - do you know why it works that way? Anyway, thanks again, this has really been bugging me! :)

Link to comment
Share on other sites

  • Recently Browsing   0 members

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