Making an NPC hostile?

Post » Sat Jun 23, 2012 7:15 pm

How do I go about making an otherwise friendly NPC hostile? I tried changing a guard's Faction but it didn't seem to have any affect.
User avatar
Eve(G)
 
Posts: 3546
Joined: Tue Oct 23, 2007 11:45 am

Post » Sat Jun 23, 2012 6:33 pm

Most of the guards seem to use TEMPLATES (bottom left of Traits Tab on thre Actor Form)

If you just want a single, hostile guard, then you are probably better creating a new NPC, and using the model data / clothing package etc for a guard

Then, have a look at the values in the AI Data Tab on the character sheet

"Agro Radius Data" and such ... They should sort you out.

TIP: Have a look at the Spriggan Race and it's AI Data Tab - You could clone/duplicate a Spriggan, then change it's race and so on, to a guard (I THINK!)

If you want to make All Guards Hostile (or just a faction of guards, like ImperialWhiterunGuards), then you have to edit the templates, I think (I have not looked, at all, into how you might do that)

(I'm guessing, a little, I've not tried to play with this, yet)
User avatar
Genevieve
 
Posts: 3424
Joined: Sun Aug 13, 2006 4:22 pm

Post » Sat Jun 23, 2012 9:55 pm

But what if I were to need to turn a single guard hostile, and not his whole faction?
User avatar
Dewayne Quattlebaum
 
Posts: 3529
Joined: Thu Aug 30, 2007 12:29 pm

Post » Sun Jun 24, 2012 10:20 am

But what if I were to need to turn a single guard hostile, and not his whole faction?


Then you need to create a unique NPC - And place him where you want him in the world
Duplicate: EncSoldierImperialTemplate (in Actors/Actor/Actor/Imperial/Male)
This does NOT use a template, so you should not have problems
Then set values for your duplicate in the AI Data Tab for Aggro Radius Behaviour - And any other stuff you want, factions etc
(If you didn't want an Imperial, look through at the other races in Actors/Actor/Actor/ - but make sure the one you pick does not use a TEMPLATE)
Have a look at the tutorial, last half of it is creating a thief enemy - It uses a template, but the process is mostly the same - http://www.creationkit.com/Bethesda_Tutorial_Creating_an_Actor
User avatar
Pete Schmitzer
 
Posts: 3387
Joined: Fri Sep 14, 2007 8:20 am

Post » Sun Jun 24, 2012 5:48 am

Like h4vent already said, clone a guard or a guard-template and look at its http://www.creationkit.com/AI_Data_Tab.
"Very Aggressive" means it will attack enemies and neutrals. "Foolhardy" means it is too stupid to flee from powerful opponents. "Any Crime" means their morality permits anything.
Changing the faction is important for tuning, but that alone may not work. Although Guards are just as aggressive and stupid as any Bandit, they still have morals.
- If you want the guard to attack everyone set him to 'Frenzied'\'Any Crime'
- If you want the guard to only attack the player, set him to 'Aggressive'\'Any Crime' & add him to WEPlayerEnemy faction.
- If you do not want other guards to help him, remove him from all other factions.
etc.
User avatar
Neil
 
Posts: 3357
Joined: Sat Jul 14, 2007 5:08 am

Post » Sun Jun 24, 2012 7:27 am

But what if I were to need to turn a single guard hostile, and not his whole faction?

Then you create a script, attach to that guard. Inside the script, you use

StartCombat(Game.GetPlayer())

More info:

http://www.creationkit.com/StartCombat_-_Actor

Please note that if that guard is with any NPC that is more friendly to that guard, they may join his side. If they don't see it, they will still be neutral
User avatar
kevin ball
 
Posts: 3399
Joined: Fri Jun 08, 2007 10:02 pm

Post » Sun Jun 24, 2012 1:52 am

Like h4vent already said, clone a guard or a guard-template and look at its AI Data Tab.
"Very Aggressive" means it will attack enemies and neutrals. "Foolhardy" means it is too stupid to flee from powerful opponents. "Any Crime" means their morality permits anything.
Changing the faction is important for tuning, but that alone may not work. Although Guards are just as aggressive and stupid as any Bandit, they still have morals.
- If you want the guard to attack everyone set him to 'Frenzied'\'Any Crime'
- If you want the guard to only attack the player, set him to 'Aggressive'\'Any Crime' & add him to WEPlayerEnemy faction.
- If you do not want other guards to help him, remove him from all other factions.
etc.

Ah. I I missed the "Any Crime" AI setting. Thanks! XD
User avatar
MARLON JOHNSON
 
Posts: 3377
Joined: Sun May 20, 2007 7:12 pm


Return to V - Skyrim