Setting Actor Aggression

Post » Thu Jun 21, 2012 4:09 pm

Is there really no way of setting an Actor's Aggression level? Need to set it between Aggressive and Very Aggressive yet I'm not seeing get/set methods on the Actor or ObjectReference scripts. Is it a value on some other member or am I missing something?

Spose I can create a Frenzy-type magic effect to cast on the actor but that's dirty.
User avatar
Anthony Diaz
 
Posts: 3474
Joined: Thu Aug 09, 2007 11:24 pm

Post » Thu Jun 21, 2012 11:57 am

It's an actor value.
User avatar
Laurenn Doylee
 
Posts: 3427
Joined: Sun Dec 03, 2006 11:48 am

Post » Thu Jun 21, 2012 9:39 am

Aggression is one of the AVs http://www.creationkit.com/Actor_Value#Notes, so you'd need to reapply the desired value after save loads, but you can easily do so and get a free, bootleg GetGameLoaded.

...Event OnUpdate()	If bGetGameLoaded()		; Iterates once per save load	Else		; Normal, reiterating code	EndIfEndEventBool Function bGetGameLoaded()	If GhandiREF.GetActorValue("Aggression") == 0 ; # = Default value for actor / probably 0 for most		GhandiREF.SetActorValue("Aggression", 100) ; # = Desired value / 100 = Frenzied?		Return True	Else		Return False	EndIfEndFunction...


^Aggresion won't budge, so that won't work =/
User avatar
Naomi Ward
 
Posts: 3450
Joined: Fri Jul 14, 2006 8:37 pm

Post » Thu Jun 21, 2012 8:15 am

Dammit. Well good, I knew it had to be somewhere and I'm not sure why I didn't think of AVs. Thanks you two! And for the extra hint there JustinO. I will have to do that since these are NPCs are in my ESP.

Seems like a few of the AVs should really be on the base. I mean.... .GetRace() is there. .Getsix(). But oh well. :)
User avatar
Mr. Ray
 
Posts: 3459
Joined: Sun Jul 29, 2007 8:08 am

Post » Thu Jun 21, 2012 6:31 am

Well, there's the Aggression dropdown box in the NPC window's AI Data tab, but it *doesn't seem to correlate with the numeric actor value returned by 'GetActorValue("Aggression")'.

*Unaggressive all the way to Frenzied show in game as 0
User avatar
Andrew Tarango
 
Posts: 3454
Joined: Wed Oct 17, 2007 10:07 am

Post » Thu Jun 21, 2012 10:52 am

I have the Bases defined as "Aggressive" under the AI Attributes. I place one nearby. Then I have a Global SpawnAngry that I check. If True, I want to bump aggression up to "Very Aggressive". SetAV appears to be my only hope. So I hope you're mistaken about them all being 0...

The http://www.creationkit.com/Actor_Value_List aren't enumerated on the Wiki. I'll map them out though and get it updated. If it does work. :eek:
User avatar
sara OMAR
 
Posts: 3451
Joined: Wed Jul 05, 2006 11:18 pm

Post » Thu Jun 21, 2012 5:16 am

Grrrr! So I tried fiddle with the AV...
forceav aggression "2"modav aggression 1
Unfortunately it told me "Actor Value 'Aggression' cannot be modified in scripts or the console."

:wallbash:

This seems really silly but after sleeping on it I had a thought. Aggression is likely tied into packages somehow. And the game is pretty strict on what package is running on an NPC. Unfortunately I haven't explored Packages yet. Is there a way to force a freshly-spawned ActorBase into a "Very Aggressive" procedure? I don't want the spawn to attack Faction Allies yet I would like it to attack neutrals.

That's probably more trouble than it's worth. Might have to settle with my original Magic Effect hack. :unsure:
User avatar
Arnold Wet
 
Posts: 3353
Joined: Fri Jul 07, 2006 10:32 am

Post » Thu Jun 21, 2012 4:54 am

AI packages didn't have aggressiveness. Indeed, there is not even an attack package. Only use weapon, which can be done against any object.

Maybe if you use damageav and restoreav you could make it work.
User avatar
x_JeNnY_x
 
Posts: 3493
Joined: Wed Jul 05, 2006 3:52 pm

Post » Thu Jun 21, 2012 3:24 pm

Unfortunately it told me "Actor Value 'Aggression' cannot be modified in scripts or the console."
Hmmm... I tried variants of the above snippet. The Player's Aggression initializes at 20, yet per http://www.creationkit.com/AI_Data_Tab#Aggression, only values between 0 and 4 are valid? Mod/Force/Set/ActorValue changed the Aggression value, but to 0 in all cases. Odd. Might be worth asking for an SKSE function if nothing else works. I'm pretty sure SetAV worked this way with the Fallouts...

:smileystumped: :fakenopic:
User avatar
Louise Andrew
 
Posts: 3333
Joined: Mon Nov 27, 2006 8:01 am


Return to V - Skyrim