Quests and princesses and chat, oh my.
Here at the Chinese Room we are all about storytelling. Our games are rich in narrative and the way we tell them, and for the story to make sense, we need to give the player something to do, other than just walking.
My name is Nick and I make sure that our team are able to tell stories and give the player things to do.
As a studio working on two large projects, we have to be smart about how we use our technology. We’re building systems that are used on both Vampire the Masquerade: Bloodlines 2 and Still Wakes the Deep and fits the needs for both those teams and makes everyone’s work easier. As a narrative studio, that means tools for storytelling.
Storytelling involves more than just the spoken word. We may want to travel across the land to obtain the magical artefact that unlocks the door to the princess’ castle. I’ll stop here before I embarrass myself more with my lack of narrative ability. The point remains, in a few words I can describe something of a story and it materialises in your imagination.
Let’s back up a bit, it’s easy for us to interpret, but how do we get the game to recognise that you have got the magical artefact and how does picking it up then unlock a door to allow you to progress in your quest. How do we do that?
Our answer was to develop a way of describing the story as a sequence of events that the game engine can interpret, we call this mission scripting.
Mission scripting is a high level way of representing a sequence of events that the player may need to solve in order for the story to progress. For instance, you may need to find a key to open a door. We do this by representing the state of the game story and the event that will drive the story forward. In this case, opening the door; we look for a key, and only once we’ve found the key can we open the door, and face whatever is in the room.
Here's a screenshot of how this might look in our mission scripting system.
Example mission in the scripting system.
In a proper game story, there will be hundreds of states, on many story paths, here’s a small snippet of one of the missions in one of our current games.
There’s a lot happening, but having a simple way of defining the mission structure allows our design team to quickly iterate on the missions and get them as good as they can be.
That’s the doing bit, but what about the talking?
Branching narrative is complex. From each decision point the story can go many ways. Rather than write our own tech for this we decided to use Ink, an open source narrative scripting language created by Inkle studios. We needed to port this from C# to C++ to get it working with Unreal, but this was way quicker than writing our own narrative scripting system from scratch.
Visual example of a text in Ink. Not part of Bloodlines 2.
Ink allows our narrative team to create the spoken word that accompanies the mission scripting to tell the story of the game. This is written as a narrative script, much in the same way that screenplays are written for film and tv.
Arone, our principal narrative designer, had this to say about using Ink for narrative creation.
Arone Le Bray: “It's interesting... There are definitely a bunch of things that I like about it and I think those are mostly from the point of view of how we have integrated it. We can use the basic scripting language inside it to make scenes that are non-linear and have reactivity without having to re-write the same scene multiple times.
Then, being able to put a single conversation file into a block that fires in-game, without needing to be fiddly with a lot of scripting there? Also lovely.
But yes, it doesn't have a huge barrier to entry for using it as newbies, or even sharing our work with other teams. At its base, it's a word document, but the fact that the Ink formatting is present lets us make that word document (which most people already understand) into a functional, nearly-live game development tool? That's a HUGE win.”
How do we then make that into animation and audio?
Our solution was to introduce the ‘dope sheet’. We stole this name from the animation industry, but essentially for each line of dialogue the authors create, we can specify an audio event, along with animations for the face and body and a bunch of other things. The dope sheet is like a spreadsheet in excel, but with bells and whistles that allow us to preview audio and animation as we set up the scenes for dialogue in the game.
When the player makes a text choice in the game, the system presents that choice to the Ink runtime, in return we get a text response which we cross reference via the dope sheet to get the animations and audio to play to show back to the player.
Combining mission scripting and Ink have given us a very flexible and powerful system in which we can tell stories. We are using these systems on all the titles we are creating.
As we’ve had so much of a step up from using ink, we thought it only right to give something back, and so we have created Inkpot, which is a lightweight blueprint friendly wrapper of our C++ port of the Ink runtime. This is now freely available from our GitHub site. You can download this tool and use it in Unreal for yourselves. If you do, let us know! We’d love to see what people create.
GitHub - The-Chinese-Room/Inkpot: Inkpot - a container for Ink
What’s Next
Coming later this month is the much awaited extended gameplay reveal video. In another two weeks we will also bring you a developer diary.