Inter-NPC disposition

Post » Sat Feb 19, 2011 1:08 am

The wiki gives me a bunch of details on how NPC's disposition to the player is determined, but not much on the reactions between pairs of NPC's. I'm trying to create a character with mood swings that change the conversations with other NPC's but I'm not sure how to figure the values for the GetDisposition tests in the Topics. I'll be using ModFactionReaction to implement the mood swings, and I need to keep the range safe from starting fights, at the same time as making a consistent change to the Topic selection.

I'm guessing that NPC-NPC dispositions are 50 plus or minus the effects of Race, faction or crime, but do I need to factor in Personality etc. like with the player?
User avatar
CHARLODDE
 
Posts: 3408
Joined: Mon Apr 23, 2007 5:33 pm

Post » Sat Feb 19, 2011 8:35 am

Not sure about Personality, but I know that aggression plays a big role in this too. I was helping out with a mod and we had some DB members leave the Cheydinhal sanctuary, where they normally don't. Their aggression was so high they attacked everyone in sight. We had to lower their aggression to get them to stop. Have you seen the discussion of this on the http://cs.elderscrolls.com/constwiki/index.php/Category:Actor_Values? There's also this http://cs.elderscrolls.com/constwiki/index.php/AI_Button which gives a nice summary of all the values together. On that second page in particular, they say that the values also apply for npc-npc interactions.

Lastly, in the little mod SkyCaptain put together to stop NPC's fighting each other, I believe he just used disposition to stop the fights. I believe it was called NPC Friendly Fire.
User avatar
Natasha Callaghan
 
Posts: 3523
Joined: Sat Dec 09, 2006 7:44 pm

Post » Fri Feb 18, 2011 8:04 pm

Getting the disposition down to the level where aggression is a factor would definitely mean the mood swings have gone too far! But, since it's just one character who won't wander out of a relatively small space, it won't be too hard to check all the possible encounters for safety.

I think I should be able to do this by trial and error using the console. I can set the character's mood and see what disposition values I get with a console command. If all else fails, I can abandon using disposition and check the mood variable in the NPC's own object script in all the dialog topics. This was mainly a mechanism to cover for the possibility of generic dialog coming up that was "out of character". Those seem to use points of 30 and 70 for the "hate you" and "love you" transitions, which would need a fairly large swing of 40+ points to ensure hitting both ends of the dialog spectrum. If I can't use disposition to do it, I'll need to ensure the character can't use generic dialog, but that might not be too hard either.
User avatar
:)Colleenn
 
Posts: 3461
Joined: Thu Aug 31, 2006 9:03 am

Post » Sat Feb 19, 2011 2:40 am

Yeah, it's just with high aggression values, it doesn't take much. I think the characters in my example had an aggression of 50. Unfortunately I don't know what their disposition to the other NPC's was. But I believe we lowered their aggression to 20 and that stopped the problem. I don't imagine SkyCaptain's mod would help much - I suspect he just set their disposition to 100 to stop the fights!
User avatar
Lynne Hinton
 
Posts: 3388
Joined: Wed Nov 15, 2006 4:24 am

Post » Sat Feb 19, 2011 9:06 am

I could be wrong, but I have a feeling that NPCs use the same disposition mechanic as NPC/Player interactions. In that case, the Personality of both NPCs comes into play, so two NPCs with low Personality will generally have negative reactions to one another (although they will keep engaging each other in conversation!) and two NPCs with high Personality will generally have positive reactions to one another. You will notice this if you pay attention to the dialogue they engage in while playing.

An NPC won't attack another NPC unless their Aggression is more than 5 points above their Disposition toward that actor. Setting an actor's Aggression to 5 will prevent them from initiating an attack on another actor, but they will still defend themselves. Setting an actor's Aggression to 0 will prevent them from defending themselves from an attack as well. You can add NPCs to a generic faction to raise their Disposition toward each other in general to avoid the possibility of violent conflicts even if you have their Aggression above 5. This is useful for creating NPCs that may attack the player, but that won't (in normal circumstances) attack other NPCs. I generally use community and family factions to account for this.

Faction reactions are actually the wrinkle in this formula. (Well, race reactions play a role, too, but they are static and can easily be accounted for.) The engine only uses the lowest faction reaction for calculating Disposition, so if you have an NPC in two factions, and one faction provides a + 10 bonus to other NPCs but the other provides a -10, the -10 faction reaction wins. In other words, they do not stack. If you are counting on faction reactions to adjust the Disposition of your NPC, you must account for this. It would be more consistent to adjust the NPC's Personality directly. That is, if NPCs use the same mechanic as NPC/Player interactions, which I suspect, but haven't tested.
User avatar
Cedric Pearson
 
Posts: 3487
Joined: Fri Sep 28, 2007 9:39 pm

Post » Sat Feb 19, 2011 4:26 am

Personality is not enough on its own. I.e. you need multiple Personality levels (4) to get one point of disposition change, and changing the dialogs needs 40+ disposition change. That would mean varying the Personality by more than 160!

For the interaction with the player, it's all moot, as the dialogs can test with GetIsId and access the mood variable directly. It's the generic ones that are already working on disposition that I'm trying to keep consistent, when this NPC talks to any others. I can make sure the new character is not in any existing factions, to avoid the issue of "lowest wins" with those, and use SetFactionRank to put the possible characters that could be part of a conversation into one where I can control the faction disposition. Tests so far are looking good with this method.

I'm also working on the secondary signs of the mood swings, such as lower Energy when chilling out, and higher when in a bad mood. Anyone know if you can control the facial expression when an actor is NOT in conversation? E.g. Happy/Angry idle animations?
User avatar
Cassie Boyle
 
Posts: 3468
Joined: Sun Nov 05, 2006 9:33 am

Post » Sat Feb 19, 2011 2:44 am

Don't know if you've figured this out already or not, but I've determined that NPCs do, in fact, use the same formula for determining disposition toward one another that they use for determining disposition toward the player. I've written up the details on the http://www.uesp.net/wiki/Oblivion:Disposition#Starting_Disposition and the http://cs.elderscrolls.com/constwiki/index.php/Category:Factions.

I was partially wrong on the 'lowest wins'. The lowest wins applies for two or more factions that both have a reaction modifier to the same faction if the actors (including the player) do not share any factoins. If two actors (including the player and another actor) are both part of the same faction, then the highest wins (among shared factions).
User avatar
Josh Dagreat
 
Posts: 3438
Joined: Fri Oct 19, 2007 3:07 am

Post » Sat Feb 19, 2011 9:43 am

Thanks for the update TheMagician!
User avatar
helliehexx
 
Posts: 3477
Joined: Fri Jun 30, 2006 7:45 pm


Return to IV - Oblivion