Skip to content
Jason Godesky edited this page Jul 17, 2026 · 20 revisions

Getting Started

To install the Revolutionary Games Common Foundry VTT Library Library in your project, run:

npm install @revolutionarygamesco/common-foundryvtt --save

You can then add methods from the library and call them like this:

import { generateID } from '@revolutionarygamesco/common-foundryvtt'

const id = generateID() // A random, 16-digit alphanumeric string

Types

This library provides Typescript types for Foundry VTT (verified as of v14), which makes it incompatible with other attempts to provide such types, like fvtt-types.

If you import any methods from this library, it will add all of the types to your global namespace (under foundry., e.g., foundry.documents.JournalEntry). If you just want the types but don’t have any use for any other methods, you can include them by adding this to any file in your project:

import '@revolutionarygamesco/common-foundryvtt

Methods

Methods

Wrappers

Mocks

Clone this wiki locally