On StoryDice, Character Sheets, and Macros

What is StoryDice?

For a while now my main side project has been writing “StoryDice,” a chat bot that facilitates playing Dungeons and Dragons Fifth Edition via text chat on Discord.

Version one has been complete for a while and features a dice roller, a custom programming language for making macros, and a moderately complex character sheet where you can put in your character stats.

More About the Character Sheets

Putting your character and weapons into StoryDice allows you to use an !attack command. Doing so uses your current character’s stats and defined weapon to roll for an attack and damage, making sure to handle critical attacks correctly. It was meant to be incredibly convenient and I still believe is incredibly convenient when it is relevant.

What happened in practice is that people have been using the macro language to create their own attack macros. I haven’t collected stats to tell for sure, but it feels like basically nobody uses just !attack and everyone has their own custom commands.

Version Two Goals

Version two of StoryDice has so many goals that it borders on unrealistic.

Reduce Reliance on Macros

I should be clear here. Macros aren’t going away. In fact, they are getting more powerful (keep reading). But I find the fact that macros are being used to do things that the character sheet should be handling to be unfortunate and an indication that the character sheet is not living up to its own goals. My method of reducing reliance on macros is basically to make the character sheet better. I put it down as reducing reliance on macros because that’s how I will be measuring how well I achieved this goal.

Switch to Actual JavaScript for Macros

The macro language for StoryDice grew somewhat organically. In the beginning I did not intend to create a language, though eventually I realized that I had done so and kept maintaining it as a language. It has some fairly odd limitations as a result of being organically grown, and it cannot naturally do some pretty simple things such as looping a fixed number of times.

One of the most complex things I am doing for StoryDice version two is changing the macro language to JavaScript. The custom language was based on JavaScript originally, so it’s not the hugest change, though as I get deeper and deeper in I realize that it’s a bigger change than I originally expected.

At some point I should write a big long post about how many weird technical things I’m having to do to make JavaScript support the weird things my language supported. Yeah, I’m going to half-commit to that. My history with promises on Medium indicates I may not actually do that in reality.

A Companion Website

Part of the reason that people don’t use the built-in character sheet is that it’s cumbersome. At least some of the macros people have built are things that the character sheet can do for them, but they possibly just don’t know. Turns out, it’s difficult to make an interface for something as complicated as a character sheet in text.

So one of the goals in version two is to have a companion website so that you can edit your character sheet via a website.

If I’m going to have a website anyway, why not do more? The website is currently planned to basically be my take on Roll20. There will be many similarities, but also some differences that I’m not ready to enumerate just yet (largely because things are still in flux).