Skip to content

Games Overview

RANDSUM includes specialized packages for popular tabletop RPG systems. Each game package wraps the core @randsum/roller engine with game-specific validation, roll configuration, and result interpretation.

D&D 5th Edition

@randsum/fifth — Ability checks, saving throws, attack rolls with advantage/disadvantage.

View documentation

Blades in the Dark

@randsum/blades — Dice pool action rolls with critical, success, partial, and failure outcomes.

View documentation

Powered by the Apocalypse

@randsum/pbta — 2d6+stat rolls for Dungeon World, Monster of the Week, Apocalypse World, Masks, and more.

View documentation

Daggerheart

@randsum/daggerheart — Hope and fear dice mechanics with amplification and advantage.

View documentation

Root RPG

@randsum/root-rpg — 2d6+bonus with Strong Hit, Weak Hit, and Miss outcomes.

View documentation

Salvage Union

@randsum/salvageunion — D20 table-based rolls for mech combat and salvage operations.

View documentation

Every game package follows the same pattern using the createGameRoll factory from @randsum/roller:

  1. Validate — Check the input arguments (e.g., modifier range, dice pool size)
  2. Convert — Transform game-specific input into standard RollOptions
  3. Roll — Execute the roll using the core roller engine
  4. Interpret — Transform the raw result into a game-specific outcome
// Each game package exports a `roll()` function with game-specific types
import { roll } from '@randsum/fifth'
const result = roll({ modifier: 5, rollingWith: 'Advantage' })
// result.result is the game-specific outcome (number for D&D 5e)
// result.total is the final total
// result.rolls contains the raw dice data

All game packages share these characteristics:

  • Export a single roll() function as the main API
  • Accept game-specific input types (not raw notation strings)
  • Return a GameRollResult with both raw and interpreted results
  • Validate input and return errors rather than throwing
  • Depend only on @randsum/roller (never on each other)
  • Ship under 7KB bundled

Install game packages individually. Each one pulls in @randsum/roller automatically.

Terminal window
# Pick the games you need
bun add @randsum/fifth
bun add @randsum/blades
bun add @randsum/pbta
bun add @randsum/daggerheart
bun add @randsum/root-rpg
bun add @randsum/salvageunion
PackageDiceInputOutcomes
@randsum/fifth1d20 or 2d20modifier + rollingWithNumeric total
@randsum/bladesNd6 poolcount (number)critical, success, partial, failure
@randsum/pbta2d6stat + forward + ongoing + advantagestrong_hit, weak_hit, miss
@randsum/daggerheart2d12 + d6modifier + rollingWith + amplifyHope/Fear outcome + total
@randsum/root-rpg2d6bonus (number)Strong Hit, Weak Hit, Miss
@randsum/salvageunion1d20tableName (string)Table result with label + description