Foundry Virtual Tabletop

Welcome to the API documentation for Foundry Virtual Tabletop, an application for organizing and running tabletop roleplaying games in a beautiful and intuitive web-based application.

The goal of this documentation is to empower developers to create amazing game systems, add-on modules, and scripts which augment and extend the base functionality of the Foundry Virtual Tabletop platform.


The primitive data objects in Foundry Virtual Tabletop are called Entities. Each entity represents a document which is stored in the database. Most of your interaction with the Foundry VTT API will involve interacting with and modifying Entities.

Base Classes

Every Entity implementation extends the Entity base class.

Entity Implementations

The following list enumerates the Entity implementations which exist within the Foundry VTT framework.

The Canvas

The visual game surface in Foundry VTT is managed by a WebGL-powered canvas which uses the PixiJS library.

Canvas Building Blocks

The game canvas is constructed using several core building blocks.

Canvas Layers

The Canvas is composed of multiple layers which are ordered from bottom-most to top-most according to the list below. Each layer is an implementation of the CanvasLayer class.

Canvas Objects

Canvas layers contain PlaceableObject instances which are rendered within that layer. The following are the available object types which may be placed.

HUD Overlay

In addition to WebGL canvas layers, there is also support for HTML-based canvas overlay known as "HUD" objects.

HTML Applications

In addition to the underlying data and the visual representation of that data on the Canvas, Foundry VTT renders many HTML Applications which represent modular interface components for browsing, editing, or configuring elements of the virtual tabletop.

Application Building Blocks

The following classes provide high-level building blocks for defining HTML applications within FVTT.

Dice Rolling

As a developer, you may often want to trigger dice rolls or customize the behavior of dice rolling. Foundry Virtual Tabletop provides a set of API concepts dedicated towards working with dice.

Miscellaneous Extensions

In addition to the outlined structure above, there are many additional miscellaneous elements of the Foundry Virtual Tabletop API for you to explore. Please browse the sidebar for a complete listing of classes and functions. Some specific classes which are noteworthy or commonly used include:

  • Audio Helper - Utilities for working with Audio files.
  • Compendium - For creating and working with Compendium Packs.
  • Settings - For creating, storing, and managing world and client settings.
  • Video Helper - Utilities for working with Video files.
  • WebRTC - Framework for supporting A/V conferencing.