dotnet add package DiceRoller --version 4.2.0
NuGet\Install-Package DiceRoller -Version 4.2.0
<PackageReference Include="DiceRoller" Version="4.2.0" />
paket add DiceRoller --version 4.2.0
#r "nuget: DiceRoller, 4.2.0"
// Install DiceRoller as a Cake Addin #addin nuget:?package=DiceRoller&version=4.2.0 // Install DiceRoller as a Cake Tool #tool nuget:?package=DiceRoller&version=4.2.0
Extensible and well-documented dice roller with a robust set of features. Excellent for play-by-post forums, virtual tabletops, or for integrating into character sheets or encounter managers.
|.NET||net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows|
|.NET Core||netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1|
|.NET Standard||netstandard2.0 netstandard2.1|
|.NET Framework||net452 net46 net461 net462 net463 net47 net471 net472 net48 net481|
- Antlr4.Runtime.Standard (>= 4.8.0)
- System.ValueTuple (>= 4.5.0)
- Antlr4.Runtime.Standard (>= 4.9.2)
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
- Some DiceAST subclasses were removed. The DiceAST class hierarchy is considered an
implementation detail and not a public API for the purposes of semantic versioning. However,
the change is being noted here so any library consumers incorrectly casting to or using these
subclasses can audit their code.
New user features:
- The rerollN() function now accepts any numerical expression for the first argument
(max # of rerolls) e.g. 1d20.rerollN(2+3, =1) or 1d20.rerollN(1d6, =1)
- The rerollN() function can now be specified multiple times for fine-grained reroll control
e.g. 1d20.rerollN(2, =1).rerollN(1, =2, =3) rerolls either a "2" or "3" once but rerolls a
- More informative error messages if you omit something when specifying an extra on a roll
- Dice expressions are no longer case sensitive. Roll 1d20 or 1D20, whichever you prefer!
- Defining a success condition is no longer required when all you want to do is define
a failure (negative success) condition
- New function explodeOnce() / !eo to perform an explode operation at most once.
- New function implode() / !i to act as the inverse of explode; when the comparison is met a new
die is rolled and subtracted from the result. This continues until the comparison fails.
- New function implodeOnce() / !io to perform an implode operation at most once.
- New function compoundImplode() to perform an implode operation with compound semantics, causing
a single die to be sent as output containing the final result of the implode operation.
New developer features:
- Builtin functions can be overridden by custom functions by registering a function with the
- Builtin functions can be removed
- Custom functions can be registered with the same timing as builtin functions
- Custom extras can be registered along with custom functions
- Custom functions can specify how multiples of the same function are executed when attached to
the same roll
- Custom functions can specify how their arguments should look, and will be validated before being
- XML documentation added to all classes, methods, and properties for better IntelliSense.
Improving the XML documentation quality is still a work in progress, please leave suggestions
in a new issue on GitHub!
- Fixed nullability annotation for DieResult.Data; this string can be nullable and has always
defaulted to null
- Dice.BuiltinFunctions and Dice.BuiltinMacros are deprecated; please use their counterparts in
the Dice.Builtins namespace if you would like to directly call any of them from within your
custom functions/macros. These two classes will be removed in the next major release.
- DiceErrorCode.InvalidSuccess is deprecated and no longer used by the library. This enum value
will be removed in the next major release.
- Direct access to the DiceAST classes and the parser is deprecated; these will become
inaccessible or transition to using a public interface instead of exposing the classes directly
in the next major release. No deprecation notice is emitted while compiling for these
- .NET Framework 4.5.2 support is deprecated; support will be dropped when .NET Framework 4.5.2
reaches end of support from Microsoft on April 26, 2022. Circumstances in the future may cause
an earlier removal.
See https://skizzerz.net/DiceRoller/Changelog for more changes.