Getting Started with RANDSUM

Welcome to RANDSUM! This guide will walk you through the basics of using RANDSUM for dice rolling and tabletop RPG mechanics.

Learning Path

1

Dice Notation

Learn the basics of RANDSUM dice notation and how to write roll expressions.

2

Game Packages

Explore game-specific packages for D&D, Blades in the Dark, and more.

3

MCP Integration

Integrate RANDSUM with AI agents using the Model Context Protocol server.

Quick Start

Install the core roller package:

npm install @randsum/roller
# or
bun add @randsum/roller

Then use it in your code:

import { roll } from '@randsum/roller'

// Simple roll
const result = roll('2d6')
console.log(result.total) // Sum of 2d6

// D&D ability score
const abilityScore = roll('4d6L') // 4d6, drop lowest

// With advantage
const attack = roll('2d20L+5') // Advantage + modifier

Or use it from the command line:

npx randsum 2d6
npx randsum 4d6L
npx randsum 1d20+5