Setting level of aggression of actors

Post » Sun Nov 18, 2012 12:18 pm

Hi,
I have developed a minion system that allows you to command follower, summoned creatures
and met wolves/werewolves to obey simple commands like wait, follow, wait there, forward.
Now, I want to be able to set the level of aggression of all and any specific of my minions.
I currently command a group of skeletons from Psikotic Necromancery mod. I tried to set
the level of aggression to 2, so they would attack any neutral actor on sight. I used
SetActorValue("aggression", 2). Partially it works because my scripts indicate that
the level of aggression has indeed been changed. Problem is Im currently testing it in
Riften and my skeletons dont attack the civilians. Does anyone have any tip about it?
User avatar
Monique Cameron
 
Posts: 3430
Joined: Fri Jun 23, 2006 6:30 am

Post » Mon Nov 19, 2012 2:54 am

I believe that using this way, you're setting them on 'agressive' they need to be very aggresive in order to attack civilians/guards/etc.
My guess would be that you should simply set their level of aggression a bit higher. Even though I've never used the console to achieve this effect. Just try and increase the number of aggression and watch carefully if the skeletons also attack eachother. If they do, you've changed them to frenzied instead of very aggressive.
User avatar
emily grieve
 
Posts: 3408
Joined: Thu Jun 22, 2006 11:55 pm

Post » Sun Nov 18, 2012 1:07 pm

Problem is I want them to have aggressiveness 2. According to CK wiki aggressiveness 3 equals frenzied state, that is a state when the actor attacks everything. I dont whant that. I want the actors to attack enemies and neutral actors (aggressiveness 2). I set them to such a state via SetActorValue but they dont attack civilians.
User avatar
Pat RiMsey
 
Posts: 3306
Joined: Fri Oct 19, 2007 1:22 am

Post » Sun Nov 18, 2012 8:01 pm

Have you checked their factions? Actors won't attack ally factions or members of their own faction.
User avatar
k a t e
 
Posts: 3378
Joined: Fri Jan 19, 2007 9:00 am

Post » Mon Nov 19, 2012 3:14 am

Yes, I checked ot. One of my minions is Lydia. The skeletons have 3 factions none of them is neutral to me.
User avatar
Andrew Lang
 
Posts: 3489
Joined: Thu Oct 11, 2007 8:50 pm

Post » Mon Nov 19, 2012 4:07 am

I would like to add that downgrading the aggressiveness level doesnt seem to work as well, since the minions start to attack even if they are not directly attacked.
User avatar
Milad Hajipour
 
Posts: 3482
Joined: Tue May 29, 2007 3:01 am

Post » Sun Nov 18, 2012 7:23 pm

Check your logs. There are problems using SetActorValue to change aggressivness. it just doesn't let you do it

You can, I'm told, use spell effects and alter aggressiveness and confidence that way. Never got around to trying it, but it might be a way forward
User avatar
naana
 
Posts: 3362
Joined: Fri Dec 08, 2006 2:00 pm

Post » Sun Nov 18, 2012 10:33 pm

OK, but how to do it? I dont want them to go frenzy and attack everyone player including. I just want them to attack neutral actors.
User avatar
Brandon Wilson
 
Posts: 3487
Joined: Sat Oct 13, 2007 1:31 am

Post » Sun Nov 18, 2012 12:27 pm

Very strange. I applied a custom frenzy spell on Lydia raising her aggressiveness to 3 and still she doesnt attack anyone. Does anyone has experianced anything similar?
User avatar
Valerie Marie
 
Posts: 3451
Joined: Wed Aug 15, 2007 10:29 am

Post » Mon Nov 19, 2012 12:47 am

Have you tried just changing the aggression level with the console in-game and observing the effects? Does it work even then?
User avatar
Petr Jordy Zugar
 
Posts: 3497
Joined: Tue Jul 03, 2007 10:10 pm

Post » Sun Nov 18, 2012 1:41 pm

(Hey gulogulo), the issue is that they are following you. That is they are set to teammate and a member of currentfollowers. While following you, they do not "See" anyone but you, nor do non-hostile npcs see them. In order to make them attack, you have to briefly dismiss them so that they can "peek" at the users around you. Something like:

int original = npc.GetAV("aggression")
npc.SetAV("aggression",2)
npc.SetTeammate(false)
npc.RemoveFromFaction(CurrentFollowerFaction)
Utility.wait(2.5)
npc.SetTeammate(true)
npc.AddToFaction(CurrentFollowerFaction)
npc.SetAV("aggression",original)

You dont want to go to 3 or they will attack the PC.
2 will attack non-allies (neutral, guards, etc...)
1 will attack enemies, however they have to be actively hostile (red dots). If you are sneaking and the enemies haven't seen you yet, it will not cause your followers to attack them.

This is basically how the attack command works in AFT 1.4.
User avatar
NeverStopThe
 
Posts: 3405
Joined: Tue Mar 27, 2007 11:25 pm

Post » Sun Nov 18, 2012 2:43 pm

@Dheuster

Thats what I suspected! Thanks a lot. I made them to attack by using script that detects nearby actors but your method looks far better (from the point of view of optimalization). I will check it out!

Yeah, I dont whant to set them to level 3 of aggression, just 2. This way my minions can happily massacre entire settlements without issuing any specific order. What a fun!



AFT 1.4. ? Sounds interesting.
User avatar
Kaley X
 
Posts: 3372
Joined: Wed Jul 05, 2006 5:46 pm

Post » Sun Nov 18, 2012 12:41 pm

It works!
User avatar
Quick Draw
 
Posts: 3423
Joined: Sun Sep 30, 2007 4:56 am

Post » Sun Nov 18, 2012 8:12 pm

Right, it works but only for Lydia (I suspect any follower), but not for summoned creatures even though I used RemoveFromAllFactions() command. Any suggesttions?
User avatar
carla
 
Posts: 3345
Joined: Wed Aug 23, 2006 8:36 am

Post » Sun Nov 18, 2012 7:11 pm

It seems the problem is related only to summoned creatures. My wolves which I met and befriend do not have the problem. Strange
User avatar
Sarah Bishop
 
Posts: 3387
Joined: Wed Oct 04, 2006 9:59 pm


Return to V - Skyrim