Modules
A module is a folder or .zip archive, that defines the structure of a character sheet and how the values of the automated fields are derived.
It must contain the following files:
├── meta.json
└── sheet_definition.lua
Meta
The meta file contains the basic information of the module.
It must contain the following fields:
{
"name": "Guide to Everything",
"system": "D&D 5E",
"version": "0.2",
"author": "Xanathar"
}
Sheet Definition
Contains the main structure and mechanics of the character sheet. The script must return a CharacterSheet object.
Packages
Modules can additionally contain multiple lua packages that can be imported using require 'packagename'.
Packages should define and return a table with some shared members or functions.
The package names are prefixed with their relative path from the module root, separated by . characters.
For example when using the following module:
├── meta.json
├── sheet_definition.lua
├── toplevel_package.lua
└── embedded
└── package.lua
You can use these packages in your sheet definition:
require 'toplevel_package'
require 'embedded.package'
Lua packages are useful for separating the mechanics and structure of the character sheet by moving larger chunks of static values (e.g. long descriptions, common values, etc.) or shared functions into separate files.