# ndice A dice rolling library for games. [![builds.sr.ht status][build-badge]][builds] [![ndice on PyPI][pypi-badge]][pypi] [build-badge]: https://builds.sr.ht/~donmcc/ndice.svg [builds]: https://builds.sr.ht/~donmcc/ndice [pypi-badge]: https://img.shields.io/pypi/v/ndice [pypi]: https://pypi.org/project/ndice/ `ndice` is a package for rolling dice expressions like **d6+2** or **3d6-3x10** with a compact API. >>> from ndice import d6, d8, d20, d100, mod, times, rng, roll >>> if roll(rng, d100) <= 25: ... copper = roll(rng, d6, times(1000)) >>> str_mod = mod(-1) >>> magic_sword_mod = mod(+2) >>> ac = 13 >>> if roll(rng, d20, str_mod, magic_sword_mod) >= ac: ... damage = roll(rng, d8) ```{toctree} :maxdepth: 2 :caption: Contents: Concepts API Reference Project ```