Jojash Posted January 16, 2018 Posted January 16, 2018 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!
SKKmods Posted January 16, 2018 Posted January 16, 2018 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
Jojash Posted January 17, 2018 Author Posted January 17, 2018 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! :)
SKKmods Posted January 17, 2018 Posted January 17, 2018 No idea but I found the same as you, ModValue() wouldn't apply to a number of values so I use GetValue() + maths + SetValue()
Jojash Posted January 17, 2018 Author Posted January 17, 2018 Weird, oh well, thanks again - this is absolutely one of those things I would just never have even thought of!
Recommended Posts