*Last week I tweeted about the concept of narrative states and how to plot and think about them. This post is a bit of an expansion on that tweet thread. Thanks to everyone who responded there. I’ve answered some of the questions I received, and added some extra resources and images.*

Suppose we have a dating sim where outcome is decided by the player’s relationship stats to three characters, and the player has loads of chances to increase relationship with any/all of them. It can be tricky to reason about the design of this.

However, we might choose to make the outcome of our story depend on which suitor we currently like best. Now we can collect a score every time we do something that indicates liking a particular character, and then calculate percentage of interest in each character, thus:

darcy_percentage = darcy_likes / (darcy_likes + wickham_likes + collins_likes)

Needless to say, this value is undefined until the player has expressed an interest in at least one character. Do not divide by zero.

Darcy’s percentage, Wickham’s percentage, and Collins’ percentage have to add up to 100%, which means that we can plot these three variables in two dimensions, with a ternary plot. Three suitors, four story outcomes.

Immediately this chart shows us where the player might get confused or frustrated about why they got the outcome they did — because there are some points of really abrupt state transition.

We can tweak this a couple of ways.

We could make that central solitude outcome bigger, for instance, so the player has to be more committed to one suitor in particular in order to end up with them. Or we can add “warning” zones, and trigger events that will let the player know they’re on the verge of changing to a new state. This can be really useful in giving players a sense of stakes.

And obviously we don’t have to make all three suitors equally likely to succeed. The narrative chart helps us reason about how to make one outcome harder to reach than others.

We might for instance say that the player has to have put at least 80% of their effort into Darcy in order to have a chance at ending up in Pemberley.

In fact there’s no reason to confine ourselves to interesting outcomes at the pointy ends of the graph. We could get all kinds of blended stories out of this.

We can also use the chart to test completeness. We might have some storylets/events/dialogue that are only accessible in particular configurations, and laying those out on the chart will help us see where we lack coverage. Apparently we need to write more for Collins-lovers here:

Finally, we can even use this to visualize different player trajectories over time. Elizabeth’s canonical journey through the narrative space might look something like this:

*Pedantic side note*: Strictly speaking, Elizabeth’s position starts at *undefined*, and then the first time that Elizabeth has a negative experience with Mr Darcy, she should wind up at 0% pro-Darcy and thus at the 50% mark between Wickham and Collins. The percentages on the chart aren’t terribly meaningful until after the player has had a chance to express a couple of preferences. However, this is what the player chart could look like if we consider stats at the end of every major scene of interaction, say.

#### What if the PC really really wants to be alone?

The charts we’ve looked at so far all assume the player is choosing between three people to marry, and can only wind up alone if they manage not to commit too much to any one option. We could also model a system where “wind up alone” is a positive outcome that the player can consciously pursue.

**Could the suitors wind up with each other instead?**

Sure! You can assign whatever outcomes you want to the chart.

Maybe that starts to feel like a headache because there are too many characters’ mutual attractions to parse. But we can *pick different stats*. Suppose instead of tracking how much the protagonist likes each suitor, we instead track how much attention the player has given to each possible pairing. We’ll also ditch Mr Collins for the moment, for the sake of clarity:

Changing stats like this might have other significant implications for your game’s content and verbs. You might need a way for the player to increase the Darcy-Wickham score — which might mean that the player is able to alternate controlling different characters, or that Elizabeth is a meddling matchmaker for instance.

But this is actually useful information from a game design point of view! If the game you want to write is one that promises truckloads of possible pairings, then designing backward from those possible end states to the necessary stats, and from the stats to the verbs, will help you make sure you get there.

**Is this only for dating sims?**

Not at all. I’ve used the dating sim example because it’s a quick shorthand, but in fact there are loads and loads of situations where we want to allow the player to gradually express a choice over the course of a scene, using 2-4 variables.

A number of my projects for Versu or Character Engine involved dialogue scenes with several potential end situations for how you relate to a *single* NPC:

**Is this model going to be hard to engineer?**

Not necessarily. You could implement this type of story with Twine, or ink, or a storylet-based system. The concept holds as long as you have the ability to increment variables and then the ability to do that basic percentage-finding math, and also the ability to make content appear conditionally based on the results of the percentage-finding.

Then you can write conditions to express your state space like

if darcy_percentage > 80, show pemberley_ending.

**Could we show the player this chart?**

Yes, of course you could.

You probably want to put some different art on it. You might want to label the outcomes differently, too, to distinguish between what the author knows about outcomes and what the player and/or protagonist are supposed to know. Perhaps we label the “Wickham” corner of the graph as “married to Wickham” rather than “Scandal” if we don’t want to give away the twist that Wickham is not a good person.

Giving the player explicit information about their stats and the likely outcome of those stats tends to encourage people to play a scenario in a game-y way, and to reason about how to get to the outcome they want. Sometimes you might not want to do that.

But even if you’re *not* doing that, you may want to be doing more to indicate in the dialogue/text/gameplay what is currently at stake in the story. It’s a few years old now, but I gave a keynote at ICCC about Versu where I talked about the ways that players didn’t necessarily recognize the peril they were in, negotiating a scene with an NPC who could choose to have them killed.

Making that peril clearer to the player would have intensified the scene even for players who weren’t in serious risk of entering the problematic area of the state space.

**What about cases with more or fewer variables?**

The two variable case is just a point moving back and forth on a line (or if you use Choice of Games terminology, an “opposed stat”), so that’s not hard to understand but it’s also less expressive than the three variable case. Of course, you could have multiple pairs of opposed stats:

Or here’s a case where we’ve got one binary opposed stat and one ternary stat. We’re keeping the same suitor layout as before, but now we’re modeling Elizabeth’s personal wealth as well. If she’s very poor, she has no choice but to marry anyone who offers — so she’ll get stuck with Mr Collins frequently if she’s not careful. If she’s wealthy, though, she can afford to ignore Collins and wind up alone a lot of the time.

I haven’t tried to draw Wickham’s outcomes on this graph because it was getting hard to see everything, but we could also imagine that a rich Elizabeth could marry Wickham on the strength of her own income, with a different scandal outcome if she’s poor.

Finally, if you want to have four variables, you could build a tetrahedron-based quaternary plot. Maybe Elizabeth winds up keeping house with Charlotte Lucas.

For that matter, you could have as many variables as you like, as the points of a simplex of arbitrary size. It’s just that once you get past the four variable case, you’re creating a plot of more than three dimensions, which is challenging for most of us to hold in our heads.

On the other hand, those higher dimensional cases tend to be confusing for players as well. Even if we have a dating sim with, say, six possible love interests, it’s likely that we won’t want to write separate different endings for these two cases:

- Darcy / Wickham / Bingley / Col Fitzwilliam / Mr Collins / Denny
- Darcy / Wickham / Bingley / Col Fitzwilliam / Denny / Mr Collins

Probably the player isn’t going to care a lot about the fine details about which suitor wound up at the absolute bottom of the heap. Not to mention that the combinatorics of this are going to be horrendous. Do you really want to *write* a distinction between those two outcomes? Likely not.

Very frequently, it makes sense to think about state differentiations based on the player’s top two or three suitor choices. At that point we can use a set of ternary plots rather than needing a five-dimensional simplex to represent all the possibilities.

#### Only 2-4 variables? Really?

**At one point you talked in your Twitter thread about a given scene only needing 2-4 variables**. **What do you mean by a scene? Does this apply to a larger game? How many stats do you in fact need for a larger game?**

This is a point that I didn’t really have room to dig into too deeply on Twitter, but it’s worth distinguishing how we think about states, qualities, and outcomes in the small scale (perhaps for the entirety of a short game, or for a single scene within a longer game) vs. how we think about them on the large scale (for instance within a game that runs to two hours, or ten, or sixty).

In an interactive work, I think of a scene as a chunk of content that

- observes the dramatic unities, taking place at one time in one place with the same or mostly the same set of people
- has something specific at stake — will the player agree to take on a quest? does my mother like me? will I find out an important secret?
- ends with some significant change of world state from how things were at the beginning of the scene

Within that scope, there often isn’t room to make the player understand and care about more than a few things. Often, a binary tension is already plenty! Will I do the thing that’s good for my career, or the thing that’s good for my romantic relationship?

That scene might be one small bit in a much larger story architecture, where there might be other important values and relationships in play as well.

It can be useful to have a couple of layers of stats, one that operates within a scene (giving +1 Minor_Darcy when you so much as smile at the guy) and then another that operates over the course of the whole narrative (giving +1 Major_Darcy when you’ve resolved an entire scene in Darcy’s favor).

You could then employ these same methods at both the micro and the macro levels.

**Related resources**:

- Set, Check, or Gate — On when to set stats and when to make use of existing stats
- Moods in Conversation — On two-axis, independent variables used to track moods during dialogue
- Adventures in Text — Jon Ingold’s GDC talk in which among other things he talks about the value of using opposed stats in the two-variable case; the whole talk is good, but the relevant portion for our purposes starts around minute 36

Regarding the “only 2 to 4 variables” and the “Elizabeth’s position starts at undefined” tidbit I would like to try the following thought experiment.

From a mathematical viewpoint, I am now trying to visualize a point in the n-simplex as a uniformly distributed n+1 dimensional probability vector. I conceive a circumscribing hypersphere for the simplex (that hypersphere passing through all the vertices of the simplex). The hypersphere is itself inscribed inside an hypercube.

As the dimension n goes to infinity nearly all of the high-dimensional space in the hypercube is far away from the center. That is, a high-dimensional hypercube consist almost entirely of the corners of the hypercube, with almost no middle (i.e. the volume inside the hypersphere is vanishingly small in the limiting form). Since the n-simplex is itself inside the hypersphere this means that a random point in a high dimensional simplex is so close to the center that it is ridiculous (i.e. starting at the center is a good approximation).

[I have been experimenting with > 100-simplices for tracking the evolution of character relationship states since circa 1995. I am glad to be reminded of this concept by your blog entry.]