A stylized robot face made of the letters F and T.
 

Harshnag the Grim

The official Twitter account of Wizards of the Coast, modified to the persona of a giant named Harshnag the Grim.

Brief

The folks at Wizards of the Coast reached out to us again to make another bot, this time focusing on telling stories about adventurers who were signing up to save the world. The prospect of getting to customize our writing templates for over 200 adventurer portraits was too good a challenge to pass up; plus we got to write in the voice of a bombastic giant! How often does that happen?

These stories were tweeted at fans who RTed specific tweets from Wizards of the Coast. But you can play with a non-Twitter version of the generator right here! Just keep clicking "Make a Character":

Implementation

We needed to create a web-based preview for the bot and we turned to browserify to do the job. It was surprisingly easy to wrap the bot's generative code in functions and then just have those functions called by either Node.js for the bot, or by JS on a web page for the preview.

The name generation was a lot of fun. We used a modified version of Martin O'Leary's fantasy name generator and pored over D&D lore documentation to come up with sets of morphemes. The hardest thing was discerning the linguistic difference between gnome and halfling names, but eventually we figured out that gnome names sound a little more... Italian.

Post Mortem

The browser preview for the bot’s development was enormously successful. It reduced iteration time and every time we updated the data source for the bot the website automatically updated too. So our client could keep tabs on the project while we worked on it, a kind of continuous deployment workflow for a bot. We’ve kept this workflow for every client-facing bot project since.

 

The content of this article is provided under a CC-BY Creative Commons Attribution 4.0 license.