Moods in conversation

Question from Conrad Cook:

I’m wondering how you mesh variable tracking with conversation.
You’ve mentioned _Alabaster_ tracks a lot of variables, and I can
conceptualize how that would be reflected in, for example, the
artwork. But I’ve been wrestling for a while with how to use the
conversation to move the NPC’s variables, and how to have those
variables be reflected in the course of the conversation, and so far
I’m not winning that wrestling match.

Alabaster’s source is available, so it’s possible just to look at what’s going on there — but possibly more difficult to suss out exactly what the plan is throughout the source. A technical discussion follows.

There are two parts to the question. To start with the first:

I’ve been wrestling for a while with how to use the
conversation to move the NPC’s variables

Alabaster does this with bracketed “say” tags, like “She shows you her pointy teeth[scary].” This invokes a function that increases the scariness variable. Alabaster tracks two kinds of numerical variable: how scary (or pathetic) Snow White seems, and then how friendly (or angry) she is. So she could seem like she likes you, but be really creepy; or she could be harmless and friendly; etc. These variables move independently and in theory could be very large or very small.

Once per move, Alabaster also assesses Snow White’s mood based on the scariness and friendliness axes. Whereas the scariness and friendliness are numbers that can be positive or negative and have any value, the moods are named values, and there are always only eight:

The moods are menacing [pure scariness], aggressive [scary/angry], furious [angry], whiny [angry/pathetic], needy [pure pathetic], harmless [friendly/pathetic], warm [pure friendly], weird [friendly/scary].

If we imagined a cartesian coordinate system with friendly-angry and scary-pathetic as the two axes, then the moods aggressive, whiny, harmless, and weird would each represent a quadrant of that plane — except that being exactly ON the axis earns its own designation. Roughly like this:

Despite what the areas on the chart might suggest, because the values of both axes tend to fluctuate around zero, there’s a fairly good chance that we’ll be exactly at zero and thus on the axis a goodly portion of the time. In any case, the chart mapping is a way to capture the general kinds of mood that Snow White can be in.

Why bother to map to named moods? Well, it’s a lot easier to test “if Snow White is furious” than “if the scariness is less than… and the anger is greater than…”, and in any case I don’t care that much about the absolute values of these variables — just the direction they lie from the center. If Snow White is already scary, then her gaining an extra scariness point shouldn’t drastically affect her apparent behavior to the player. What makes a difference is if she does something that makes her seem friendly as well as scary. The mood system thus better reflects shifts in the player’s intuition about her than it would if we relied only on the numerical variables.

Now, part two of the question:

and how to have those
variables be reflected in the course of the conversation

In Alabaster, Snow White’s current mood affects the text output a lot, but the conversation flow very little. So there are things like

if the mood of Snow White is:
-- furious:
say "[one of]She doesn't look very cooperative[or]She looks downright mutinous[or]She fumes silently, and doesn't grace this with a reply[at random].";
-- menacing: ... [etc., through the rest of the moods]

But there aren’t points in the game where whole major conversation paths are blocked off because she’s not in a receptive mood. That’s because, for this particular game, it didn’t seem fair to the player. The player is already being asked to navigate through the conversation to a point where he has certain facts, and that allows him to produce certain endings. Adding moods as an additional gating feature would have made it significantly more difficult to understand what was happening and why — a complaint often leveled at Galatea. In the case of Galatea, I didn’t mind that her behavior was somewhat opaque because I wasn’t trying to let the player navigate toward a specific narrative goal. I envisaged each separate playthrough of Galatea as its own mini-arc, and the outcomes as surprises; the player might, for instance, try being friendly and see what resulted. (Whether people actually play that way is not the point: we’re talking about what I thought when I was designing it.) In contrast, with Alabaster I imagined the whole set of playthroughs by the player as contributing to one coherent story, and I wanted the player to be able to try to achieve things.

For that to work, I needed the game mechanism to feel more controllable, with reproducible results. So the moods are cosmetic and the fact-knowledge tracking is structural.

It would be possible to design a completely different kind of system, though. Sims 3 conversation is much more about how characters feel about each other. There are conversations which have specific semantic content — you can have a Sim compliment someone’s house while over for a visit, for instance — but each conversational act is important more for its social and emotional force than for conveying facts in a complex web of information. So you can have the goal of making your Sims get along better or worse, or fall in love — and you can choose conversation acts that will advance those goals — but you can’t have them tell each other complicated stories.

It’s possible to imagine IF that treats moods as the structural element and the conversation content itself as cosmetic. But in that case you’d want some story predicated around achieving a relationship result (Suzy likes you!) rather than on reaching a factual conclusion. And there’s some risk that if done poorly such a conversation could sound like conversations in visual novels, where there’s often one “nice”, one “neutral”, and one “mean” thing you can say to a character, and this is so transparent that there’s no particular challenge about establishing the character’s feelings toward you. You’d need some more artful form of gameplay to make this interesting: perhaps, as with Sims 3, different characters would have different preferences. Then some might like to feel listened to and be asked lots of questions, while another found questions intrusive and preferred to stick to neutral topics, and so on. I could imagine a game done this way, but I haven’t written any such myself yet, so I can’t comment too far on how it would work.

6 thoughts on “Moods in conversation”

  1. This is fascinating. I had suspected that — given the delay between issuing a command and seeing the reply — that Alabaster was checking a whole host of variables to determine what to say next, but this is much simpler and makes sense. I suppose, now, the delay is due to syntax matching against the hundreds of quips available.

    Regarding moods as gating mechanisms, I think in Galatea where it becomes frustrating is both the opacity of determining her mood (the debug bar aside, it’s hard to figure out what she’s feeling) but also the range of moods that exists. Getting some endings takes considerable plying or charming before you can even ask the questions that lead to that end.

    I think what you did here in Alabaster — where White’s mood scale is often close to zero — would have resolved the frustration issues with using it as a gating mechanism. Meaning, if you could alter her mood with only one or two comments, then the player could more carefully control how she feels and get past the gates to more information where necessary.

    Also — not to over complicate things — but it seems like there should be a scale to track White’s desire or reluctance to continue a particular conversation thread. There are a couple times — such as when discussing what Lilith wants — that the responses from White are somewhat anticipatory, as if they’re encouraging the player to continue asking about that topic. But if you suddenly ask a question related to another topic, White will seamlessly jump into that conversation thread without any complaint.

    I would think that if you are approaching a key piece of information, White should get somewhat annoyed when you stop asking about her and start talking about the trees, for example. This way the player might get some clue that they’re close to something important.

    Or maybe that would make all the behind the scenes logic too complicated to track. I’m not sure exactly how it could be implemented without pissing off the player, but it seems since natural conversation encourages consistency of topic, this is something to try and model in IF NPC dialog as well.

  2. it seems like there should be a scale to track White’s desire or reluctance to continue a particular conversation thread. There are a couple times — such as when discussing what Lilith wants — that the responses from White are somewhat anticipatory, as if they’re encouraging the player to continue asking about that topic. But if you suddenly ask a question related to another topic, White will seamlessly jump into that conversation thread without any complaint.

    There are a couple of places where she will complain if you change the subject from what she wants to discuss; this is handled by hand rather than with a scale. But in general I felt the game was already leading enough that I didn’t want her to insist on followups.

    Re. time: the source of greatest delay if you played version 1 of Alabaster is actually redrawing the graphics. That’s trimmed in later builds; if you’re still seeing a delay in version 3, it’s probably a combination of graphics and the task of parsing among many possible responses (as you guess).

  3. Emily, this has been incredibly helpful. I’ve read it a few times. Thanks for taking up the question.

    When you designed Alabaster (or Galatea), did you have a specific plan for the distribution of variable-moving pieces amongst quips? Or if not a plan, a rule of thumb — ensuring that the player had the ability to move every variable either way every move, for example, or so forth — ? Or did you just wing it?

    Also, you say the variables will tend to hover around zero. Is that something you designed in, where movements away from the current status are given greater prominence in the options provided to the player, or does that reflect the fact that players will simply tend to try to change the situation, whatever it is?

    1. When you designed Alabaster (or Galatea), did you have a specific plan for the distribution of variable-moving pieces amongst quips? Or if not a plan, a rule of thumb — ensuring that the player had the ability to move every variable either way every move, for example, or so forth — ?

      No. The mood system is not in either case a chessboard; it’s not always possible to get from where you are to anywhere else.

      Also, you say the variables will tend to hover around zero

      It’s more that at the beginning of the game there are a lot of different avenues to explore, and the player who explores a reasonable subset of these will probably traverse zero several times.

      As he moves into one endgame or another, the effects tend to become a bit more consistent and build in the same direction, but then the game ends pretty soon.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: