• Register
Post news RSS The Conversation Crafter

This is the touching story of how Eastshade came to include characters, and how the conversation crafting game app tool thingy was born!

Posted by on

There was once a time where I was unsure of whether Eastshade would feature non-player characters. My initial plan was to make the game as if there weren’t going to be, and then add them if I had time/money left over. After much head scratching, I started to feel like the design challenges of creating intrigue without characters loomed larger than the technical challenges of implementing these characters. I think we are inherently interested in our fellow humans, and while there is charm in desolate worlds such as Myst, I’m more excited by the prospect of an inhabited world. I can only prescribe narrative excuses for scattered notes and recorded messages so many times before the tactic wears thin.

At this point in development, characters are a pillar of Eastshade’s world design, and many points of interest in the world rely on them. I’m trying my hardest to make them feel like inhabitants, rather than info booths or quest pickup points. In my efforts, I’ve created a scheduling system so that they can be programmed to go about their daily business, and have conversations with one another as well as with the player.

The dialogue interface. NPC model is WIP.

The dialogue interface. The character model is a work in progress.


With NPCs now a massive part of the game, there came the need for an elegant way to wire up conversations. I could immediately sense that scripting every conversation in C# would not do, so began my journey to find a solution. The first thing I tried was Unity’s Asset Store, as there are a number of dialogue suites for sale there. I’d settled on one for a while. The tool had some quirks that made things more difficult than they needed to be, but at the time I felt creating my own tool would be a net loss time-wise. After about 10 conversations, I grew to loathe the task. Because of how much I dreaded doing it, I found myself avoiding the creation of new conversations, opting to focus on anything else I could conjure up an excuse for. When I came to realize this, I made the decision to roll my own solution. I decided that even if it turned out to be a net time loss, net joy is also something worth considering in production.

convo-markup

The markup language. Perhaps “string data format” is a more suitable name for it.


I initially tried to make a sort of conversation markup language, where I defined each conversation stage with an ID and tags for the data. I opted to make something very specific for my needs rather than using XML. I’d write these text files, and I had a parsing function in C# that read all the strings from these text files and stored the data in a serializable class to be saved in the Unity prefab. Clearly this was an ingenious idea. Except that it wasn’t. Authoring these text files turned out to be even more nightmarish than the asset store tool I’d been using. It was impossible to keep a mental image of which choice went to which stage of the conversion.

fake-convo

This is a fake conversation to demonstrate how the system works.


So my first attempt turned out to be a failure, but not all was lost. I’d written a GUI Manager and data structure that worked very well, I just needed a different way to author the data. I now knew that I would need to take the more conventional route of a visual node based editor to wire up my conversations. I’d already lost days on my first failure, and was rabid to kick the problem in the face with vengeance. I thought hard about how I’d go about it. Writing a unity editor extension seemed sensible, but after some research, it seemed zooming (ABSOLUTE NECESSITY FOR A NODE EDITOR) was going to be tricky to implement. I contemplated writing a standalone app, but as a fairly green programmer, I’m not terribly familiar with any GUI libraries other than Unity’s. Then I had a crazy idea…

Of all the GUI libraries I’ve used, Unity’s new run-time UI (UnityEngine.UI) is the one I understand the best. With that one, I knew I could crank out a node editor with flying colors. I could even build the project as a game itself, and have myself a standalone app to work in. I would author my conversations in this game/app/tool monstrosity, and it would save out these text files in the markup I’d created. With my conversation assets being human readable text files, I could open them to make quick edits that didn’t require seeing the whole node tree. I could run any search and replace functions a text editor has at its disposal. So this turned out to be the winning solution.

big-convo

A medium size conversation.


With the conversation crafter “game” being a portable standalone app, as well as highly specialized for Eastshade’s needs, an understanding Unity scripting is no longer needed to implement conversations into the game. This has enabled my partner, Jaclyn, who is creative and like-minded, but isn’t a programmer, to contribute weird and interesting characters to the world! All in all, this detour took a week or so, which isn’t substantial considering how much more palatable this aspect of development is now. I no longer have the trepidation when I need a new conversation, and that has been well-worth the price.

Comments
drjd24
drjd24

Monkey ears, monkey ears, monkey ears :) So! Will the NPC's attempt to start up a conversation with the player out of the blue? One part of games that strike me as odd is the silence of the NPC's. They have lively conversations with you. But, they are only chatty when initiated. Will the NPC's talk amongst each other? If you stare at them for a long time will they ask you why you're staring? Will they feel alive? :D

So many questions :)

Reply Good karma Bad karma+4 votes
DannyWeinbaum Author
DannyWeinbaum

Yes to all of those! They can approach you, and approach each other. You can watch a conversation unfold. They start to say things to you if you stand in their personal space for too long. One of the advantages to using text only is that it becomes feasible to crank out tons of highly conditional dialogue.

Reply Good karma+3 votes
Arcones
Arcones

This is genuinely one of the most impressive things I've seen on ModDB in a while... and I've been here over four years!

Reply Good karma Bad karma+1 vote
DannyWeinbaum Author
DannyWeinbaum

Thank you! Which part is impressive? The dialogue stuff? Now I wonder if I've over promised!

Reply Good karma+1 vote
lents12
lents12

This looks amazing, man!

So, the conversations will definitely be more in-depth than the 3-path thingie Bioware usually offers...

Reply Good karma Bad karma+1 vote
DannyWeinbaum Author
DannyWeinbaum

I'd be skeptical to say that there will more choice paths than a Bioware game. It is easier to make dialogue branches, someone still has to hand-author them. Additionally, if I want to provide feedback to the player's actions other than dialogue (like an actual action from an NPC) I'm still fighting with the content creation problem of multiplicity, and I have less than 0.1% of Bioware's resources to grapple with it!

Reply Good karma+2 votes
lents12
lents12

Ah', yeah', that makes sense.

Reply Good karma Bad karma+1 vote
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.