Inspiration
I've played D&D for a few years, and in that time I've seen how incredible it is for helping people to connect and socialise. It's a community of wonderful people known for their inclusivity and allyship with marginalised communities, and introducing new people to the game is a truly rewarding experience. New players though often find beginning a daunting prospect, and in particular the process of creating your first character can be a real hurdle to start playing. Between the complex rules and mechanics of character sheet creation, and the prospect of this potentially being a new player's first experience with role-playing, this step can often be sufficiently prohibitive that man people decide to not play. We wanted to create a service that would allow anyone, with or without prior knowledge of the mechanics of D&D, to describe in natural language the character that they'd like to play, and then using generative AI, we would transform that creative description into a mechanically sound, ready-to-play character sheet for D&D 5e. This means that anyone can create a unique, personal and rules-compliant 5e character sheet in seconds.
What it does
On the Input page, a user can select their preferred mode of description, we currently support both voice and typed descriptions. Often in a creative setting, people feel more free to be descriptive when speaking, so it was important for us to support this mode of input. This is also an accessibility feature, as for some people with disabilities, speaking is faster and easier than typing. Once happy with their character description, a user can submit the description to our character-creation engine, which, using a combination of generative AI and imperative code, will transform their character concept into a completed, editable, 5e character sheet PDF.
How we built it
Our client application is built using react, and our 'backend' runs on a collection of google cloud functions. We have a variety of cloud functions for different purposes, and this architecture allowed us to easily use multiple runtimes to support the various libraries and SDKs we needed to make this work. For our generative AI tasks, we are using the most recent release of Gemini 1.5 Pro (using the python SDK), with the JSON-mode and system message parameters. These parameters in conjunction allow us to request a very specific JSON schema the aligns to the schema of our custom designed form-fillable PDF file, and then our PDF-generator-helper functions can validate the data from the AI model, and inject it into the PDF blob for rendering and file export.
Challenges we ran into
D&D character sheets are surprisingly complex documents. Our custom designed character sheet PDF took multiple iterations, over 100 hours of design and engineering work, and has hundreds of fields, each with their own formatting, data validation and unique identifiers. Crafting a JSON schema, system-message and user-message that would result in reliably excellent character sheets, with data that was close enough that we could make adjustments in our validation stage, was a tall order and appears to be close to the edge of what current AI models are capable of. Getting this right took dozens of iterations, and as I write this our backend functions are on Version 5.4.
Accomplishments that we're proud of
In general our biggest accomplishment is the quality of the character sheets that we can create. Our combination of prompt engineering, schema refinement and data validation allow the service to facilitate very creative, outside-the-box character descriptions, and still be able to almost always wrangle that description into a mechanically sound character sheet. We've already introduced it to small segments of the community for feedback, and we're thrilled that the feedback has been overwhelmingly positive, even getting shared online by an artist who works for Wizards of the Coast making official art for the D&D books.
What's next for Character Crucible
While we have launched the current version of Character Crucible, we are constantly working on improvements and additional features. We have recently launched the ability to create D&D 5e Monsters instead of characters, which uses the same technologies but a different, monster-specific PDF. We we also be releasing soon the ability to create Non-player-characters. This, in combination with the monster creation, will bring our technology to existing dungeon masters to improve their games and campaigns by creating better, more creative and unique characters and creatures for the world they build. We also intend to release the following features over the next few weeks:
- Spell cards to detail the spellcasting section of character sheets, and spallcasting monsters
- Sheets for character familiars (animal companions who have actions they can take to assist their owners)
- Up-leveling for existing character sheets
- Authentication to allow people to save their collection of characters and creatures to their accounts
- React-native mobile application
Built With
- firestore-database
- gemini-1.5-pro
- google-cloud
- google-cloud-functions
- javascript
- node.js
- python
- react
- typescript

Log in or sign up for Devpost to join the conversation.