Software-defined dice simulation with the ability to create and share custom RNGs.
  • Python 82.6%
  • Shell 17.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-04-05 09:48:21 -04:00
dice Add files via upload 2026-04-01 18:44:17 -04:00
build.sh Bump version number 2026-04-05 09:48:21 -04:00
die2weighted-items.py Add files via upload 2026-04-05 09:45:42 -04:00
LICENSE Initial commit 2026-04-01 17:01:45 -04:00
nicedice-create.py Add files via upload 2026-04-01 18:43:32 -04:00
nicedice.py Add files via upload 2026-04-01 18:43:32 -04:00
README.md Update README.md 2026-04-05 09:45:26 -04:00

nicedice

nicedice is a program for Debian-based systems that lets you simulate dice and other simple, probabilistic mechanisms, like magic 8-balls.

Presets

nicedice comes with multiple premade dice, installed at /usr/share/nicedice/:

  • d6die.json: standard, six-sided die
  • d20die.json: twenty-sided die, most commonly used in RPGs
  • percentile.json: 100-sided die with "%" suffix, used for generating percentages
  • 8ball.json: magic 8-ball, used for answering simple yes/no questions

Creating your own dice

nicedice-create is a simple, interactive wizard that generates die definition files for usage with nicedice.

In order to use it, you need to have python3-questionary installed on your system.

Weighting numerical dice

Starting with version v0.2, you can use the die2weighted-items command to convert a numerical die file into a weighted item picker to permit manual weight editing.

The first argument is the source file, and the second argument is the destination file. If the destination was not specified, it will write to the source.

Note that weighted numerical dice are much larger than unweighted ones because of the way that they're stored.

Examples

Roll a standard (six-sided) die: nicedice /usr/share/nicedice/d6die

Interactively define a die named dreidel.json: nicedice-create dreidel.json

A note about maintainable free software

This project is governed by The Maintainable Free Software Policy v1.0. The TMFSP is an all-in-one document that provides a basic set of rules for free software projects everywhere, so that they can be kept maintainable for years to come. To learn more about the rules of this project, click the link above.