Jump to content

Recommended Posts

Posted

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!

Posted

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
Posted

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! :)

Posted

No idea but I found the same as you, ModValue() wouldn't apply to a number of values so I use GetValue() + maths + SetValue()

Posted

Weird, oh well, thanks again - this is absolutely one of those things I would just never have even thought of!

  • Recently Browsing   0 members

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