RANDSUM
A flexible, type-safe dice rolling ecosystem written in TypeScript
RANDSUM provides a comprehensive collection of packages for rolling dice, implementing tabletop RPG mechanics, and building dice-based applications. Built with TypeScript, thoroughly tested, and published to NPM with full type definitions.
Game Packages
Specialized mechanics for popular tabletop RPG systems
Blades in the Dark
@randsum/bladesBlades in the Dark system mechanics including action rolls, position, effect, and stress tracking.
Daggerheart
@randsum/daggerheartDaggerheart RPG system support with hope and fear dice mechanics.
D&D 5th Edition
@randsum/fifthDungeons & Dragons 5th Edition mechanics including ability checks, saving throws, and combat rolls.
Root RPG
@randsum/root-rpgRoot RPG system implementation with reputation, relationships, and advancement mechanics.
Salvage Union
@randsum/salvageunionSalvage Union mechanics for mech-based tabletop RPG gameplay.
Tools & Integrations
MCP Server
@randsum/mcpModel Context Protocol server for AI integration. Enables LLMs to roll dice and interact with RANDSUM packages.
Discord Dice Roller
@randsum/roboA Discord bot and activity for rolling dice in chat. Supports all RANDSUM game packages with beautiful embeds and detailed roll results.
Quick Start
npm install @randsum/roller
# or
bun add @randsum/roller import { roll } from '@randsum/roller';
// Simple roll
roll(20); // Returns 1-20
// With notation
roll('4d6L'); // Roll 4d6, drop lowest
roll('2d20H'); // Roll with advantage Or use directly from your terminal:
npx randsum 2d20 # Roll two twenty-sided dice
npx randsum 4d6L # Character stat roll (drop lowest)
npx randsum 2d20H # Roll with advantage