RNGenie.Dice
0.1.0-alpha.2
dotnet add package RNGenie.Dice --version 0.1.0-alpha.2
NuGet\Install-Package RNGenie.Dice -Version 0.1.0-alpha.2
<PackageReference Include="RNGenie.Dice" Version="0.1.0-alpha.2" />
<PackageVersion Include="RNGenie.Dice" Version="0.1.0-alpha.2" />
<PackageReference Include="RNGenie.Dice" />
paket add RNGenie.Dice --version 0.1.0-alpha.2
#r "nuget: RNGenie.Dice, 0.1.0-alpha.2"
#:package RNGenie.Dice@0.1.0-alpha.2
#addin nuget:?package=RNGenie.Dice&version=0.1.0-alpha.2&prerelease
#tool nuget:?package=RNGenie.Dice&version=0.1.0-alpha.2&prerelease
π© RNGenie.Dice π²
Deterministic RPG-Style Dice Roller with Notation Support
RNGenie.Dice makes dice rolling expressive, reproducible, and extensible.
Forget reinventing random rolls - just write classic RPG-style notations like 3d6+2 and get deterministic
results when seeded.
β¨ Features
- Support for RPG-style dice notation (
NdMΒ±X
). - Deterministic results when used with a seedable
IRandomSource
(e.g.Pcg32Source
). - Access to raw roll breakdowns (individual dice + modifiers).
- Explicit and Fluent API for increased versatility.
- Built to be extensible (future: exploding dice, keep-highest, adv/dis).
π Documentation
See the Dice Docs for usage and API details.
π Quick Start
Install Core + Dice:
dotnet add package RNGenie.Core
dotnet add package RNGenie.Dice
Basic usage:
using RNGenie.Core.Sources;
using RNGenie.Dice;
// Seedable RNG for reproducibility
var rng = new Pcg32Source(seed: 123);
// Roll with static DiceRoller.
var (total, rolls, mod) = DiceRoller.Roll("3d6+2", rng);
Console.WriteLine($"Dice result: {total} (Rolls: {string.Join(",", rolls)}, Modifier: {mod})");
// Roll straight from the RNG source object.
var crit = rng.Roll("1d20");
Console.WriteLine($"Crit check: {crit.total}");
Output:
Dice result: 14 (Rolls: 5,6,1, Modifier: +2)
Crit check: 17
π§© Extensibility
Extend RNGenie.Dice by:
- Adding new dice mechanics (e.g. exploding dice, keep-highest rolls).
- Supporting special notations like advantage/disadvantage.
- Integrating with loot tables or game engines.
π¦ Roadmap
- Exploding dice (
!
). - Advantage/Disadvantage notation (
adv/dis
). - Keep-highest/lowest mechanics.
- JSON-driven roll configurations.
π©βπ» Contributing
Pull requests are welcome!
Good first issues:
- Add new dice notations.
- Extend dice mechanics.
See CONTRIBUTING.md for guidance. Also, check here for existing dice issue writeups.
π License
RNGenie is licensed under the MIT License. This means you're free to use it in open source, commercial, or personal projects.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net6.0
- RNGenie.Core (>= 0.1.0-alpha.2)
-
net8.0
- RNGenie.Core (>= 0.1.0-alpha.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
0.1.0-alpha.2 | 16 | 9/13/2025 |
0.1.0-alpha.1 | 140 | 8/31/2025 |