Mailbag: IF Infrastructure From Scratch

I reached out to you a while ago to ask about your consultation services / fees and you told me that you weren’t taking on any new clients.  I respect that.  I was hoping you might “mailbag” my question or maybe have a little advice off the top of your head.  Any help would be greatly appreciated!  I posted this on the IntFiction forums as well and just hoping to get a little bit of your expertise / feedback.

I am working on a CYOA sandbox visual novel project. My buddy wrote a framework in C# / Unity and I’m currently writing the story in OneNote / Scrivener with articy:draft doing a lot of the node-work / structural organization. I used SimpleMind to do some high-level mapping for the sandbox but it’s been very clunky. I reverted to using Excel so I could bring direct mathematical tests into my work for planning and it’s been really tough to combine the cell-based organizational structure with blocks of text.

Creatively – I don’t write well in little bubbles…at all. I prefer writing in a Word / WordPerfect / Scrivener / Notepad setting. It’s easiest for me to see all the text, re-read what I need to, edit, etc. I’m at a point where the story is getting difficult to test / debug / and translate into Unity. At the end of the day – whatever tools I use – I have to be able to hand my work over to the developer and make sure he understands everything in as neat / concise a manner a possible.

Here’s an example of some of my code:

\INSTRUCTION((ONCLICK.CELLPHONE)(=)(0)) // sets the variable that counts the number of clicks to zero – variable declaration

\EVENT((CELLPHONE)(ONCLICK))

     \INSTRUCTION((ONCLICK.CELLPHONE)(+)(1)) // adds 1 to the counter variable

     \CONDITIONTEST((ONCLICK.CELLPHONE)(=)(1)) // tests the counter variable – boolean (true / false)

          \TRUE

               \ITEMDESCRIPTION((CELLPHONE)(ONCLICK)(This is your cell phone)) // cell phone description on the first click

          /TRUE

          \FALSE

               \CONDITIONTEST((ONCLICK.CELLPHONE)(=)(2)) // cell phone description on the second click

                    \TRUE

                         \ITEMDESCRIPTION((CELLPHONE)(ONCLICK)(This is STILL your cell phone))

                    /TRUE

                /CONDITIONTEST((ONCLICK.CELLPHONE)(=)(2))

                \CONDITIONTEST((ONCLICK.CELLPHONE)(>)(2)) // cell phone description on every click after second

                      \TRUE

                           \ITEMDESCRIPTION((CELLPHONE)(ONCLICK)(Why do you keep checking your cell phone?))

                      /TRUE

                 /CONDITIONTEST((ONCLICK.CELLPHONE)(>)(2))

          /FALSE

     /CONDITIONTEST((ONCLICK.CELLPHONE)(=)(1))

/EVENT((CELLPHONE)(ONCLICK))

The bottom line: Some of what I do is creative writing – storytelling, dialogue, and narration / item / entity descriptions, etc. And the other part of what I do is basically writing the instructions to the developer so he knows when to call which functions and how the visual novel is basically supposed to operate. Does that make sense? It’s super time-consuming because I have to partition portions of my mind to work on the tasks separately. My biggest hurdle to overcome is finding a medium in which to do this. I can’t write everything in Unity because I don’t know the C# code and that’s really what my buddy is there for. I’d write everything in Scrivener but I need the math functionality.

Continue reading

Mailbag: QBN System Variants

Hello Emily,

I was reading through your blog and, in your post dated May 25, 2017 you describe several narrative systems, and the last one you write about you name it “System with Dynamic Requirements”

I’ve been working for a couple years now (on my free time) on a system that is very similar to what you describe: A tool to create narrative very similar to the way QBN does but with dynamic requirements for actors and locations.

The main difference is that it is a system to run over a real time game and the choices are done by gameplay inputs instead of selecting or letting the game select.

The tool provides a visual-node interface to create attributes and rules. The player actions trigger events on the system (i.e. looting a body trigger and event and we can create a rule on the tool that say “when loot event is triggered add attribute looter to the player”) and the attributes are evaluated continuously by the rules and giving results (i.e. If player have looter attribute with a value higher than 5 add world attribute “looter missions activated”)

Of course, there are the dynamic requirements that I’m using as I think the player’s engagement will be higher if the characters used on the story are people they “choose” to met in the game instead of previously designed so I can check if at one point they helped someone to escape or to acquire some item or whatever and later check the list of actors and use that one to be part of the story, or I can check between the locations in the world and create a mission that use a location with a certain attributes instead of always the same location for the same mission.

My question is: Do you know about other projects working on the same line?

Sort of, depending on how precisely you define “the same line”.

I know of projects that make use of Node-RED to visually define rules for various purposes other than interactive narrative rules.

I know of IF games, including my own, that allow the player to unlock new gameplay and story sections with any item that matches some general requirement; and sometimes a puzzle will have multiple solutions, but the specific solution the player picks turns out to be important or expressive in some way, or is used to judge the protagonist’s character.

I know of experiments with dynamically-gated story elements — most (but not all) of these tools in the academic space rather than among hobbyist IF tools or (for that matter) commercial video game tools. You may be interested in Ian Horswill’s Dear Leader’s Happy Story Time, described here in an academic paper with references and mentions of other related academic projects, or here in a video talk. (The references here provide a lot of potential further searches, with context.)

I know of realtime games that serve up specific beats depending on what tags are currently matched about world state. See Elan Ruskin’s work for Left4Dead, covered in this excellent talk. This is salience-based matching for various world states, which then in turn influenced the design of the dialogue-fitting in Firewatch. Not the same as constraint solving, but relevant to some of your other points about wanting to unlock specific story beats if the player has the right background.

I do not know of an existing tool with all the features you describe: a visual interface to create the rules for a dynamic-conditions interactive narrative system, applied to a realtime experience. (That’s not to say no one’s building one. I just haven’t seen it.)

That said, I’d like to suggest that you’re opening not just a technical space but a challenging design space, and you’ll want to test your assumptions about the player experience. There are some finished, public examples of games that do play a little in this space. For instance, games in the Fable series assigned story importance to figures the player had spent time with. I would suggest, based on my experience with that, that your initial assumption (“the player’s engagement will be higher if the characters used on the story are people they “choose” to met in the game instead of previously designed”) may not be true in all cases.

 

Dagstuhl Workshop on Narrative and Social Graphs

Screen Shot 2017-11-22 at 12.30.21 AM

Graphing a Facebook network without information about interaction frequency.

I’m currently in Germany for the Dagstuhl seminar Artificial and Computational Intelligence in Games: AI Driven Game Design. Wednesday, I was part of a workshop focusing on social network analysis and its application to narrative: how are social networks graphed? What kinds of information can they contain? What data could be associated with an edge — number and recency of interactions? Emotional valence of average interaction? More than this?

And — given the graphs available — how might we build interesting narrative game mechanics that in some way made use of a knowledge of the network? Might there be games that turned on either a human or an AI interacting to modify a social graph as the primary mode of interaction? What about gameplay experience interventions that were triggered by the discovery of particular graph states?

This is interesting to me in part because I feel a lot of our game design is currently poor at facilitating stories about communities and group dynamics.

Screen Shot 2017-11-22 at 5.58.38 PMOne of several contributions from the graph theory members of the group was the idea of a “motif,” a recurring pattern from within a larger graph, which could be reasoned about. The motif here might represent the idea of a small family — all the members know one another. Many other social situations could be represented this way, including ideas like “one character knows everyone else” or “this character is a loner.”

It occurred to us that this might make the useful basis for an authoring tool where motifs were used to specify prerequisites and post-conditions for narrative moves — a little the way StoryNexus specifies numeric range prerequisites and post-conditions for its storylets.

Depending on the rest of the system, eligible narrative moves might be presented as options to the player — it’s up to you to choose which one you want to use to advance the story — or executed by an AI automatically, in which the AI would need to select among all currently valid narrative moves.

The author would have a palette of motifs to work with, and could apply these to a story segment to say “if this configuration of relationships exists in the game, the following narrative segment is eligible for use; please fill each role with an available character who fits that slot.” (This is a system with dynamic requirements, a bit more flexible than a quality-based narrative system.)

For instance, here’s how this system might express a narrative moment involving a love triangle:

Screen Shot 2017-11-22 at 9.56.26 PM

Continue reading

Twine Gardening

I haven’t published much in Twine on IFDB, but I actually use it a great deal: it’s become a prototyping tool of first resort for a wide range of professional projects, the format in which I deliver content to be converted into some other final presentation. A not-trivial amount of pro-level game story prototyping happens in Twine these days.

Which reminds me to mention that Chris Klimas has a Patreon for Twine maintenance and development, and it would be great to see that get some more support. Twine is usefully free to creators who might not be able to afford it, and long may it remain so — but I use it for industry purposes, so I pay for mine. (He’s also reachable via Unmapped Path, and has developed an engine to bring Twine pieces to mobile.)

One of the most characteristic things about writing in Twine is the business of curating the narrative map. Twine generates this map automatically, making a new passage for content every time you create a link that doesn’t refer to an existing passage, and placing that box somewhere near the originating passage. Which is fine, to a point, but very soon several things happen.

  1. performance drags and Twine takes its own sweet time inserting the box
  2. Twine’s idea of where to auto-place the box doesn’t correspond to my idea of how the contents should be visually arranged
  3. I can never zoom out as far as I want to, because even the smallest-box depiction of the Twine map doesn’t show me the whole monstrosity I’m working on

A really large portion of my time working in Twine consists of clicking back to the map view and dragging boxes around to better convey the story structure I have in mind. Pruning. Gardening. Rebalancing. Trying to make clusters of content stick together and make critical moments visible at a glance. Structuring so that I can recognize certain standard mini-structures.

For instance, both of these passages belong to a narrative that is, at the large scale, a standard branch-and-bottleneck, but the lower-level structure is actually very different:

The first diagram describes an “are you really sure you want to commit to this disaster” sequence: if the player heads down the left-hand path, they have several opportunities to opt out and rejoin the main storyline; but past a certain point, they’ve lost the game and are committed to a losing epilogue. And then, if the player survives that and traverses to the lower right portion of the diagram, there’s a big delayed-branching result with many different outcomes customized to what the player’s done so far: a narrative payoff for earlier choices. There’s some clustering to those delayed-branch results, which the diagram also tries to convey.

Continue reading

DINE

Screen Shot 2017-04-23 at 9.26.07 PM.png

DINE is, as I posted earlier, an unusual interactive fiction system that takes typed input but does not handle it through a parser. Instead, it uses text classification to find a response that is most coherent with the player’s input — a measure that depends heavily on linguistic similarity.

To author content for DINE, the author writes example player inputs (such as “I picked up the photograph”) followed by the response text that the author has in mind. Both the sample input and the actual output are considered when the system chooses a proper response. The system also applies a penalty to any output text the player has already seen.

There’s one final affordance: next to each paragraph of output is a “Huh?” button. Click it to reject the response you were given, and the system will search for the next best fit. It’s not guaranteed to work more with the story than whatever you read last, though.

DINE is not a particularly ideal tool for the kind of experience we associate with parser IF. If you do >INVENTORY twice in a row, you might well get a totally different response the second time — and one that is not especially coherent with the input. Indeed, there’s no way to explicitly author world state, other than as “pages” for the player to land on.

Different DINE pieces handle this in different ways. Olivia Connolly’s “A Quiet Street” offers quite long pages of story between interaction points, and sometimes sets up obvious single tasks for the player to try next, as for instance here, where the game directly tells me what to do:

Screen Shot 2017-04-23 at 10.30.21 PM.png

At its best — for instance, when the circumstances of the narrative made one particular action feel compelling, but didn’t explicitly spell out what that action was — this could achieve a pleasing level of fluidity, as here, where I know that there are strangers approaching the house but that my mother hasn’t seen them yet:

Screen Shot 2017-04-23 at 10.39.00 PM.png

Continue reading

Mailbag: High-Agency Narrative Systems

Today’s mailbag entry (at the request of the submitter, anonymized and edited a little) gets into the question of how to create salience and quality-based narratives and other similar games, given that typically one has to build one’s own.

What I keep getting drawn toward on a personal level is your work–and other people’s work too–on procedural narrative generation. I have enough knowledge of coding to understand states and modeling systems and when to move from one to another on a conceptual level, but at this point I could not make one in any language or engine. I think this is something I would like to learn to do more of...

Obviously I’ll need to learn a language from the ground up. That’s fine. I suppose I’m asking what would be most helpful to focus on–not just in terms of C# or Ruby or Python–but other skills as well… most of my questions/interests are about event generation, procedural chains of causality, etc.

Further discussion with the asker indicated they are talking about the kind of quality-based and salience-based narrative systems I wrote about in the article Beyond Branching; this RockPaperShotgun column about Alcyone also gets into some detail about the state of play in this space.

Systems like this can achieve a combination of player freedom and agency that is hard to reach in CYOA or any other node-based system (I would include ChoiceScript here): there are often dozens of viable choices available.

Meanwhile, because you’re not tied to a specific simulation concept (like the standard parser IF world model), you can adjust the qualities of your QBN to the particular needs of this work. Track your protagonist’s health, her interest in opera, her sense of humor, her tolerance for pain; track her relationships with each of a dozen friends, or a dozen aspects of her relationship with one friend.

On the other hand, the tooling and the design abstractions in this space are not nearly as advanced as they are for parser IF or CYOA/hypertext/stats-based IF, so if you want to work with it, you probably have to build your own.

That’s a topic that could take a number of articles, and there isn’t as much writing in this space to point to as in the parser space.

Continue reading