The Next Step
Fuckin’ Shakespeare, I know. But this insipid nonsense represents an important step forward for Mouthwash, because Maryam (an NPC) is now capable of having goals: in this case, making Roni (the player character) happy and expressing her own emotions. She’s also capable of taking simple steps to meet those goals, provided she has access to a skill that will instantly produce the intended effect.
What’s going on in this exchange is that Maryam initially has the “make Roni happy” goal. Since she doesn’t know Roni’s emotional state, she uses a skill (Query Emotion) that will give her that information. Questions, when successful, have the effect of giving the listener the goal of providing the given information to the speaker. So when Roni dodges Maryam’s query with one of her own, Maryam now has the goal “express my emotion.” She does so, and is now happy because she achieved a goal. This also makes her old “make Roni happy” goal the new active goal, so she asks for the information again, and this time gets it: Roni is calm.
And that’s where things fall apart, because Maryam doesn’t actually have any skills that can make Roni happy. The bit where she says “Oh no, I’m incapable of making plans!” is just an error message triggered when the agent can’t generate any moves. (Roni ends the conversation by lying, but that’s not important right now.) This is a point in the development of this system that opens up a few questions, which I’ll be tangling with for the next week or so. Namely:
1. How should skill effects work?
2. Should I have a class system or not?
3. What’s the best way to handle AI plan-making?
Question #3 is going to take some trial and error more than anything else, so let’s put that aside for now. Questions #1 and #2 are a little more philosophical. I intended from the start to have classes in Mouthwash, but I’m starting to question that. There was a bit of talk on Twitter last night about Skyrim‘s abandonment of classes in favor of pure skill-based character development. It sounded like a good idea to me – god knows I’ve never played an Elder Scrolls game with anything other than a custom-classed character – and I started wondering why I was so stuck on classes in my system. I suppose I’d always thought of it as a way to organize skills and make the possibility space of character development less intimidating to a player, especially given that this is going to be kind of a weird system. But maybe that’s unnecessary, and I can get that organization with skill trees without putting up walls between classes?
The most urgent question is #1, as I’ll be working on it today. At this point, since I’m just testing things out, skills are always successful. But pretty soon I’ll need a way to make that success dependent on character ability and the situation. I’ve always figured that I’d use a quasi-D&D-ish system for skill effects. That is, there’s some chance of success for each action based on the stats of the speaker and the listener, plus any other buffs or debuffs in effect. But then I imagine a big conversation with more than two speakers, all with potentially conflicting goals and play styles, and I wonder if there’s not enough uncertainty in the dynamics of that system without dragging random rolls into it.
So, what do you think of classes vs. skill-based systems? Is there a good way to design a system that takes character stats into account without using dice rolls? Let me know your thoughts!

Without using dice rolls…? Gotta think about that one.
Pfff…damn keyboard. Tried to correct the misspelling in my name, and it ended up posting the comment. Tried to edit the comment, and it ended up posting it twice.
Anyway, I know some video games that use either dice rolls (visible or invisible) or some random number generator to determine success or failure. I can think of some games that use skill-based systems (Fallout 3?), but I think there’s some randomness involved there as well. Can’t think of any non-electronic games that don’t use dice, though… They’d have to take lots of variables into account, i.e. all the bonuses and penalties to a certain action, and compare the action to the number associated with the desired result: if the action number is greater than the result number, the action succeeds. Making all those calculations really slow a game down, though, unless it’s a game run by a computer; hence, you don’t see it very often at all in tabletop games.
So over on Twitter, @StephenWinson suggested I look into the Amber Diceless system. I’m pretty taken with it so far. As I understand it, the basic idea is that all character attributes are strict rankings rather than values. So instead of, say, Maryam having 10 Strength and Roni having 20 Strength, you would just say, Roni is the #1 Strongest character in the world, and Maryam is the #4 Strongest, etc. Then, anytime Maryam and Roni are having a conflict in which Strength is the ruling attribute, Roni will ALWAYS win. The tricky bit is that when their rankings are close, there’s a chance that Maryam can prolong the conflict long enough to change the situation in her favor. Perhaps by introducing a tactic that turns the conflict into something ruled by another attribute, or by doing some crazy-ass magic thing.
So, in a tabletop situation, it sounds to me like this would probably boil down to “situations resolve really quickly, unless the GM doesn’t like the resolution, in which case we all argue for an hour.” But in a digital situation, and especially in Mouthwash, I think this idea could work really well. Basically, if you know your listener’s stats, you can predict the outcome of your actions with a lot of confidence. “That’ll never work on her, she’s too smart.” But if your relevant stats are close, you have the chance to draw out a particular exchange. That sounds like a good model for conversation to me.
As an example, let’s say Maryam wants to flatter Roni to make her happy. And let’s say that Flattery is successful when the target’s Composure is less than the speaker’s Charm, and Roni’s Composure is just a bit higher than Mar’s Charm. Attempting flattery could kick them into a state where Maryam is trying to argue Roni into taking the compliment. For a couple of brief turns, Mar has the chance to use her buff/debuff skills to turn the situation to her favor; maybe she can Guilt Trip Roni into losing some Composure, or Flirt a bit to raise her own Charm. That’s an initial thought, anyway.
That method could potentially work…you’d just have to define what ‘close’ means. A contest between the 1st strongest and the 26th strongest is no contest at all…but what about between the 26th and the 29th?
Secondly, make sure that player skill figures into success somehow. If the entire process is automated, then the game technically wouldn’t need a player. Maybe different techniques are available to the player to choose from, and each one raises a different value by by a given amount. The player must choose which technique to use; perhaps those techniques become more powerful with use. I know some people who must have about 20 ranks in Guilt Trip, for example…
I don’t think I’ll adopt the ranking system – it seems a bit redundant. I expect I’ll just have stats as regular values and compare them. That means “closeness” is defined by some threshold, which I’ll figure out somehow. (I’m actually a little flummoxed about how to design character-stat scales in general. It’s so arbitrary I don’t know where to start!) That might have to come down to trial and error as well.
And absolutely, player skill has to be important. My whole big goal here is to have a conversation system that supports tactics, after all. I think I’m pretty much in agreement with what you’re sketching out here. I plan to have lots of skills, lots of customization in what skills you choose, and lots of possible ways to achieve an outcome. So Guilt Trip would only be available in a certain skill tree, say, and as you level up you might be able to upgrade it or access more powerful forms (Martyr Complex?!) and whatnot.
1. How should skill effects work?
I had planned to ask you about this at some point. I assumed — incorrectly it seems — that you were going to compare some overall statistic in the choosing of one conversation option over another.
For example, that is how Fallout: New Vegas does many transactions. They check for Barter/Speech/Intelligence/Etc and, if that conversation supports it, shows it as a valid conversational branch. Of course, that then means you have to account for all those choices /if/ you decide to have those in that single conversation.
It might be a little easier — maybe — with your system. All people — NPC and player(s) — will have statistics they could then compare in any transaction, dialogue or otherwise. Some if-then branches might allow you to construct dynamic dialogue systems — which I assume is your goal — where, if the player has certain knowledge and certain skills, they could “unlock” that branch of conversation.
3. What’s the best way to handle AI plan-making?
The very first thing I thought of upon reading “She does so, and is now happy because she achieved a goal” was that you might end up with conversation junkies within the system. If achieving goals raises happiness — I apologize for not being familiar with the attributes you listed in another post — then she could very well continue to create goals that make her happy, not unlike people doing *only* things that make them happy (i.e drug use).
What I thought of — I’m not a designer but programmer by training — was that you needed an algorithm that balanced goals for each NPC, not unlike how people sort TODO lists in their own lives. I naturally thought, since I knew you were writing this in Java, the PriorityBlockingQueue (to be thread-safe) was a possible solution.
You could create a Comparable interface to allow each goal to be sorted according to a formula that takes into account something like Intelligence — the more “smart” they are, the more organized their goals — and have NPCs cycle which goal they are working on next once they encounter an obstacle — literally a pathing problem for some NPCs who walk about.
Of course, this organization raises more complexity and time issues. Verisimilitude might be raised but lag introduced into the system at the same time.
This is @Dan, I’m just popping out the reply to get more space. That’s a really good point about happy-goal junkies. I hadn’t considered that, partly because I’ve been handwaving so far about how agents generate goals. My intuition is that goal-directed gameplay will be one of the biggest ways in which stories move forward in these games, so I should start planning how to control them sooner rather than later. Building in priorities like that sounds like a good idea. But I’d need to start thinking about how to rank goals, as well as how agents come up with a new goal. Tricky. Any thoughts?
As for the New Vegas thing. I liked that system, as far as branching systems go, but I’m really looking to get out of the branching model entirely. That’s why I’m trying to model conversations more as a simulation. Really, what I have in mind is more inspired by The Sims than any RPG dialogue system. I really want to think of “what should I say next” as a tactical decision, not choosing from a list of options (however much you complicate that choice). Skills are high-level descriptions of lines, like Guilt Trip or Flatter. A given skill in a given context may be associated with a fully written line of dialogue; if not, it’ll be displayed as an unvoiced line, like the ones in the screenshot. So there’s no natural ordering to the lines. The illusion of a cohesive dialogue will (hopefully!) be built through careful writing and a simulation model that produces plausible behavior.
[If nothing else, this conversation has made me want to start my own project to explore these ideas. I keep thinking from a programmer's point of view. I've been trying very hard not to ask you, Line, about data structures and threading -- which, it seems, I just implicitly did.]
Here is a scenario I devised:
The player enters a bar. Seeming two men, she sets about trying to seduce them. (The result, which I don’t really care about here, could be sex, information or even just to test her flirting ability.) [All stats on 100 scale.]
George:
Charm: 60, Composure: 30, Empathy: 40, Intelligence: 70, Constitution: 60, [Annoyed: 80]
Fred:
Charm: 30, Composure: 60, Empathy: 60, Intelligence: 55, Constitution: 80, [Annoyed: 65]
Default verb-set (i.e. part of every Character class): Act, Move, and Converse.
– One idea is to have Goal creation be reactive.
If the player approaches George (+5 Annoyed), he ‘Move’s one space away. Once he reaches Annoyed > 90, he ‘Move’s out of the place completely.
Fred, on the other hand, seeks out a conversation (assuming the player is not within one — you are not going to support multiple people conversing at the same time, are you?) and only gets increases in Annoyed if he cannot get into a conversation. He ‘Move’s closer unless rebuffed (+3 Annoyed). However, since he has a higher constitution — “stick-to-it-ness” — he will keep trying to start conversations.
– A second idea is to have Goal creation be timer-based (i.e. “I’ve been trying for five minutes to no success. Time to try something else.”)
George continues his ‘Act’ (drinking) until he gets buzzed and leaves (e.g. about 10 minutes).
Fred tries every couple minutes to start a conversation.
However, this creates an interesting problem. Everything has to run in “real time”.
One of the few things I liked (from a designer’s viewpoint) but also hated (as a player) was David Cage’s lesser known game Fahrenheit (Indigo Prophecy)’s use of a timer for all dialogue decisions. You have just a few seconds to make a choice. It’s worth checking out for only that reason.
— I think what you want is a “timed” priority queue though, a mix of both ideas. Each Goal (set upon its creation) has a Priority Index — preferable an int to allow easy sorting — and, depending on the character’s intelligence, can handle multiple goals at the same time. (The threshold for this, off the top of my head, could be: x75 = 3.) Unless some interrupt happens — such as a goal inadvertently being met — they are switched out (first goes to end, second becomes first) after some timed interval.
Does that make any sense?
Last comment and then I’ll shut up for awhile!
It occurs to me that the “timing” of the PriorityQueue could be based on Turn(s) instead of actual time. (Dealing with “real time” can be, let me tell you from experience, quite complicated.)
Skills could be “unlocked” from a given level of statistic (i.e. Empathy greater than 65 means getEmotion is available). Their effectiveness could be based on another attribute — like constitution (or Willpower/Pride/etc). How long a skill continues to be ‘in effect’ could be based on the number of Turns since it started.
Goal generation (and management) could be based on how long (in Turns) since they started that goal. If the Intelligence is high (greater than 75) — in my example, they manage 3 goals — then, after 4 Turns of not achieving it, they switch to the next one. If none of their goals have been achieved by some threshold — like, 5 turns each or something — then a new goal is generated to “leave conversation” or something similar.
It also occurred to me, along with the conversational junkies, that it might be possible to ‘trap’ people into conversations like you can do to NPCs in RPGs like Mass Effect (2) and Fallout 3/New Vegas. Dragon Age: Origins, on the other hand, seems to have some threshold for many conversations that trigger an ending after a certain number of options have been exhausted — some function of Annoyed or similar statistic maybe? It bothers me when I can get NPCs to say the same lines over and over and over — breaks the forth wall very quickly.
Anyway, I hope that was not too long and was, in some form, helpful. I’m quite interested in, should you get a system up and running, testing it out.
Speaking of goals and timed conversations, have any of you ever played Alpha Protocol? If any game can be said to have a better conversation system than Mass Effect, it’s that one. It may not have been a commercial success, but I really enjoyed the game, and I recommend it.