Production-ready dice rolling library for Unity. Parses full tabletop notation (`3d6+2`, `4d6kh3`) with deterministic, async, and bulk rolling for RPGs, board games, and roguelikes.⚡ KEY FEATURES🎯 Comprehensive Dice Notation Parser - Standard `NdX`, percentile (`d%` / `d100`), Fate/Fudge (`dF`), custom faces (`d[2,4,6,8]`), and full mathematical expressions: `+ - * / %`, parentheses, unary minus, and grouping `{…}`.🎲 Every Modifier You NeedKeep / Drop - `kh`, `kl`, `dh`, `dl` (D&D 5e ability scores, advantage, disadvantage)Exploding - `!` basic, `!!` compound, `!p` penetratingReroll - `r` recursive, `ro` once, `rr` reroll-and-keep (Great Weapon Fighting)Min / Max Clamp - `mi`, `ma` ("treat damage of less than 2 as 2")Critical / Fumble - `cs`, `cf` with full comparator support (`cs>=19cf=1`)Success Counting - `5d10>=8` for Storyteller / WoD / dice pools, with `f` botch subtractionDisplay Sort - `s` / `sa` / `sd` (cosmetic, totals unchanged)Math Functions - `min`, `max`, `abs`, `floor`, `ceil`, `round` for advantage rolls and capped damage🛠️ Three Editor WindowsExpression Builder - form-style composer with a dice-kind picker, full modifier coverage in collapsible sections, live canonical-notation preview, Test Roll, and Save as Asset. No more memorising `kh3` vs `dl1`.Expression Validator - instant parser feedback with severity-graded warnings.Probability Analyzer - Monte Carlo simulator (1k – 1M iterations, seedable) with mean / stddev / 95 % CI / ASCII histogram and a side-by-side two-expression compare mode.🧩 ScriptableObject-First Workflow - Every dice type is a Unity asset. Drag into Inspector slots, share across prefabs, version-control as text. Custom inspectors with reorderable lists for groups and sequences, an inline Roll Preview (seed + histogram) on every dice asset, and per-type asset icons.🎲 Pluggable RNG - Cross-platform deterministic RNG, snapshot / restore for save-games, and record / replay for bug repros and regression tests. Critical for multiplayer authoritative rolls and competitive game determinism.⚡ Async + Bulk Rolling - Run any roll on the thread pool. Roll millions of iterations into a stats snapshot (count / min / max / mean / histogram) without stalling the main thread. Provides blazing fast running statistics.🔍 Validation Framework - Catch invalid expressions, conflicting modifiers, and performance pitfalls *before* runtime. Severity-graded (Critical / Error / Warning / Info), category-tagged, with inline suggestions. Safe for user-generated content and modding scenarios.🧠 Programmatic API - Static and fluent **`ModifiersBuilder`** for typed, validating, frozen-on-Build configuration. One-line API for game code; full extensibility when you need it.⚡ Performance-First - Span-based parsing (zero-allocation hot paths), expression cache (auto-prewarmed), per-thread RNG. Designed for thousands of rolls per frame.🎮 PERFECT FORTabletop RPG implementations - D&D 5e, Pathfinder, Call of Cthulhu, Storyteller / WoD, Fate, custom systemsBoard & strategy games - advantage rolls, dice pools, weighted outcomesRoguelikes & procedural generators - exploding loot tables, weighted custom dice, deterministic seeded runsMultiplayer & competitive games - authoritative rolls with snapshot / restore RNGGame prototypes & jams - go from "I need a dice roll" to working code in one lineTools and editors - modders and designers compose expressions visually instead of editing code⚙️ TECHNICAL DETAILSFull C# source included - XML docs throughoutThread-safe parser, per-thread RNG, span-based parsingHard parser caps (`MaxInputLength`, `MaxRecursionDepth`, `MaxRollNodes`, `MaxCompoundChain`) make user-input rolling safeNo external dependencies, no third-party packagesFormal EBNF grammar included🚀 WHY DEVELOPERS CHOOSE DICE ROLLER PROSkip weeks of parser work - every notation form your players know already worksCatch errors before runtime - the validation framework reports actionable issues with severity and suggestionsCompose visually, not in your head - the Expression Builder writes the notation for youDebug probability, not vibes - the Probability Analyzer tells you exactly what your roll doesReproducible randomness - `IDiceRng` makes save-load, replay, and unit tests trivialProduction-grade performance - span-based parsing, pooled buffers, thread-safe by design📦 INCLUDED CONTENTFull C# source with XML documentationThree editor windows (Expression Builder, Expression Validator, Probability Analyzer)Custom inspectors for every dice asset type, with inline roll previewSample scene + UI script for runtime expression rollingComprehensive documentation with grammar, examples, and integration recipes🎯 Stop reinventing the dice wheel. Drop in Dice Roller Pro and ship the dice mechanics your game deserves - validated, performant, and easy to author.





