Interactive Fiction

RPG-Inspired NPC Dialogue Tree in ‘Ink’

Ink is a pseudo-coding language and software that allows for the creation of interactive fiction, branching narrative experiences, and simple choice-based games. I learned how to use the language for this project, and plan to use it for all future narrative-led projects I build.

After designing a miniature campaign story for a tabletop roleplaying game set within the lore and following the rules of Root: The Roleplaying Game, I wanted to experiment with treating what I had written as if it were part of a complex RPG like Pillars of Eternity or Divinity: Original Sin, games which both inspired me as a writer. This has essentially been done before with classics like Baldur’s Gate, and I think it’s an excellent exercise in testing how expressive you can be whilst on quite a tight word budget.

Time Length

~7 days

Role(s) With Project

Writer, Programmer

Programs Used

Inky

In the rule system for the game I am following, each player character features many relevant traits that can be drawn upon not just for roleplay but also to create dynamic interactions with NPCs. There are dozens of traits each character could have, but when grouping together similar types and/or picking out very specific ones, a lot of flavour can be added. I decided to write checks for character traits that could provide variety in the dialogue and narration of the conversation, to both allow the player to sit more comfortably in their character, but also to potentially influence their choices to better reflect the traits their character has. 

For example, if your character is an exemplar of morality, they may not appreciate the blasé attitude of a retired military officer. The narration will then add an extra comment, almost written as if to suggest it’s a thought from the player’s own mind.

Or perhaps the player character may be trained in a certain skill or possess a personality that allows them a unique perspective on things. The player will then have access to dialogue options that others wouldn’t, and in select circumstances this can actually help them bypass dialogue obstacles, but could equally create more for you down the line. Just because a dialogue option is available, it doesn’t mean it’s necessarily the right choice.

The context for the actual conversation is that the player has been tasked to investigate a potential contraband fencing ring in the town of Rooston as part of their main quest to track down a missing weapon. Their first port of call is to interview its Regent, Guy Chabot de Jarnac. Over the course of the discussion, if they are thorough, the player can uncover that Guy himself is responsible for the moving of contraband. 

However, if they’re not careful, the player will be tricked into a time-wasting side mission dealing with a group of bandits first that is completely unrelated to their primary goal, accidentally tying up a loose end for the scheming Regent.

If you wish to play out the conversation in your own way, the full Ink script is available here, and a playable browser version here.