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.
Every Entity implementation extends the Entity base class.
The following list enumerates the Entity implementations which exist within the Foundry VTT framework.
- Chat Message
- Combat Encounter
- Journal Entry
- Audio Playlist
- Rollable Table
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.
- Background Layer
- Tiles Layer
- Drawings Layer
- Grid Layer
- Templates Layer
- Walls Layer
- Notes Layer
- Tokens Layer
- Lighting Layer
- Sight Layer
- Sounds Layer
- Effects Layer
- Controls Layer
Canvas layers contain PlaceableObject instances which are rendered within that layer. The following are the available object types which may be placed.
In addition to WebGL canvas layers, there is also support for HTML-based canvas overlay known as "HUD" objects.
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.
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.
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: