fvtt-dice-rolls

Automate Foundry VTT dice rolls with Roll class evaluation and chat output.

1|Updated Jan 4, 2026
One-click install
npx skills add https://github.com/ImproperSubset/hh-agentics --skill fvtt-dice-rolls
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fvtt-dice-rolls
Source: https://github.com/ImproperSubset/hh-agentics/tree/main/fvtt-dev/skills/fvtt-dice-rolls
Command: npx skills add https://github.com/ImproperSubset/hh-agentics --skill fvtt-dice-rolls

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Foundry VTT module development often requires duplicating complex dice logic, roll calculations, and chat formatting. This Skill consolidates best practices for rolling, getRollData preparation, custom dice types, and roll modifiers, saving time and reducing bugs.

Core Features & Use Cases

  • Dice Roll Formulas: Build and evaluate dynamic dice expressions using the Roll class.
  • Chat Integration: Send formatted rolls to chat with toMessage, including flavor and speaker context.
  • Roll Modifiers & Patterns: Support advantage/disadvantage, exploding dice, rerolls, and keep/drop mechanics.
  • getRollData & Data Context: Provide a ready-to-use data context for formulas from actor/item data.
  • Custom Dice/Rolls: Guidance for creating and registering custom Die and Roll classes.
  • Common Project Scenarios: Implementing attack/damage rolls, skill checks, and ability checks in modules.

Quick Start

  • Create and evaluate a basic roll: const roll = new Roll("2d6 + @modifier", data); await roll.evaluate(); console.log(roll.total);

Frequently Asked Questions about fvtt-dice-rolls

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate dice rolls in Foundry VTT module development?

Automate dice rolls in Foundry VTT by instantiating the Roll class with dynamic formulas, executing asynchronous evaluation, and outputting results to chat via toMessage to standardize roll calculations.

How do I send formatted dice roll results to chat using toMessage in Foundry VTT?

Send formatted dice rolls to chat in Foundry VTT by using the toMessage method on an evaluated Roll object, passing flavor text and speaker context to display the results properly.

How do I prepare getRollData context for attack and damage rolls in Foundry VTT?

Prepare getRollData context for attack and damage rolls by extracting actor and item data in Foundry VTT, providing a ready-to-use data object to inject modifiers dynamically into Roll formulas.

Can I implement advantage, exploding dice, and reroll modifiers in Foundry VTT modules?

Implement advantage, exploding dice, and reroll modifiers in Foundry VTT modules by applying reusable code patterns for dice modifiers supported by the native Roll class evaluation.

How do I create and register custom dice types and Roll classes in Foundry VTT?

Create and register custom dice types in Foundry VTT by extending the Die and Roll classes, allowing module developers to define specialized evaluation behaviors and custom dice mechanics.

What is the best way to standardize skill check and ability check logic in Foundry VTT modules?

Standardize skill check and ability check logic in Foundry VTT modules by consolidating getRollData preparation, Roll formula evaluation, and toMessage chat output into reusable code patterns to reduce bugs.