Templates
Templates are premade GM screens. Templates are complete layouts with screens, tiles, extensions, and backgrounds that other GMs can load and start using immediately. A template might contain screens for each scene in an adventure, or an encounter with initiative trackers, maps, and character sheets already in place.
Creating a template
You can create a template by creating a definition in the plugin manifest.json file.
Templates are declared under the presets key. The manifest name predates the rename and is kept for compatibility. A preset in the manifest and on disk is a template in the app.
Example:
{
// [...]
"presets": [
{ "$ref": "presets/my-preset/manifest.json" }
]
}Template definition
Similar to an extension, a template is defined by its own manifest.json file.
Bundled assets
Images, videos, and other files that ship with the template are referenced with a { "$ref": "..." } pointing at a path relative to the template’s own manifest.json. Only referenced files are packaged, so anything you forget to reference is left out of the plugin.
There are three places a reference can appear:
- Screen backgrounds —
backgroundPathon a screen takes a ref directly. - Tile configuration — a ref goes on an individual config value, keyed by the config field name the extension expects. For
@overseer/imagethat field isurl:A ref placed at the root of{ "type": "@overseer/image", "config": { "url": { "$ref": "assets/mascot.webp" } } }config("config": { "$ref": "..." }) does not resolve.overseer buildrejects it. A ref can also sit deeper inside a config value, such as in a list. See Bundled files. - Template assets — the optional
assetsarray supplies thebackgroundandscreenshotimages used on the template’s listing. Seticonto a ref. Built-in icon names are only for the templates that come with Overseer Studio.
Files from an older version
A campaign made from a template uses the files in the installed plugin. If a new version of the plugin removes a file, campaigns made from an older version cannot show that file after the update.
To keep a file that the new version does not use, add it to the files array in the plugin’s manifest.json. Each ref is relative to the plugin’s manifest.json. overseer build packages each file and stops if a file is missing.
{
"files": [
{ "$ref": "./templates/my-template/assets/old-map.webp" }
]
}Reference
Please reference https://overseer.studio/schemas/preset/manifest.json for a complete definition of the file.