Skip to content
papuh

Building apps

A character sheet for a tabletop game

Once a week I play an online role-playing game with friends. How I built a character sheet with a rules library with AI, what the AI found in my notes and why the sheet is still only mine.

What this is about

Once a week I play an online role-playing game with friends. We play by the Czech rules Jeskyně a draci, which are compatible with the fifth edition of Dungeons & Dragons but have their own names and units. We play through Roll20, a service for playing in the browser.

My character is a barbarian. The sheet in Roll20 was half in Czech and half in English, the fillable PDF did not work well, and during play you need to know quickly what an ability does and when it is worth using.

Research first, then building

The first thing the AI did was not the sheet but an overview of what other players use. For Jeskyně a draci in Czech or Slovak it found nothing that calculates values and explains abilities. Hence my own sheet. Roll20 stayed for rolling dice.

Here too the first correction came right at the start. The AI first assumed the original English rules. When I gave it the Czech book and sheet, it turned out that the mechanics match, but the names, units and some racial traits are different. Since then the sheet follows the Czech book.

Why a page with a database and not an app

The sheet is a web page that the AI publishes for me within my Claude account, with a small database for the character’s values. The reasons:

  • we play online, I open the sheet from a laptop and from my phone, and I do not want it to depend on whether my computer at home is running,
  • after a game the AI can read and change the values without rebuilding the page,
  • for one personal sheet, a separate web application would be needless infrastructure.

Values save themselves about a second after a change. After edits the AI also saves a copy of the character to my repository, so the character has a history.

What the AI found in my notes

I had the character in three places: in Roll20 (outdated), in a PDF from the summer (a plan for the next level) and in notes from OneNote (the most current). The AI compared them and gave me the differences to decide; it did not choose on its own.

In the comparison it found mistakes in my own calculations. My attack roll included a bonus that does not belong there, and the bonus from the weapon was missing. My damage roll included a bonus that is not added to damage. The old PDF had it right; my newer notes did not.

The rules library

The rulebook has 556 pages and as a PDF it is 105 MB. The AI extracted the text and tables without images, split them into 14 chapters with an index of headings, and 105 MB became 2.6 MB. It took about two minutes.

The library is bundled with the sheet. It searches regardless of diacritics, so the Slovak “zúrivosť” finds the Czech “Zuřivost”. It has a page-by-page reader that highlights the match, and next to every ability a “search the book” button.

The book is a copyrighted work. That is why it stays only in my private sheet and outside the repository. The repository only gets a compendium: the rules that concern my character, in my own words with page references.

While writing it the AI also recorded rules that are not visible on the sheet. Exhaustion has its own table in the Czech rules, so a second frenzy in one day is weaker. Drinking a potion is an action. And when constitution goes up, hit points are recalculated retroactively.

On that same first day I had the sheet redone to look like the official one: paper, wine-red ribbons, ability shields, little stars for proficiencies. I wanted it to feel printed.

What did not work

Two weeks later, during a project check, the AI looked into the sheet’s database. The last change to the values was from the first day, so the sheet had not yet been used in a game. The check produced a rule: no new features until the sheet is actually used in a game. Two days later I worked around it myself when I wanted images for items. A photo is shrunk on upload and saved without location data.

The bigger question was how to get the sheet to the whole party. A web page in my Claude account is not enough for that: every player would need their own account, permissions would be coarse, and the sheet carries the book’s text, which I must not distribute.

The plan is a separate portal for the party with invite-only sign-in, where everyone sees all characters but edits only their own. Ability descriptions in it will be links to the official online version of the rules, because the community content licence allows rules, names and links, but not copying whole texts. The portal has not been built yet. The parts that depend on the other players wait until we have tried it in two games.

The sheet grows with the character

Until the portal exists, the sheet does the job. When levelling up, the AI offered me options and I chose. I rolled hit points with dice, not the average. The sheet got a My Rolls panel that works out initiative, attack, damage and critical damage from the level, abilities and weapon, normally and in rage. Later a My Turn panel: what I have available on my turn and a switch that recalculates the numbers for rage and frenzy.

The AI tested every version in a windowless browser at laptop and phone width, so the page would not scroll sideways. Whether the sheet proves itself at the table will be shown by a game, not a test.