Expand description
§NoctisRoll
A modern, modular TRPG dice rolling system implementing the OneDice standard.
§Features
- Modular design: Each dice type is implemented as a separate module
- OneDice standard: Full implementation of the OneDice specification
- Type safety: Strongly typed API with compile-time guarantees
- Extensible: Easy to add new dice types and operations
- Performance: Optimized for both single rolls and batch operations
§Quick Start
use noctisroll::prelude::*;
// Roll 2d20 with advantage (keep highest)
let dice = StandardDice::new(2, 20).keep_highest(1);
let result = dice.roll();
println!("Roll: {}", result);
// Parse and evaluate a dice expression
#[cfg(feature = "parser")]
{
let expr = "2d20kh1 + 5";
let result = noctisroll::eval(expr).unwrap();
println!("Result: {}", result);
}Modules§
- core
- Core types and traits for the dice rolling system
- dice
- Dice type implementations
- error
- Error types for the dice rolling system
- parser
- Parser for dice expressions
- prelude
- Re-exports for convenient usage
- tool
- utils
- Utility functions for dice rolling