Anticode Open builder

Build a dice roller app that understands dice notation, modifiers and history

Tabletop players don't want a die that tumbles prettily; they want to type 2d20kh1+5 and get an answer they trust, with a record of what was rolled. Anticode can build a dice roller app for D&D and other RPGs that parses dice notation, saves your character's usual rolls and keeps a history, running in the browser at the table.

Updated · By the Anticode team

The notation to support

Dice notation is the heart of a good roller. Agree with the model which forms it should parse, and test each one:

Dice notation a tabletop dice app should handle
NotationMeaningCommon use
1d20+5One twenty-sided die plus 5Attack rolls, skill checks
2d6+1d4Mixed dice, summedDamage with a bonus die
2d20kh1 / 2d20kl1Roll two, keep the highest or lowestAdvantage and disadvantage in D&D 5e
4d6dl1Roll four, drop the lowestRolling ability scores
3d6!Exploding: a maximum roll adds another dieSavage Worlds and similar systems
5d10>=7Count successes at or above a targetDice-pool systems
d%Percentile, 1 to 100Call of Cthulhu and random tables

Systems differ in edge cases, such as whether an exploding die can explode again, or whether a 1 cancels a success. Name your game system in the description, and write the rule in a sentence where it matters.

Showing the working

A result of 17 means little; "2d20kh1+5: [12, 4] → 12 + 5 = 17" settles disputes. Show each die, mark the dropped ones (struck through or faded), and highlight natural 20s and 1s. Keep a scrolling history of the session, newest on top, with a label for what the roll was for.

Is it fair?

Ask for the browser's cryptographic random number source rather than the default one. Both are fine for games, but the cryptographic one has no patterns worth arguing about. A small statistics panel (how many of each face over the session) reassures sceptical players, though short sessions will always look lumpy; that's what randomness does.

Macros and characters

Typing the same roll every turn is tedious. Saved rolls with names ("Longsword attack: 1d20+7", "Longsword damage: 1d8+4", "Sneak attack: 3d6") turn a dice roller into a fast character tool. Group them by character, so a player with two characters, or a game master with a dozen monsters, can switch quickly. These are saved in that browser on that device.

Game masters have their own needs: hidden rolls that show only on their screen, a quick initiative tracker that rolls for every combatant and sorts the order, and random tables ("roll on the tavern rumours table") they type in themselves. Each is a modest addition; ask for them one at a time and test each in a real session.

Describing it to Anticode

"A dnd dice roller for the table. A notation input supporting NdX, modifiers, kh/kl, dl, exploding !, success counts and d%. Quick buttons for d4, d6, d8, d10, d12, d20 and d100 with a count. Show each die and dropped dice faded, highlight natural 20 and 1. Advantage and disadvantage toggles. Saved named rolls per character. Session history with labels and a clear button. Dark parchment-free fantasy look, crisp sans-serif, a short 3D tumble animation that respects reduced motion."

Anticode's model writes the app, including the parser, as one program running in the browser. Animated dice can be drawn in code, in 2D or 3D, since images can't be loaded from elsewhere; keep the animation short so rolls don't slow the game.

What it can't do

  • No shared rolls. Rolls on your phone don't appear on the game master's screen or in a group chat; there's no network. Players at the same table can read each other's screens, which is how it's used.
  • No integration with virtual tabletops or chat platforms.
  • No character sheets from other services. Rolls are typed in or built inside the app.
  • Licensed content stays out. Don't ask it to reproduce rulebook text; your own descriptions of your rolls are fine.

For a game with dice at its core, a card game maker or browser game page covers full games, and a campaign's public home fits a D&D campaign website.

Questions people ask

Are virtual dice from a dice roller app fair?

With the browser's cryptographic random source, each face is equally likely on every roll. Streaks happen with real dice too.

Can it roll for a whole group of monsters?

Ask for a repeat count, such as 6 × (1d20+3), with each result shown separately.

Does it work offline at the table?

It needs no network once loaded. Installed published sites have an offline fallback; test it before game night.