Root RPG

@randsum/root-rpg

Root RPG system implementation with reputation, relationships, and advancement mechanics.

Installation

npm install @randsum/root-rpg
# or
bun add @randsum/root-rpg

Examples

Basic Roll

import { rollRootRpg } from "@randsum/root-rpg"
import type { RootRpgRollResult } from "@randsum/root-rpg"

// Basic roll with modifier
const { outcome, roll, result } = rollRootRpg(2)
// outcome: 'Strong Hit' | 'Weak Hit' | 'Miss'
// roll: numeric total, result: detailed roll information

Type-Safe Result Handling

import { rollRootRpg } from "@randsum/root-rpg"

const { outcome } = rollRootRpg(0)
switch (outcome) {
  case "Strong Hit":
    // 10 or higher
    break
  case "Weak Hit":
    // 7-9
    break
  case "Miss":
    // 6 or lower
    break
}

Installation

npm install @randsum/root-rpg
# or
bun add @randsum/root-rpg

About Root RPG

The @randsum/root-rpg package provides mechanics for Root RPG , a tabletop roleplaying game based on the Root board game.

This package implements the core dice mechanics and systems from the Root RPG, allowing you to build applications and tools for Root RPG gameplay.

For more information, see the package source code .