Advertisement

More life-like dialogues through emotional states

Started by April 11, 2006 11:33 AM
11 comments, last by NickGravelyn 18 years, 10 months ago
I've only been thinking about this for a few days now, mostly because yet again promises of a great and realistic AI have been broken, which usually results in the need to come up with something better. So, let's take a break from path finding and wargame AI. After a closer look at the Oblivion Editor I noticed, that much of it IS already going in the direction I had in mind (even though you really couldn't tell in the game *cough*). But to the point and most of all the one point I think should be done exactly the other way around: how about a characters mood influencing his answers? Now, OB seems to assign emotions to certain lines, which is cool to make him look sad when he's talking about his dead wife, but apart from weird and sudden mood swings just doesn't feel right. The alternative, however, would be a lot more work for your writers. I'm thinking about a system where a conversation can actively change his mood, based on the attitude the player is displaying (also to some degree the topic or what the NPC says). A paper about the Artificial Emotion Engine made me realize, that this kind of thing has actually been researched for a bit (even though not exclusively in the context of AI or games). Based on that, this would be my rough idea, which you should feel free to criticize, shoot down, correct or point out serious problems with it. What we need: -a way to describe the personality, the EFA-approach looks fine (extroversion, fear, aggression). In short, E sets the limit on how strong a positive mood will be displayed, F does the same for negative moods and A sets the amount and ease of mood changes. -moods, seems that the six pack of joy, surprise, anger, sadness, fear and disgust are quite common (and conveniently, facegen already has this six expressions) -a lot of variants of the same answer, depending on mood. For now, let's stick with 7, one of them essentially neutral. Sounds like a lot, but in many cases generic replies can be used for many characters. -stimuli, basically I would plan it as weighed mood changes, with the difference that it won't just increase or decrease a mood in a straight forward fashion, but that the actual change depends on a) the current mood and b) the personality -keywords, each of them being assigned a "sensitivity" per character (how strong he feels about it, ie. how much it can influence his mood) and optionally an attached stimulus -attitudes, which are like user selected stimuli in that their effect depends on mood and personality. Still trying to reduce it to not more than half a dozen. Things like threatening, comforting, sneaky, careful, etc. To make things more complicated, extracting information is usually an important part of games. Where Oblivion is only using "disposition" as a measure, I can't reduce it to less than two factors: willingness to talk and sympathy. The reason is this: you can threaten a timid character into telling you something, but he still won't like you. In fact, if he WOULD like you, he might give you additional information or warnings. Sympathy might be a function of what kind of moods you cause in a conversation. Trying to improve his mood will increase his sympathy, while making him feel bad.. not so much. In return, sympathy might have an initial effect on his mood when starting a conversation (well, scratch that, players would just start and end conversations to improve his mood, unless ending a conversation will have the oppositve effect). Willingness to talk, I'm not so sure about. Might be easier to instead use the level of either fear or sympathy. Many moods could be used, but usually all moods are directed at or caused by something. If the character is angry at us, he won't tell us anything, but if he is actually angry at the guy we want to know some dirty secrets about... Though joy itself is hardly a reason to give away information. Trust might even be a third factor, but I have no idea how to get that in. Might just as well fall together with sympathy. The goal would be a game, where you have to influence an NPC to get information without doing it in some isolated and silly mini game and where it won't get you anywhere to just walk into a tavern to some guy and say "hey, I heard some guy slit your wives throat, what did he look like?". The reason I prefer keywords is that you can combine them with just "toggling" your current attitude without having to write a gazillion versions of the same question. As a result it would completely depend on the NPCs personality whether the best option is bullying or comforting. In fact, one NPC might turn from sad to angry and complain about not needing your pity, but might drop his tough guy act when he's pushed enough. Yet another might start a fight right there or completely lock up and yell for help. Obviously important characters would need to be hand tuned to make sure they can be convinced at all and you still couldn't easily pull off things like "make him sad so he gets drunk and talkative", but I could imagine it to feel more dynamic. Unless it just results in a huge buggy mess with many dead ends if you screw up. Though beating up or bribing might always be available as last resort. [Edited by - Trienco on May 23, 2006 11:00:51 AM]
f@dzhttp://festini.device-zero.de
Quote:
Original post by Trienco
-a lot of variants of the same answer, depending on mood. For now, let's stick with 7, one of them essentially neutral. Sounds like a lot, but in many cases generic replies can be used for many characters.


If you could get a program to 'rewrite' scripted dialog to be in a different mood, much like someone might rewrite a piece by Mozart to make it sound like it came from Beethoven.

To me this would be an interesting thing.

Will
------------------http://www.nentari.com
Advertisement
Quote:
Original post by RPGeezus
If you could get a program to 'rewrite' scripted dialog to be in a different mood, much like someone might rewrite a piece by Mozart to make it sound like it came from Beethoven.

To me this would be an interesting thing.

Will


Hm, didn't think about rewriting anything. You'd still need to write the replacement text, anyway. I was thinking more about picking the right version of saying "I don't know".. ie. "I wouldn't tell you, even if I knew, <appropriate insult>" for angry or "I.. I.. I don't know anything about that. Really." for scared or "How would I know? Who wants to, anyway?" for disgusted. A nice system with lots of shades for each mood would be possible, but nobody would want to write so many versions, except for generic responses that could be used for many or all NPCs. However, you might notice the placeholder. There would be a social status to be considered as well, mostly affecting how someone is addressed, maybe initial sympathy or creating some fear in timid people of lower status, etc.
f@dzhttp://festini.device-zero.de
It sounds like a good idea to me. You could always have the neutral version as default, so the writers can get something similar to what they have now with the same ammount of effort. Then they can fill up the mood-specific lines over time, or they can decide what parts of the dialogue would benefit most from mood-specific lines.

Quote:
Original post by alvaro
It sounds like a good idea to me. You could always have the neutral version as default, so the writers can get something similar to what they have now with the same ammount of effort. Then they can fill up the mood-specific lines over time, or they can decide what parts of the dialogue would benefit most from mood-specific lines.


That would be one advantage. For example, I don't know if the moods are a value you can access in the conditions for dialogue in Oblivion, but I wouldn't see why not. There also seem to be mods with NPCs which change their mood depending on what you said, so it seems that they already have a system in place that WOULD allow doing most of that. Just that they didn't bother. Kind of understandable, as they wanted all dialogue recorded and already said that most of the DVD is filled with dialogue.

Anyway, I'm trying to throw something together that handles the mood changes, but so far it looks like a lot of isolated parts. Basically each kind of input is treated differently based on mood and personality, though somehow I would have prefered a more unified approach. So far there would be about 5 blocks (physical, social and safety needs, player attitude and topic), all getting their own bit of either fuzzy logic or simplistic neural net (ie. formula) with the resulting mood changes summed up and applied. Additionally, player attitude consequences would need to have sympathy as additional factor, for example influencing if "comforting" will be experienced as comforting or patronising or how threatening "threatening" will actually be perceived. Right now I'm somewhat afraid I won't find a decent way to model all this and end up with a gazillion "if personality is like this and mood is like that, change it like this".
f@dzhttp://festini.device-zero.de
For trust could you implement some kind of NPC grouping for example one town where people would have friends and relatives etc who could pass info about the player to the speaker. Based on how well you are known by this group of people and how much they "recomend" you. This could be turned into a measurable scale out of 100 for example.

Just an idea but nice article btw
Advertisement
Quote:
Original post by TwinX
For trust could you implement some kind of NPC grouping for example one town where people would have friends and relatives etc who could pass info about the player to the speaker. Based on how well you are known by this group of people and how much they "recomend" you. This could be turned into a measurable scale out of 100 for example.


In theory (and with enough time) one could do a lot. Even assign a certain need to share some information and actually simulate this exchange. So you could have a realistic way of one NPC warning others because they caught you stealing. Though unless you want a complicated way to model knowledge, I guess the easiest way would be deciding on a dozen or so informations about the player (and maybe other NPCs). Maybe even connect certain emotions to it. In game terms, it would allow you to prevent a certain info to get out (ie. secretly killing an NPC that caught you stealing), which wouldn't be possible, if other NPCs in the same group would magically and instantly know about it. Like in a certain quest where the body didn't even finish dropping before NPCs could be heard talking about the murder. Uhm.. no point in hiding the body then, huh?

But at this point I'm still looking at different models, PAD looks a bit more promising than EFA in terms of bringing everything together. Tricky to find one, where you don't have to manually set a gazillion things to allow one input to trigger really different reactions and not just different strengths of the same reaction. Question is: could that still be put in a game or would it become so expensive to handle, that it would have to be a game of its own?
f@dzhttp://festini.device-zero.de
I think oblivion does use some type of system like i said but on a much simpler scale and they seem to know instantly when some 1 has died like the emperor at the start also if you kill sum1 in thier house the guards rush in and get u even though they are outside.
I probably would have excluded guards from it anyway. Even though it would allow interesting situations. When somebody catches you and starts calling the guards, would you add murder to the list to quiet him or accept the bounty and get out before they arrive?

Just guessing, but I think in Oblivion there's just a whole ton of generic topics, like a global pool. As part of some events they are unlocked and can then be used by everyone. Question is: IF one would go the extra mile and simulate word of mouth in detail, would players even NOTICE the difference, compared to a much simpler approximation (which could simply be an ever growing radius around the source of the information)?
f@dzhttp://festini.device-zero.de
Quote:
Original post by TriencoQuestion is: IF one would go the extra mile and simulate word of mouth in detail, would players even NOTICE the difference, compared to a much simpler approximation (which could simply be an ever growing radius around the source of the information)?


I believe both approaches would yield similar responses from the player. On the other hand, take an example from Oblivion. In the game Argonians (lizard people) and Khajit (cat people) hate each other. They are mutually racist against the other. It would stand to reason, then, that if you did something to an argonian, nearby khajit would not find out until later than other races in that area (due to the racism). I suppose you'd really have to implement it and test it to see if it makes a larger difference. If nothing else, it's a cool feature to list on the box :).

This topic is closed to new replies.

Advertisement