# Taflor documentation > Documentation of Taflor, a self-hosted virtual tabletop built from plugins. Taflor is a self-hosted virtual tabletop for role-playing games in which effects, skins, dice, tools and game systems are plugins. It is in development, and its releases aren't published as packages yet. # Start # Taflor documentation Taflor is a virtual tabletop for role-playing games that you host yourself. Effects, skins, dice, tools and whole game systems are plugins. It started as the virtual table of PhaseSix and is now a project of its own. Pre-release Taflor is in its `0.x` releases, before the first standalone release 1.0. The plugin system is built and the core's own features run on it; installing plugins of your own, the management screens and full game systems follow with the milestones M1 to M4. Pages for parts that aren't built yet say so. The design specification, which describes the whole system, will be published here later; the section numbers (§) on these pages refer to it. The latest release is 0.3.0 (2026-12-06), and the [changelog](https://taflor.org/docs/changelog/index.md) lists what each release changed. The packages aren't published yet, and the source isn't public yet. These pages follow the development version, so they may describe a change that comes with the next release. ## What is here | section | for | state | | ------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------- | | [Getting started](https://taflor.org/docs/tutorials/index.md) | game masters who want to run a table | placeholder, M1 | | [Concepts](https://taflor.org/docs/explanation/index.md) | everyone: the words the rest of the docs use, and [how plugins fit in](https://taflor.org/docs/explanation/plugins/index.md) | current | | [Writing a plugin](https://taflor.org/docs/how-to/plugins/index.md) and [testing it](https://taflor.org/docs/how-to/testing/index.md) | people who write effects, skins, menus, tools or dice add-ons | current (0.3.0); installing comes with M2 | | [Systems and dice](https://taflor.org/docs/how-to/systems/index.md) | people who bring a game's dice to Taflor | dice: current; full systems with M3 | | [Server extensions](https://taflor.org/docs/how-to/extensions/index.md) | Python developers extending the server | placeholder, M4 | | [Operations](https://taflor.org/docs/how-to/operations/index.md) | admins running an instance | placeholder, M1 | | [Releases and versioning](https://taflor.org/docs/explanation/releases/index.md) | hosts and admins who pin or upgrade a release | current | | [Changelog](https://taflor.org/docs/changelog/index.md) | everyone who wants to know what a release changed | current | | [Reference](https://taflor.org/docs/reference/index.md) | registries, hooks, plugin API, bundled plugins | current; generated API pages with M4 | ## For agents and scripts Every page is also served as Markdown next to its HTML (`index.md` instead of `index.html`). [`llms.txt`](/docs/llms.txt) lists all pages with a one-line summary, and [`llms-full.txt`](/docs/llms-full.txt) has the whole documentation in one file. The search index is static (`search/search_index.json`). # Getting started Not available yet Taflor has no release you could install. This page follows with milestone M1 (standalone host). The first tutorial will take you from nothing to a game with a table: start the container image with PostgreSQL, run the setup wizard, invite two players and play a table with the base plugins. That is also the definition of done for M1 in the design specification (§14.5), which will be published later. Later tutorials, as planned in §13.1 of the specification: the first plugin, the first system and the first server extension. Their code blocks will run as tests, so they keep working as written. # Concepts The words below are used the same way everywhere in Taflor. The design specification (published later) defines them in its glossary and explains each one in the section named in brackets. Explanations of the architecture, the sync model, hidden objects and fog, trust levels and performance follow here as the code settles. | term | meaning | | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | instance | one running installation of Taflor: one database, one set of installed packages | | host | the adapter that tells the core who may do what and where game content comes from: `TableHost` on the server, `ClientHost` in the browser (§3.5, §5.8, §12). The standalone host ships with Taflor | | game | the unit a group plays in: its members, tables, documents, system and enabled plugins | | table | one virtual tabletop surface of a game, with its objects | | object | an item on a table, such as a token, image, map, note, path, marker or die, of an object kind (§5.2, §7.7) | | member | a user with a role in a game: `gm`, `player` or `viewer` (§4.3) | | game account | a user that can log in to one game only (§4.1) | | document | a JSON record in the generic document store: an actor, item, journal entry or plugin state (§5.5) | | actor | a document for anything a token can stand for: character, NPC, foe, vehicle, pet | | system | the rules of a game: entity schemas, sheets, dice, initiative; a plugin of kind `system` (§8) | | plugin | an installable package with a `table-plugin.json` manifest, of kind `content`, `skin`, `client` or `system`. Plugins are data, CSS and JavaScript, never server code (§7, §10; [How plugins fit in](https://taflor.org/docs/explanation/plugins/index.md)) | | base plugin | a plugin bundled with Taflor that the core itself is built from (§7.16) | | server extension | a Django app that extends the server; installing one is an admin action and needs a restart (§9) | | provider | an object implementing one host-facing interface, such as a token source, a library, a dice system or a roll log | | capability | a named feature group a server or table supports, such as `combat`, `fog` or `docs`, announced in `state` (§6.4) | | tier | the trust level of a plugin, T0 to T4 (§10.4) | | core | Taflor without any plugin or extension | # How plugins fit in Taflor's core is a table shell: the camera, the object store, selection, access, sync, the loader and the registries, the image, map, token and note objects with the grid and the fog. Almost everything else is a plugin: effects, frames, papers, dice skins, paths, markers, the measure object, GM info, audio and video, the standard dice system. The core uses the same registries a third-party plugin uses, so a bundled plugin and yours are written the same way. State in 0.3.0 The plugin system is built and the core's own features run on it (see [Bundled plugins](https://taflor.org/docs/reference/bundled-plugins/index.md)). A table loads **only the bundled plugins** so far: installing other plugins (folder, zip, release, catalogue) comes with milestone M2. Until then you can write a plugin and run it against the real loader with [`@taflor/testkit`](https://taflor.org/docs/how-to/testing/index.md). ## Plugin kinds and tiers A plugin is a folder with a manifest, `table-plugin.json`. Its `kind` says what it contains; the tier says what it can do in the browser, and so how much an admin has to trust it. | kind | contains | tier | | --------- | ---------------------------------------------------------------------------------------------------------- | -------- | | `content` | JSON data and assets only: no `entry`, no `styles`, no sheets | T0 | | `skin` | CSS and fonts, plus data, but no JavaScript | T1 | | `client` | an ES module (`entry`) that runs in the table page, plus data and CSS | T3 | | `system` | a game system: entity schemas, sheets, dice; T2 with sheets in sandboxed frames only, T3 with in-page code | T2 or T3 | **The skin rule.** A pack of data and CSS without code is a `skin`, not a `client` plugin: the bundled `papers` and `trails` plugins are skins. Declare `client` only when the plugin has a real module. The rule is checked: the manifest schema refuses `entry`, `sheets`, `frames` and `csp` in a skin (and anything but data in a content plugin), on the server and in the testkit, and the page's loader refuses a content or skin plugin that names an entry, without importing it. Data files are limited to seven registries, whose defs the core checks and uses as text, numbers, ids and asset URLs, never as markup or code (see [Registries](https://taflor.org/docs/reference/registries/index.md), column "data file"); the server and the loader refuse a data file for any other registry. Every other registry takes defs from code only. Computing the tier from what a plugin's folder actually holds (an `entry` or any JS outside `frames/` is T3, sheets are T2, any CSS is T1), rather than from its manifest, comes with the install pipeline of milestone M2 (SPEC §10.4). ## Names and namespaces A plugin registers **short names** (`glow`); the core stores them as `:` (`lantern:glow`). Its labels, its per-device keys, its Performance switches, its menu entries and tools are namespaced the same way, by the core, so plugin code never writes the prefix and can't write another plugin's names. A name has to be declared in the manifest's `contributes` before the code registers it; an undeclared name throws. Bundled plugins keep bare names (`classic`, `marker`), because tables stored those ids before the plugins existed. The exception is `sea-pack`, which stores `sea-pack:` (D18): a migration renamed its stored ids, and the server and the client still read the old bare ids as the new ones. A plugin object kind is `.` on the wire. When a table refers to an id whose plugin is gone, the reader falls back to the registry's default (the classic token frame, solid paths, no effect) without changing what is stored. Objects of a missing kind show as a plain fallback object, and their data stays. ## Loading and rollback The server resolves the plugins of a table into a lock (load order: `requires` and `loadAfter`, then kind - `system`, `client`, `skin`, `content` - then id). The page then: 1. registers every plugin's data (data files, styles, labels, Performance switches) **before any code runs**, so code that needs a content plugin finds its entries; 1. imports each `entry` and calls `activate(ctx)`, one plugin at a time, in lock order. `activate` has 5 seconds. If `activate` throws or times out, everything that plugin registered is rolled back, and the plugins that require it are skipped, with a notice naming both. When a plugin stops (disabled, failed, or in dev reload) its `deactivate` runs, then every `ctx.dispose` callback, then the rollback: registry entries, menu entries, HUD buttons, tools, styles, hook handlers. `?safe` (GM only) loads the bundled plugins alone, `?safe=all` none. If a page stopped while a plugin was activating, the next load skips that plugin, with a notice that a reload starts it again. ## Failure isolation Every call from the core into plugin code goes through a guard: render and frame callbacks, menu builders, tool handlers, hook handlers, mounts. A thrown error is caught, logged with the plugin id and reported to the server (`plugin.error`, rate-limited). A plugin that throws more than 20 times within 60 seconds is switched off for this page load, and the GM is told. A broken filter is skipped; the chain goes on with the value it was given. ## Performance rules Taflor has to stay smooth on a busy table in Firefox with software rendering, so plugins follow these rules (SPEC §7.10.3): - No per-frame events: there is no "camera moved" or "object dragged" hook. `camera.settled` and `object.changed` fire after the gesture ends. - Per-frame drawing goes through `ctx.frame.request(callback, {fps, perfKey})`, one shared scheduler that pauses when the page is hidden or the switch is off, caps each callback at its `fps` and measures it against a budget of 2 ms per frame. - Animations run on the compositor where they can (CSS `transform` and `opacity`), not by changing styles every frame. - Every animated contribution declares a `performance` key in the manifest. The Performance tab lists it with its cost, and "reduce effects" switches it off unless it says `reduced: false`. - Nothing is added to the hot paths: object rendering on move, the transformer, pointer handling. # Releases and versioning Taflor has one product version for everything it publishes. The interfaces inside it (the wire protocol, the plugin API, the server API, the manifest format) carry versions of their own, which change only when that interface changes. This page explains both, how a release is made, and what a host that pins one release (PhaseSix, for example) can rely on. Taflor is maintained alongside PhaseSix, without a support promise: issues are triaged when time allows, and security reports go to the contact in `SECURITY.md` (§13.5). ## The product version - One version, [semantic versioning](https://semver.org/) `MAJOR.MINOR.PATCH`, for the whole repository: the Python package `taflor-server` and the npm packages `@taflor/protocol`, `@taflor/client` and `@taflor/testkit` always carry the same number. - The file `VERSION` in the repository root is the single source. `scripts/version.py` copies it into `taflor_server.__version__` (which the wheel reads) and into every `package.json`, and the checks fail when a copy disagrees. - Between releases, main carries the next version as a development version: `0.2.0.dev0` in Python (PEP 440), `0.2.0-dev.0` for npm. Only a release commit carries a plain `X.Y.Z`. - Releases are tagged with an annotated tag of the plain number, `0.1.0`, without a `v`. Until 1.0, the first standalone release (§14.5), versions are `0.x`: | release | content | | --------------- | --------------------------------------------------------------------------------------------- | | PATCH (`0.3.1`) | bug fixes only; never breaks anything | | MINOR (`0.4.0`) | a finished step or milestone; may contain breaking changes, which its changelog marks as such | | `1.0.0` | the first standalone release (milestones M1-M4 done) | From 1.0 on, the usual semver rules hold: MINOR adds and deprecates, only MAJOR removes or breaks. ## Versions inside the product The product version says which release you run. The interface versions say whether two pieces built against different releases still fit together. They are independent of the product version and of each other (§3.7): | interface | version | who reads it | when it changes | | --------------------------------- | ---------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | wire protocol | `PROTOCOL_VERSION`, an integer (§6.2) | the client and the server, at every socket connection | when an old client and a new server (or the reverse) no longer work together: removed or renamed fields or messages, changed meaning. Optional additions don't raise it. Plugins never raise it | | plugin API (`ctx`, `@taflor/api`) | `API_VERSION`, semver | client plugins, in `api: "^1.2"` of their manifest | MINOR adds, MAJOR breaks; deprecations warn with `since`/`until` for at least one minor | | server API (`taflor_server.api`) | semver (§9.4) | server extensions and hosts, as a PEP 440 range | the same rules; anything not exported there is private | | manifest format | `manifestVersion`, an integer | the plugin installer | when `table-plugin.json` changes incompatibly; the server accepts the current and the previous one | | sheet protocol | `v`, an integer in the handshake (§7.14) | sheets and the table | both sides announce the versions they support | How they relate to the product version: - A release carries exactly one value of each. `@taflor/protocol` exports `PROTOCOL_VERSION` and `API_VERSION` for that release. - The client and the server ship in the same `taflor-server` release, so within one deployment they always agree on `PROTOCOL_VERSION` (§3.1). A browser tab still open on an older client is closed with code 4426 and reloads once (§6.2). - When a release changes an interface version, its changelog says so and names the new value. A change to the protocol or an API is never hidden in a PATCH release. - After 1.0, a MAJOR of the server or plugin API needs a MAJOR of the product. Raising `PROTOCOL_VERSION` or `manifestVersion` does not by itself: clients come with the server, and the previous manifest format stays accepted. ## Pinning a release A host that embeds Taflor pins one exact release, as PhaseSix does in its `uv.lock`, from PyPI with hashes or from the tag on lorebase (§14.4). With such a pin it can rely on this: - **The tag doesn't move.** `X.Y.Z` always names the same commit. Its `VERSION` is `X.Y.Z`, and the release job builds the packages from that commit and publishes their sha256 sums. - **Client and server match.** The static files of the client are part of the wheel, so `collectstatic` installs the client of the same release, and the protocol versions agree. - **The public surface is `taflor_server.api`** (and the `TableHost` interface it implements). Imports from anywhere else in `taflor_server` may break in any release. - **PATCH releases are safe to take:** no change to an interface, no breaking change, no migration that changes existing data in a way the release before didn't expect. - **Every other change is in the changelog**, with breaking changes marked, deprecations with their `since` and `until`, and new interface versions named. Upgrading means reading the sections between the two releases, bumping the pin, `manage.py migrate` and `collectstatic`. - **Migrations are append-only once released**, from the release that freezes the initial migration (`0001_taflor_initial`, planned for 0.2.0) on. Before that, the initial migration may still be regenerated, and no host should run it on data it wants to keep. - **Development is table-first:** a change that needs both sides lands in Taflor first, backwards-compatible, in a release; the host then bumps its pin and adapts (§14.4). What a pin doesn't give: before 1.0, a MINOR release may break the server API, with the changelog saying how. Hosts take MINOR releases deliberately, not automatically. ## How a release is made 1. Every merged change brings a changelog fragment in `changes/` (see `changes/README.md`), or the pull request is labelled `skip-changelog`. CI checks that. 1. When main is ready, its tree passes the full check (`scripts/check.sh full`, the same checks as CI). 1. `scripts/release.sh X.Y.Z` on an up-to-date main sets `VERSION` to `X.Y.Z`, compiles the fragments into `CHANGELOG.md`, commits "Release X.Y.Z", creates the annotated tag `X.Y.Z` with the changelog section as its message, and starts the next development version (`X.(Y+1).0.dev0`, or a version given as the second argument). It never pushes. 1. With the maintainer's OK, `git push origin main X.Y.Z`. The tag starts the release job (`.forgejo/workflows/release.yml`): all checks and tests, a check that the tag equals `VERSION`, then the bundled plugins' bundles and the sdist and wheel (`scripts/build-packages.sh`, which fails unless every code plugin in them has a fresh bundle), the npm tarballs, the release notes and `SHA256SUMS`. Publishing to PyPI and npm and the Forgejo release are part of the job but switched off until their tokens exist; the container image comes with milestone M1. 1. Hosts that pin Taflor hear of the release with its number, date and a short summary. ## Publishing and its secrets The `publish` job of `.forgejo/workflows/release.yml` uploads what the `build` job made. It stays switched off (`if: false`) until these Forgejo secrets exist on the repository: | secret | what it is | scope | | ----------------------- | ---------------------------- | ---------------------------------------------------- | | `PYPI_TOKEN_PROTOCOL` | a PyPI API token | the project `taflor-protocol` only | | `PYPI_TOKEN_SERVER` | a PyPI API token | the project `taflor-server` only | | `NPM_TOKEN` | an npm granular access token | read and write for the packages of the `@taflor` org | | `FORGEJO_RELEASE_TOKEN` | a Forgejo access token | write access to this repository's releases | The PyPI names `taflor`, `taflor-protocol` and `taflor-server` are registered, so each token can be limited to one project: a leaked server token can't publish a protocol package. On npm, `@taflor/protocol` is published under the `@taflor` org. Before its first upload, the `private` flag in `protocol/package.json` has to go; while it is set, the job skips the package with a warning. `@taflor/client` and `@taflor/testkit` get the same treatment once they exist. The job publishes in a fixed order, and every step can run again: 1. **PyPI:** `taflor-protocol` first, because `taflor-server` requires it, then `taflor-server`. Both uploads use `--check-url https://pypi.org/simple/`, so uv skips files that are on PyPI already. When the server upload fails, re-running the job uploads only the server. 1. **npm:** a tarball whose version is on npm already is skipped. 1. **Forgejo release:** the release with the notes, the files and `SHA256SUMS` is created, or replaced on a re-run. Re-run the `publish` job alone (not the whole workflow), so it uploads the files the first run built: a fresh build would make files with other hashes, which PyPI refuses under an existing version. That a single job can be re-run and reuses the first run's artifacts on Forgejo is still to be confirmed at the first real release. # Changelog The release notes of every Taflor release, newest first. The latest release is 0.3.0 (2026-12-06). Its packages aren't published yet, and the source isn't public yet. [Releases and versioning](https://taflor.org/docs/explanation/releases/index.md) explains the version numbers and what a breaking change means before 1.0. The section numbers (§) refer to the design specification, which will be published later. ## 0.3.0 (2026-12-06) ### Removed - The table client no longer has PhaseSix's adventure and world pickers or the keep choice in the upload dialog, and it no longer reads their page config keys (`plot_url`, `plot_add_url`, `plot_foe_add_url`, `world_url`, `world_add_url`, `world_foes_url`, `keep_as_url`). Breaking for hosts: offer that content through `LibraryProvider` (§6.9, §8.6). The offline table no longer takes a demo plot, wiki or world foes. - The wheel and the sdist no longer carry the stand-in host (`taflor_server.testing.standin`), a test-only Django app that 0.2.0 shipped by mistake. `taflor_server.testing.settings` installs it only when it is present, as in a checkout of the repository. ### Added - A skin plugin can bring table skins from a data file: `skins` joins the registries that take data files. Every token a skin sets is one of the core's `--table-*` properties and must match its type exactly (`#rrggbb[aa]` colours, `R, G, B` triples, `px`/`rem`/`em` lengths, a font family list), so no skin value reaches the CSS as `url()`, a second declaration or markup. - Bundled base plugins: `taflor_server/plugins//` with their manifests are read at start (a broken manifest, a missing requirement or a cycle stops it, naming the problem), ordered as SPEC §7.4 says and sent as `state.plugins`, all of them on for every game until game locks exist. Their files are static files under `table/plugins//`: a host adds `taflor_server.bundled.BundledPluginsFinder` to `STATICFILES_FINDERS`. None are bundled yet, so nothing changes for now. - Client plugin hooks (`ctx.hooks`, SPEC §7.10): listeners, filters and providers with the catalogue of §7.10.2, published as `hooks.json` in `@taflor/protocol` with its schema `manifest/hooks/v1.json`. The table feeds the object, state, selection, access, camera and dice hooks, never during drags. - Dice systems can send their own data with a roll: `RollResult.ext`, a JSON object keyed by the system's id (at most 4096 bytes), goes with `dice.rolled` and the roll's log entry and reaches the system plugin's `dice.classify` and the new `dice.summary` provider in a frozen copy of the roll. Players get `ext` null for a roll on a token hidden from them, live and in the history. `dice.summary` adds one line of plain text under the total on the tray's card and in the dice log, in the reader's language; a provider that throws shows nothing. `dice.classify` providers that throw no longer break the card. - New core error code `csrf.failed` (403): a session-authenticated HTTP write whose CSRF token is missing or no longer valid. The standalone host answers a JSON request that fails the CSRF check with `{"error", "code": "csrf.failed"}` through its new `CSRF_FAILURE_VIEW` (`taflor_server.csrf.csrf_failure`), and a form with Django's HTML page as before. Other hosts keep their own view and MAY answer an HTML 403 without a code. The table client treats both as "reload the page" and says so, instead of "log in again". - New standalone setting `TABLE_TRUSTED_PROXIES` (comma-separated addresses or networks): the reverse proxies whose `X-Forwarded-For` names the client. Name only the proxies' own addresses, never a network that clients sit in too; a bad entry stops the start. Per-client limits, so far the CSP report limit, use it through `taflor_server.client_ip`; without it the client is `REMOTE_ADDR`. The table page now sends `Cache-Control: private, no-store` (it holds the CSRF token, the page config and the CSP nonce), and the CSP report endpoint counts logged lines against its limits and strips C1 controls, Unicode line breaks and user info from what it logs. - The documentation covers the plugin system of 0.3.0: writing and testing a plugin with `@taflor/testkit`, the registries, the hook catalogue, `ctx` and the experimental `@taflor/api` helpers, dice systems with `RollResult.ext`, `dice.classify` and `dice.summary`, and the list of bundled plugins, with example plugins that the tests run. - The in-process Python conformance runner (`taflor_server.testing.conformance`) plays every scenario of `protocol/conformance/v2` against the real server as part of the server's test suite, and `taflor_protocol.scenarios()` loads the scenarios. It reads YAML: install `taflor-protocol[scenarios]`. - The table has a generic library picker. Under "From the library" in the Add menu, the GM browses the host's libraries (one tab each, a search, folders with a way back) and adds their entries, hidden from the players by default. "Keep as …" in the inspector and the context menu keeps an object in a library. A library announces what it keeps as through the optional `LibraryProvider.keep_kinds`, which the page config passes on as `library[].keep` (`[{kind, label, objects?}]`). An entry of kind `folder` is opened, never added: the server refuses to add it. A malformed `keep_kinds` entry is left out and logged, so the table page still loads. - The table messages `roll` (an expression through the game's dice system, for the sender or a source they own), `table.ext` (what a plugin keeps on the table, GM only) and `plugin.error` (a plugin's caught error, logged for the server), and `plugins`/`extensions` in `state`. Manifests and extension descriptors are checked strictly (`taflor_server.manifests`), with every unknown field named. - The table page sends a Content Security Policy as `Content-Security-Policy-Report-Only` (SPEC §10.9), with a nonce per request on the import map, the module preloads and the entry script. Browsers report violations to the new endpoint `csp-report/`, which logs them, rate-limited per client and overall. New standalone settings: `TABLE_CSP`, `TABLE_STATIC_ORIGIN`, `TABLE_MEDIA_ORIGIN`, `TABLE_FRAMES_ORIGIN`. Nothing is blocked yet. - The table page starts its plugins before the table: the loader registers each plugin's data first, then activates the plugins in lock order within 5 s, rolls back a plugin that fails and skips the plugins that require it, guards every call into plugin code with an error budget and `plugin.error` reports, and offers `?safe` to the GM. Plugins get a frozen `ctx` and may import `@taflor/api`; the import map names every plugin module `@plugin//` with its integrity, and a plugin's URLs carry a hash over its files, so a changed file never meets a stale cache. The plugin id `core` is reserved. - The testkit's `fakeStore` takes `registries` (a `mountPlugin`'s `registry`), so the rows of a test that mounts a kind plugin into its own registries get the plugin's kind instead of the fallback object. - `@taflor/protocol` has a JavaScript conformance runner (`conformance.js`). It plays the scenarios against any target, and the table client's tests run it against `OfflineSync`. ### Changed - A cold load of the table page takes longer than in 0.2.0, because many features now ship as bundled plugins with their own modules (172 → 255 JS modules): on the busy test scene about +120 ms (260 → 380 ms) with production-style static serving over HTTP/1.1. Idle, pan, drag, wheel and rolls stay within their budgets. Fewer, bundled modules per plugin are planned for 0.4.0. - A plugin manifest of kind `skin` may no longer declare `entry`, `sheets`, `frames` or `csp`: a skin is CSS, fonts and data and runs no code. The server and the testkit refuse such a manifest, naming the field, and the table page refuses a `content` or `skin` plugin that names an entry without loading its code. - Audio and video are the bundled plugin `media` now: their kinds (still `audio` and `video` on the wire), the players, the playback the game master shares, each user's own audio volume and the inspector's track volume moved out of the core into `plugins/media/`. The server keeps its own rules: audio and video still come only from uploads it checks for type, content and size. For plugin authors: a kind's offline rules may say what an upload of it makes (`upload`), and a plugin error report may name `attach`, `offline` or `dragHandle` as where it happened. - Every refusal of the table page's JSON endpoints (uploads, the cloth, the roll log, portraits, token sources, props, dice and table preferences) is `{"error", "code"}` with a code of the protocol's set, as the library endpoints already were: `role.denied`/`role.viewer` (403), `object.unknown` (404), `capability.missing` (404, a table without roll log), `type.unknown` (405), `json.invalid` or `payload.invalid` (400), `payload.too_large` (413). On the socket, JSON that is not an object now gets `payload.invalid` instead of `json.invalid`, and a create-only field in `object.update` (such as `source`) gets `payload.invalid` instead of `role.denied`, from the server and from OfflineSync. - GM info is the bundled plugin `gminfo` now: its kind (still `gminfo` on the wire), the pins, the card, the search (Ctrl/⌘+K), its menus and the conversion from and to notes moved out of the core into `plugins/gminfo/`. The server keeps its own rules for GM info, so players still never receive it. For plugin authors: a kind's manifest may say `carriedByMaps: {"keepsSize": true}`, a bundled kind's detach also runs when its plugin stops or fails, and the testkit's `fakeCamera` has real events. - Placing a marker is part of the bundled `markers` plugin: its marker tool, the "Add" menu's "Marker…" and the empty table's "Place a marker here…" come with it, and its style picker keeps the table's keys off through the modal layers. - Protocol 2 (breaking): every `error` carries a `code` from `protocol/v2/error.json` and echoes the `request` it answers; a hidden object and a missing one both answer `object.unknown`. The table is `{id, name, settings, ext}`: the settings moved under `settings`, `table.update` takes `{name?, settings?}` and refuses unknown keys, and there is no `master` key (a master table is one whose capabilities leave out `players`). The `presence` capability no longer gates the keepalive. - Protocol v2, additive: `dice.rolled` now carries `at` (server time in ms). Every roll has one `roll_id`, shared by its `dice.rolled` and its roll log entry. **Host contract change:** `RollLog.record` gets the roll's log entry (`entry`) and stores it, and `RollLog.history` returns `{records: [entry, …], cursor}` newest first (SPEC §8.5, `protocol/v2/roll-log.json`). `api.broadcast_roll(..., record=True)` logs a roll from outside the table through the `RollLog`. A host that logs such a roll itself stores `api.roll_log_entry(message, token)`, which marks a hidden token's roll. - The 13 cloth patterns are the bundled content plugin `cloth-patterns` (`server/taflor_server/plugins/cloth-patterns/`): the loader registers its `patterns.json` without code, each tile as the plugin's URL with its asset version. The client and `table_settings.pattern_keys()` read the `clothPatterns` registry. The sandbox, the preview, `dev.html` and the website demo load the bundled plugins too (`startOfflinePlugins`, `findBundledPlugins`). - The 21 animated table effects are the bundled plugins `effects-weather`, `effects-magic`, `effects-water` and `effects-wonders`; the four sea effects stay in the core until the sea pack. `ocean_storm` is now `ocean-storm`: the old id is still read and becomes the new one on the next change. An effect whose plugin is missing shows as none and stays stored. The plugins import `@taflor/api`, so a host page that loads them needs the import map (`dev.html` and the website demo have one). - The browser-only table (`OfflineSync`: the dev harness and the sandbox) now sends the v2 shapes. That covers `plugins`, `extensions` and `presence` in the state, a complete `me` and `looks`, and `meta`, `html` and `fog` on objects. It refuses a viewer's changes with `role.viewer` and rolls standard expressions (`NdS±M`) like the core does without a dice system, so the conformance scenario `dice/roll` now runs offline too. A scenario that binds a seat or object ref with `@=name` is now an error of the scenario in both conformance runners. - The dice effects are the bundled plugin `dice-effects` (`server/taflor_server/plugins/dice-effects/`): it registers 16 effects in four groups of the `diceEffects` registry (`dice-light`, `dice-impact`, `dice-magic`, `dice-festive`), with their styles in its `effects.css`. The three seafaring effects stay core (`diceEffectsSea.js`, group `dice-seafaring`) until the sea-pack plugin takes them over. `DiceEffects.js` keeps the events and their colours and plays a registered effect, and nothing for "none" or an unknown name. The effect pickers list the same effects in the same groups as before. `dice.EFFECTS` on the server is "none", the plugin's manifest and the core's sea effects, with the same names as before. The offline pages and the website demo load the plugin too. - The dice placed on the table are the bundled plugin `dice` (`server/taflor_server/plugins/dice/`): it registers the kind `die` under its bare name and, through the kind's `attach`, the dice bag, the dice keys (R and digits), "Set value…", the inspector's dice part, the context menu's "Roll" and "Set value…" and the pace of sets and rolls, with their CSS. The 3D dice, their models and skins stay core, and so does `readDie` (now in `diceModels.js`). Its manifest declares the server's rules for a die (`contributes.objectKinds.die` with a `dataSchema`), and a server test holds them to `protocol.die_data`. The core gains three generic hooks: an inspector part may be `players: true`, a kind's class may name its objects (`TableObject.fallbackName`), and `Table.addRefusalHandler` lets a part take a server refusal before its toast. `@taflor/api` `kinds` gains `dice` and more `ui` helpers, experimental like the rest of `kinds`. - The dice skins are the bundled plugin `dice-skins` (`server/taflor_server/plugins/dice-skins/`): it registers 43 skins in seven families, each family a group of the `diceSkins` registry (`dice-classic` … `dice-tech`). The nine seafaring skins stay core (`diceSkinsSea.js`, group `dice-seafaring`) until the sea-pack plugin takes them over. `diceSkins.js` keeps drawing the faces for the dice models and draws an unknown skin as `light`. The skin pickers list the same skins in the same families as before. `dice.SKINS` on the server is the plugin's manifest plus the core's sea skins. The offline pages (`dev.html`, `dice.html`, `diceModels.html`, the website demo) load the plugin too. - The fog styles and the note papers are bundled plugins. `fog-styles` (`server/taflor_server/plugins/fog-styles/`) registers ten of the twelve fog styles in the `fogStyles` registry; the seafaring `seachart` and `deepwater` stay core until the sea-pack plugin takes them over, and without the plugin the fog still hides the map with the core's plain fog. `papers` (`plugins/papers/`), the first skin plugin, brings eight papers, nine fonts and the six inks of text labels as data files with their stylesheet and fonts; the core keeps the text label and the seafaring papers `wanted` and `logbook` and font `pirate`. The four note fonts the table used to load from the PhaseSix theme (Playfair Display, Metamorphous, Noto Sans, Oxanium) are now bundled with the plugin, as Google Fonts latin subsets under the SIL OFL. A note or fog whose look is not registered shows the default. `protocol.FOG_STYLES`, `NOTE_STYLES`, `NOTE_FONTS` and `NOTE_INKS` are now the plugins' ids followed by the core's (`fog_styles()`, `note_styles()`, `note_fonts()`, `note_inks()`). The offline pages and the website demo load both plugins. - The marker object kind joins the bundled plugin `markers` (`server/taflor_server/plugins/markers/`), which is now a client plugin with code: it registers the kind `marker` under its bare name and, through the kind's `attach`, the marker style picker, the markers the saved views popup lists and flies to, the context menu's marker entries ("Place a marker here…", "Change marker style", "Show in navigation", a player's "Delete") and the inspector's "Show in navigation", which now comes last among a marker's inspector fields. Offline pages (dev harness, sandbox, demo) now make and change markers as the server does: checked data, a position marker kept 64 px and upright, an effect's size within its bounds. Its manifest declares the server's rules for a marker (`contributes.objectKinds.marker` with a `dataSchema`), and a server test holds them to `protocol.marker_data`. Placing markers (`MarkerTool`) stays core for now; without the plugin there is no style picker and markers can't be placed. `@taflor/api` `kinds` gains `markers` (the style registry's reader and the marker art, which stay core), experimental like the rest of `kinds`. - The marker styles (10 position markers, 11 area effects) are the bundled plugin `markers` (`server/taflor_server/plugins/markers/`): data and CSS, no code, of kind `skin` (SPEC §7.2: a skin may carry content data, catalogue entries without code). The loader registers its `styles.json` in the `markerStyles` registry; the core builds the art from those defs and keeps a frozen copy of each def and refuses any outside a strict shape (an SVG element and attribute whitelist: no scripts, links, `style` or event handlers). The server reads each style's group from the same file (`bundled.data`, `protocol.marker_styles()`). The sea markers (anchor, jolly roger, whirlpool, sea spray) stay core until sea-pack. An unknown style still shows the first style of its group. - The measure object kind is the bundled plugin `measure` (`server/taflor_server/plugins/measure/`): the measure objects, their bar for shape, colour and a cone's opening, the size labels and the "Add" menu's entry, with their stylesheet. It is the first kind plugin on the core-only `attach(table)` hook. Measures keep their wire name `measure`, and the server keeps its rules for them; the plugin's manifest repeats them and a test checks both agree. In the "Add" menu, "Measurement" now comes after "Path". Without the plugin, measures show as unknown objects and the ruler doesn't offer to keep a line. - The path object kind moves into the bundled plugin `paths`, beside its styles, motions and end markers. The plugin now brings the kind `path` under its bare name, its objects, its double click (edit mode, a node's type, a new node) and offline rules that check and complete a path's data like the server. Through the kind's `attach` it also adds the path bar with its style picker, "Edit nodes" in the context menu and the camera scale, with their CSS. Its manifest declares the server's rules for a path (`contributes.objectKinds.path` with a `dataSchema`), and a server test holds them to `protocol.path_data`. The core keeps the path data contract and geometry, the drawing engine and the pen tool, and its keys move into `PathTool.key`. `@taflor/api` `kinds` gains `path`, experimental like the rest of `kinds`; `kinds.dice` loses `onSkinsChange`, and the dice plugin follows the skins through its own `ctx.registry` instead. Without the plugin a path shows as the fallback object. - The path styles, motions and end markers are the bundled plugin `paths` (`server/taflor_server/plugins/paths/`): 34 styles, 15 motions and 4 end markers register through `pathStyles`, `pathMotions` and `pathMarkers`, with their CSS. The core keeps the fallbacks (motions `none` and `own`, marker `none`) and the sea entries until sea-pack. A motion is now a def with `stamp` and `path` functions that the core plays. `@taflor/api` gains `paths.decor`, the stamp and decor helpers, experimental until plugin API 1.0. The path bar and its style picker follow the registries: a stored style, motion or marker that registers late is shown again. The server's lists (`path_styles`) come from the bundled plugins. - The pen tool for paths moves into the bundled plugin `paths`, next to the path kind whose edit mode it also is. The plugin now draws new paths, places its tool in the input chain where the core had it, adds "Path" to the Add menu and hands the node grips of a path in edit mode to its tool. The node editing helpers move with it. A drawing now also ends when the user may no longer create paths, and edit mode when they may no longer change the path, not only when the table turns read-only. The tool chain gains two generic hooks, `doubleClick` (a double click or double tap, before the object under it has it) and `busy` (no paste of copied objects while true), and `@taflor/api` `kinds.path` gains `segments`, `cubicPoint` and `cloneNode`. - The ping styles, the ghost cursor styles and the movement trails are the bundled plugins `pings`, `cursors` and `trails` (`server/taflor_server/plugins/`): `pings` registers 14 ping styles (beacon to feather) in the `pingStyles` registry, `cursors` 14 cursor styles (hand to eye) in `cursorStyles`, both with their styles in a stylesheet of their own; `trails` is a skin plugin, without code, whose `trails.json` brings 10 trails (footsteps to ghostly wisps) into `trails`, with their marks in `trails.css`. The core keeps the defaults (the ripple and the arrow), "none", the still ping of reduced motion and the seafaring styles (anchor, cannon shot and spyglass pings, cutlass, spyglass and hook cursors, the wake) until the sea-pack plugin takes them over. The ping markup helpers are `@taflor/api` `pings`, experimental. A style nothing registered shows as the default (ripple, arrow, footsteps) and its name stays stored; the Appearance tab shows it once its plugin registers. The pickers list the core's styles first. The styles look as before. `preferences.PING_STYLES`, `CURSOR_STYLES` and `TRAIL_STYLES` are the plugins' manifests and the core's, with the same names as before (the wake is listed last now). The offline pages and the website demo load all three plugins. A plugin's data file (`contributes.: {names, data}`) now fills only the registries whose defs the core checks and keeps inert: marker styles, note papers, fonts and inks, cloth patterns and trails. The server refuses a manifest, and the table a plugin, that gives a data file to any other registry, such as the cursor or ping styles, whose defs become markup. - The procedural 3D props are the bundled plugin `props-basic` (`server/taflor_server/plugins/props-basic/`): the candle and the electric lamp register their three.js builders in the `props` registry, by the id a library prop names as `procedural`. The props layer asks the registry instead of a fixed list. A prop whose builder is missing or fails draws as a plain grey drum of its size, and the layer and the prop picker build it again once its builder registers. The server checks a prop's `procedural` against the bundled plugins' `props` (the model's choices are unchanged). - The ruler tool is now part of the bundled `measure` plugin. Its HUD button and the key M work as before, and so does measuring. The button looks like the other icon buttons in the HUD: muted until it is pressed. When the grid fit of a map and the ruler are both on, Escape now ends the fit first. Without the plugin there is no ruler tool, but other people's rulers still show. - The seafaring entries are the bundled plugin `sea-pack` (`server/taflor_server/plugins/sea-pack/`), on in every game: the table effects, image frames, fog styles, token frames, dice skins and effects, ping and cursor styles, the wake, the path styles, motions and anchor marker, the marker styles, the papers `wanted` and `logbook` and the font `pirate` (Pirata One). It is no base plugin, so their stored ids are now `sea-pack:` (`porthole` becomes `sea-pack:porthole`, the old dice skin `scrimshaw` becomes `sea-pack:whalebone`). Migration `0002_sea_pack_ids` renames stored table settings, objects and preferences by object kind and JSON path, and it is reversible. The server and the table still accept the old bare ids and store the new ones, so old cached pages and preferences in the browser keep working. The entries keep their labels and the Performance switches of their catalogues. - The table client follows protocol v2's table shape and error codes. It reads the table's settings from `table.settings`, sends `table.update` as `{patch: {name?, settings?}}`, and recognizes a master plot's table by the missing `players` capability instead of `table.master`. Breaking for hosts: a host's page configs for the sandbox and the preview pass the table in the same `{id, name, settings, ext}` shape, and a preview may pass `capabilities`. Errors are matched by their code. When an object is unknown (`object.unknown`), the client quietly drops its stale copy, and the offline table answers with the server's codes. - The table client has no PhaseSix dice rules any more (exploding d6, criticals at 11 and 17, success counting, exploding offline initiative): the tray and the dice log show a roll as its dice system sent it, with exploded dice from the faces' `exploded` flags and crit, megacrit and fail from its `classes`, and the dice event "A 6" is now "A die explodes". The new bundled plugin `standard` is the dice system the dev harness, the sandbox and the website's demo roll with (`NdS±M`, initiative entered by hand); the sandbox's `config.roll` takes an `expression` instead of `dice` and `minimum`. - The table client takes its host as `new Table(root, {sync, host, plugins})`. The flat options are gone: `players`, `gmUserIds`, `maxUploadMb`, the panel URLs, `myCharacters`, `dicePrefs`, `tablePrefs`, `diceLogUrl`, `role`, `locked`, `loginUrl` and `backUrl`. The `ClientHost` (`clientHost.js`) now has provider methods: `tokens.list()` and `tokens.portrait(id)`, `library.browse`, `add` and `keep`, `sheets.page(kind, id)`, `rolls.page(cursor)`, `props.list()`, the preferences' `load` and `save`, and `files.upload` and `files.setCloth`. These requests left `SyncClient`, which is the websocket transport only. A write on a read-only table is refused in the host before it goes out. `host.capabilities` follows `state.capabilities`. The sandbox, the preview, the dev harness and the website's demo build their host with `offlineClientHost(sync, options)`. - The table page's config (`#table-config`) has one documented shape, `page-config/v1.json` in `@taflor/protocol`: `identity` (who the user is, the members, the GMs, the user's actors, the login and back links), `host` (the providers as URLs and initial values: tokens, library, sheets, rolls, props, prefs, files, theme, i18n) and the plugin lock. The client builds its `ClientHost` from it (`clientHost.js`). `TableHost.page_config()` now returns a fragment of that config with only `identity.backUrl`, `backLabel`, `myActors`, `me.locked`, `host.sheets` and `host.theme`; any other key is an `ImproperlyConfigured` error. The old flat keys are gone, and so is the raw host dict under `host`. A host's sheet URLs reach the client again, and providers the host lacks (token sources without token providers, the library for non-GMs, the roll log without `rolls`) are left out, so the table hides their features. - The token frames and the image frames are the bundled plugins `token-frames` and `image-frames` (`server/taflor_server/plugins/`): `token-frames` registers 25 frames (vine to web) in the `tokenFrames` registry, `image-frames` 25 frames (wood to tape) in `imageFrames`, each with its styles in its `frames.css`. The core keeps classic, the seafaring frames (five of each) until the sea-pack plugin takes them over, and what draws them: `tokenLooks`, the freeze while the camera moves, the image frame layer and its thickness. The drawing helpers both share are `@taflor/api` `frames.token` and `frames.image`, experimental like `paths` and `kinds`. A frame nothing registered shows as classic on a token and as no frame on an image, and its name stays stored; the pickers show it once its plugin registers. The pickers list the core's frames first. The frames look as before. `preferences.TOKEN_FRAMES` and `protocol.image_frames()` are the plugins' manifests and the core's, with the same names as before; `protocol.IMAGE_FRAMES` still resolves to the same tuple. The offline pages and the website demo load both plugins. ### Fixed - A bundled plugin's fonts are cache-busted: each `url()` in its stylesheets carries the file's own hash (`?v=`), which a server test checks, so a replaced font no longer keeps its cached URL. - A dice effect now gets its colour as a parsed `#rrggbb`: the event's colour comes from the CSS custom property `--dice-`, which a skin may set, and the effects write it into SVG markup, so a crafted value could have added an event handler to the page. Note font defs (`noteFonts`) carry only their label now: the unused `family` field is gone, the font itself stays the stylesheet's. - A plugin's file paths stay inside its folder: `ctx.plugin.assetUrl` and the loader's labels, data files, styles and data fields (`ASSET_FIELDS`) refuse encoded dots and slashes (`%2e`, `%2f`, `%5c`), backslashes, `?`, `#` and anything the URL parser resolves outside the folder (`pluginFileUrl`). - Library adds respect the table's capabilities (`capability.missing` for a die, path or GM info the table doesn't offer) and refuse files and images over the limits with `payload.too_large`. A server extension's registered object kind can be created. - On the offline pages (the dev harness, the sandbox, the preview and the website demo), the bundled plugins' "Add" entries, HUD buttons, menus and tools now show on the table. They used to register out of the page's sight. - On the pages without a server (dev harness, sandbox), the presence list holds the user, as the server's state does, instead of nobody, so the HUD shows their dot. Without a socket the list shows no latency, rather than "measuring…" forever. - The Add menu shows "Dice", "GM info" and "Path" again instead of their raw label keys: the bundled plugins that add these entries through their kind's `attach` now pass the translated label, as `ui.addMenu.contribute` does for every plugin. The testkit's `mountPlugin` takes the page's `hooks`, so a test can mount a plugin and emit, apply and ask its hooks. - The core's font in table.css (Pirata One) is cache-busted like the bundled plugins' fonts: its `url()` carries the file's own hash (`?v=`), and the server test that checks the plugins' stylesheets checks the core's CSS too. - The dice log works with a v2 server: live rolls and history pages show each roll once, newest first, and a roll of the game's dice system is ranked by its `classes`. Before, the log failed to load the server's history and dropped every live roll. - The dice tray and the dice log show a roll of the server's dice system as it was sent. A d20 showing 17 used to be drawn as three exploding d6 (6 + 6 + 5) and announced as a mega critical. Now exploded dice follow the `exploded` flags of their faces, and the card takes crit, megacrit and fail from the roll's `classes`. - The offline table (`OfflineSync`) refuses invalid setting values with the server's texts and `payload.invalid` instead of ignoring them (conformance scenario `core/table-settings-invalid`). `ClientHost.library.keep` returns null when the host answers without an object. `hooks.json` marks the hooks the core doesn't call yet (`"called": false`). The testkit needs Node 22.15 and unmounts through `loader.stop`. A JSON `Accept` with `q=0` gets the HTML CSRF page. The dice log colours a roll's total by its rank and styles the crit tag. German: "versuche es dann erneut" throughout. - The table page loads its plugins' code in parallel again: the loader imports every plugin's entry at once, alongside the data step, and still activates them one at a time in lock order; the page preloads each plugin's whole module graph, the core modules behind `@taflor/api` and the plugins' data files. On the busy scene the network rounds before the table's socket drop from 39-40 to 7. - The website check builds from a copy of the files git tracks (`scripts/check.sh tracked-copy`), so a directory only one checkout has, such as an empty `static/table/fonts/`, can no longer make it pass. - With `DEBUG` on (the dev server), a table page renders fast again: the plugins' files are read and hashed once per change, not once for each of the page's preload links. - `plugin.error` reports are logged with the client's text escaped, so a newline in it can't forge a log line of its own. ## 0.2.0 (2026-12-05) ### Added - A stand-in host for the tests (`taflor_server.testing.standin`, installed only by the test settings): a game platform's generic models and `StandInHost`, which the host-specific tests and the T24 perf seed run on. - Library endpoints under the HTTP API (`api/v2/tables//library//`, `add/`, `keep/`): the GM browses the host's `LibraryProvider`s, adds entries (placed where they cover nothing, files through the upload checks) and keeps table objects as library content. The page config lists the libraries (`library`, `library_url`). - The server's texts (the table's labels, error messages, refusals and the admin) are available in German: `taflor_server` ships a German message catalogue. ### Changed - Tables follow the capability catalogue: without `dice`, `fog`, `paths`, `gminfo`, `presence`, `cursors`, `combat` or `view-pull` the server refuses their messages with `capability.missing`, creates no objects of the kinds they gate and sends none of their messages. - The server refuses object data keys without a data-key policy (`payload.invalid`). The core declares policies for its own kinds; plugins keep their data under `data.ext.`, and server extensions register policies for their keys. Objects of unavailable kinds are kept but refuse changes with `kind.unavailable`. - User preferences (token frame, ping, cursor, trail, colour, dice skin and effects) are stored as namespaced keys in one `UserPrefs` model, per user and for the instance or a game; the two fixed-column preference models are gone. Hosts migrating data map their columns to the keys listed in SPEC §5.1. - `taflor-server` now depends on `taflor-protocol` of the same version, the package with the protocol's JSON Schemas and catalogues, and installs it with jsonschema. Releases publish `taflor-protocol` first. ## 0.1.0 (2026-12-05) ### Removed - PhaseSix's own table features left the core: sheet panels, adventure and wiki pickers, keep-as, master tables, preview, sandbox, brands, civic stars and the table list pages. A host provides them through `TableHost` (`docs/migration/apps-table.md`). ### Added - One check script for development and CI (`scripts/check.sh`): ruff, the migration check, the import contract that keeps PhaseSix out of the core, REUSE licensing, and the server, client and website tests. CI on Forgejo Actions with a sign-off (DCO) check on pull requests. - The table server and client, taken over from PhaseSix's virtual table with their history (cut point PhaseSix `5150f653`, `CUT_POINT.md`). Three assets of unknown source were left out and have stand-ins (`docs/assets.md`). - The website taflor.org: the product page in English and German, the documentation site, imprint and privacy pages. The texts of the website and the documentation are licensed under CC BY 4.0. - Versioned releases: one product version for all packages (`VERSION`), this changelog from fragments, a release job for tags of the form `X.Y.Z`, and `SECURITY.md`. ### Changed - A core without PhaseSix: the standalone Django project (PostgreSQL only, configured from the environment, hypercorn), the `TableHost` interface with a default host, and a data model without links to PhaseSix's apps (`Game`, object sources as data, one new initial migration). - Breaking: the table protocol is now version 2. Objects carry `source`, `owner` and `meta` instead of PhaseSix's ids, the state names the table's capabilities, and the host decides roles, token sources, data-key policies, rolls and props through `TableHost`; hosts get `api.broadcast_roll`, `api.show`, `api.people`, `api.tables_with_people` and `api.place_free`. # Guides # Writing a plugin This guide builds two small plugins: `lantern`, a client plugin with a table effect, a menu entry and a tool, and `ink-cobalt`, a skin that adds an ink without any code. Both are complete in the repository under `docs/examples/plugins/`, and a test starts them through the real loader (`server/taflor_server/tests/js/test_docs_examples.mjs`), so what you read here runs. Installing comes with M2 Taflor 0.3.0 loads only its [bundled plugins](https://taflor.org/docs/reference/bundled-plugins/index.md). Installing your own (folder, zip, release, catalogue) comes with milestone M2. You can write and test a plugin now: [Testing a plugin](https://taflor.org/docs/how-to/testing/index.md) runs it against the same loader, `ctx` and registries the table page uses. [How plugins fit in](https://taflor.org/docs/explanation/plugins/index.md) explains kinds, tiers, namespaces and loading; this page is the hands-on part. ## The folder ``` lantern/ ├── table-plugin.json the manifest ├── main.js the entry module (client plugins only) └── i18n/ ├── en.json labels; en is required └── de.json ``` The folder name is the plugin's `id`: lower case letters, digits and `-`, 2 to 32 characters. `core` is reserved. ## The manifest ``` { "manifestVersion": 1, "id": "lantern", "version": "0.1.0", "kind": "client", "title": {"en": "Lantern", "de": "Laterne"}, "description": {"en": "A glowing table effect, a menu entry and a tool: the plugin authoring guide's example."}, "license": "CC0-1.0", "api": "^1.0", "entry": "main.js", "labels": {"en": "i18n/en.json", "de": "i18n/de.json"}, "contributes": { "tableEffects": ["glow"] }, "performance": [{"key": "glow", "cost": {"blink": "low", "gecko": "medium"}}] } ``` - `manifestVersion`, `id`, `version` (strict semver), `kind` and `title` (with `en`) are required; `api` is required for `client` and `system` plugins. Plugin API 1.0 is the current one, so `"^1.0"`. - `contributes` declares, per registry, the short names the plugin registers. Registering a name that isn't declared throws. - `performance` declares the plugin's switches in the Performance tab: `cost` per engine (`blink`, `gecko`) is `low`, `medium` or `high`; "reduce effects" covers the key unless it says `"reduced": false`. - `labels` names one flat JSON file per language. - Unknown fields are refused, with an error naming the field. Extras of your own go in top-level fields named `x-`. The schema is `manifest/v1.json` in `@taflor/protocol` (`protocol/schemas/manifest/v1.json`); the testkit's `manifestProblems` checks a manifest against it and checks that every file it names exists. ## The entry module ``` // The example plugin of the plugin authoring guide (docs/how-to/plugins.md): a table effect, // a context menu entry and a tool with a key. Its test is // server/taflor_server/tests/js/test_docs_examples.mjs. import { effects } from "@taflor/api"; /** @type {import("@taflor/api").EffectDef} */ const glow = { label: "effect.glow", // One of the core's effect groups (effect-weather, -nature, -water, -sky, -magic, -tech). group: "effect-magic", fps: 30, // The plugin's own Performance switch (manifest `performance`); the core stills the effect // when it is off or effects are reduced. perfKey: "glow", create() { let motes = []; return { resize(view) { const random = effects.seeded(7); motes = Array.from({ length: effects.particleCount(40, view) }, () => ({ x: random() * view.width, y: random() * view.height, phase: random() * Math.PI * 2, })); }, frame(ctx, time) { for (const mote of motes) { ctx.globalAlpha = 0.4 + 0.4 * Math.sin(time * 2 + mote.phase); ctx.fillStyle = "#ffd27a"; ctx.fillRect(mote.x, mote.y, 3, 3); } ctx.globalAlpha = 1; }, still(ctx) { ctx.fillStyle = "#ffd27a"; for (const mote of motes) ctx.fillRect(mote.x, mote.y, 3, 3); }, }; }, }; /** @type {import("@taflor/api").Plugin} */ export default { activate(ctx) { const t = ctx.plugin.t; // Stored as `lantern:glow`; the short name is declared in `contributes.tableEffects`. ctx.registry.tableEffects.register("glow", glow); // An entry of the empty table's context menu, in the default group `plugin`. ctx.ui.contextMenu.contribute("table", (_target, _selection, at) => [ { label: t("menu.here"), action: () => ctx.ui.notify(t("lit", { x: Math.round(at.x), y: Math.round(at.y) })) }, ]); // A tool: with `activate` and a `label` it gets a HUD button in the "tools" group, and // presses reach it only while it is the active tool. The key `l` switches it. ctx.tools.register({ id: "lantern", slot: "draw", label: t("tool"), icon: "star", activate() {}, deactivate() {}, pointerDown(_event, at) { ctx.ui.notify(t("lit", { x: Math.round(at.x), y: Math.round(at.y) })); return true; }, keys: [{ key: "l", run: () => ctx.tools.activate("lantern") }], escape: () => (ctx.tools.isActive("lantern") ? (ctx.tools.deactivate("lantern"), true) : false), readOnlyCancel: true, }); }, }; ``` The default export has `activate(ctx)` and, optionally, `deactivate()`. `activate` gets 5 seconds; if it throws or runs out of time, everything the plugin registered is rolled back. You don't need a `deactivate` to clean up: every registration returns a function that takes it back, and the loader takes them all back when the plugin stops. Use `ctx.dispose(fn)` for anything else you set up (timers, listeners on your own elements). A plugin imports nothing from the core except `@taflor/api`, which the page maps by that name. `ctx` has the rest; core classes, DOM markup and module internals are not API. Another plugin's code is reachable only through its entry, `@plugin//` (for example `@plugin/lantern/main.js`), and only for a plugin your manifest `requires`, because the page maps only the plugins in the game's lock. Its other modules are not API: once that plugin ships as a bundle, importing one of them by its path would load a second copy with its own state. If your plugin has helpers for others, export them from its entry. ### Labels `ctx.plugin.t(key, vars)` resolves the plugin's own keys, in the user's language, then English, then the key itself. `{name}` placeholders take `vars`. A registry def's `label` is a key in the same namespace: the effect above shows as "Lantern glow". ## Registries `ctx.registry..register(shortName, def)` adds an entry and returns what removes it. The table stores `lantern:glow`. Readers fall back to the registry's default for an id they don't know, so a table keeps working when your plugin is switched off. Most registries take defs from code. Data files are limited to seven registries, whose defs the core keeps inert; since a skin or content plugin has no code, those are all it can fill. The [registry reference](https://taflor.org/docs/reference/registries/index.md) lists all of them with their def shapes. Rules worth knowing: - An animated def names a `perfKey`, one of the plugin's own `performance` keys (given short, stored as `lantern:glow`) or a core switch. - Picker groups come from the `groups` registry. Group ids are `-` (`effect-magic`); the core registers the groups several plugins share, such as the effect groups `effect-weather`, `-nature`, `-water`, `-sky`, `-magic` and `-tech`. ## Menus, the HUD and other mount points Plugins never get the core's markup. They contribute entries, and where they show something of their own they get an empty element to fill (`mount(el)`). Every call returns what takes the entry back. | mount point | call | notes | | --------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | context menu | `ctx.ui.contextMenu.contribute(where, build, {group, order})` | `where`: `"table"`, `"object"`, `"selection"` (two or more objects) or a kind id. `build(target, selection, at, access)` returns items `{label, action, danger?, checked?, separator?}`. Groups in menu order: `sheet`, `dice`, `marker`, `visibility`, `arrange`, `library`, `view`, `combat`, `light`, `plugin` (default), `credits`, `showcase`, `delete`. No menu opens on a read-only table | | Add menu | `ctx.ui.addMenu.contribute({id, label, icon, group, when?, run(at)})` | groups: `pieces`, `content`, `mark`, `sources` | | HUD | `ctx.ui.hud.button({id, label, icon, group?, gate?, toggle?, run})` | groups `create`, `settings`, `panels`, `tools` (default), `find` | | settings dialog | `ctx.ui.settings.tab({id, label, gate?, mount(el) → teardown?})` | after the core's tabs; `mount` runs the first time the tab shows | | appearance | `ctx.ui.looks.section({id, label, mount(el, prefs) → show?})` | the user's own looks | | inspector | `ctx.ui.inspector.fieldset(kindOrStar, {id, label, when?, mount(el, objects, update) → show?})` | after the core's fieldsets; `update(patch, final?)` patches the objects the user may edit | | drawer | `ctx.ui.drawer.open({id, label, gate?, mount(el) → teardown?})` | the side drawer of the pickers, one at a time | | modal | `ctx.ui.modal({id, isOpen})` | while `isOpen()` is true the table's keys stay off | | toast | `ctx.ui.notify(message, level)` | `level` `"info"` or `"error"` | Without `gate` or `when`, an entry shows while the table is not read-only. Labels are your label keys or plain text. `mount` must be synchronous: a returned promise is not awaited, and its teardown would be lost. ## Tools and keys The table's pointer and keyboard input runs through one ordered tool chain, and the built-in tools (select and pan in the core; the ruler, the pen and the marker tool in their bundled plugins) are in it like yours. - The chain asks tools by `slot` - `modal`, `draw`, `object`, `background` - then in registration order, the core's first: a press until a `pointerDown` returns `true`, a key until a binding takes it, Escape until an `escape` returns `true`. - A tool with `activate` gets presses, moves and releases only while it is **the** active tool. One tool is active at a time; `ctx.tools.activate(id)` switches, and a tool with a `label` also gets a HUD button in the `tools` group. A tool in the `modal` slot must have `activate` when it takes presses or Escape. - A key binding is `{key, mod?, run}`: `key` as in `KeyboardEvent.key`, `mod` `ctrl` (⌘ too), `alt`, `shift`, combined with `+`, or `any`. Without `mod` the key counts without Ctrl/⌘ and Alt. `run` returning `false` leaves the key to the rest of the chain. - No key reaches the chain while a text field has the focus, a `ui.modal` is open or a tool's `modal()` is true. - `gate(access)` decides whether the tool takes part (default: while the table is not read-only); `readOnlyCancel: true` ends it when the table turns read-only. **Key conflicts.** If your binding takes a key that another owner's binding takes, yours stays off: the core keeps its keys, and of two plugins neither gets it. The conflict is reported to each plugin in it (`plugin.error`) and in the console. A management screen where the GM resolves conflicts comes with M2; until then, pick keys the core doesn't use, or `alt+` combinations. ## Hooks `ctx.hooks` has three roles. The names come from a fixed catalogue ([Hooks](https://taflor.org/docs/reference/hooks/index.md)); a name outside it, or a hook used in another role, is refused. ``` // listener: observe; the return value is ignored ctx.hooks.on("selection.changed", (ids) => { /* ... */ }); // filter: get a value, return it (changed or not); chained by ascending priority ctx.hooks.filter("object.create", (props, { kind }) => (kind === "note" ? { ...props, name: props.name || "Note" } : props), { priority: 10 }); // provider: an exclusive slot; a second provider is a conflict ctx.hooks.provide("dice.summary", (roll) => `Total ${roll.total}`); ``` Listener payloads are frozen copies. A filter that throws, or returns `undefined` or a promise, is skipped. In 0.3.0 the core doesn't call the catalogue's filters yet (`object.create`, `menu.object`, `menu.table`, `token.overlays`): a plugin may add them, and they take effect once the core calls them. Use `ctx.ui.contextMenu` for menu entries meanwhile. Object hooks never fire during drags, and not while a full state is applied (`table.state` follows it). The dice providers are explained in [Systems and dice](https://taflor.org/docs/how-to/systems/index.md). ## Drawing every frame Plugins don't get per-frame events. Something that has to move each frame asks the shared scheduler: ``` const stop = ctx.frame.request((time, dt) => { // draw; time and dt in seconds }, { fps: 30, perfKey: "glow", still: () => { /* one unmoving rendition */ } }); ``` It pauses while the page is hidden and while the `perfKey` is off or effects are reduced (then `still` runs once), caps the callback at `fps`, and measures it: callbacks over 2 ms per frame on average show up in the Performance tab. Table effects (`tableEffects`) don't need this: the core's effect engine draws them. ## A skin: data and CSS, no code A pack without JavaScript is a `skin` (T1), not a `client` plugin. It can fill the registries that take data files and bring CSS. `ink-cobalt` adds one ink for text labels: ``` { "manifestVersion": 1, "id": "ink-cobalt", "version": "0.1.0", "kind": "skin", "title": {"en": "Cobalt ink", "de": "Kobalttinte"}, "description": {"en": "One more ink for text labels, data and CSS without code: the plugin authoring guide's skin example."}, "license": "CC0-1.0", "styles": ["inks.css"], "labels": {"en": "i18n/en.json", "de": "i18n/de.json"}, "contributes": { "noteInks": {"names": ["cobalt"], "data": "inks.json"} } } ``` ``` { "cobalt": {"label": "ink.cobalt"} } ``` ``` /* A text label in this ink, and its tile in the inspector: the note carries the stored id. */ :is(.table-note, .table-inspector__ink)[data-note-ink="ink-cobalt:cobalt"] { --note-ink: #3d6fd8; } ``` The data file maps short names to defs; the stored id, and so the value in the DOM, is `ink-cobalt:cobalt`. A skin may not declare `entry`, `sheets`, `frames` or `csp`: the manifest schema refuses them (on the server and in the testkit), and the page's loader refuses a skin that names an entry. Data for any registry outside the data-file list is refused by the server and the loader. A table skin is a skin plugin too: a `skins` data file sets the core's colours, sizes and heading font, each value checked against its token's type (see [skin tokens](https://taflor.org/docs/reference/registries/#skin-tokens) and the `harbour-skin` example). Taflor 0.3.0 checks and keeps table skins in the registry; the table page doesn't apply one yet. A skin's CSS may also colour the dice effects with `--dice-` (`one`, `six`, `explode`, `crit`, `megacrit`): write them as `#rrggbb`, since a translucent colour or any other value falls back to the event's own colour. ## The `@taflor/api` module `@taflor/api` is the one core module a plugin imports. Its stable part is small: `API_VERSION`, `Emitter` and the type definitions (`Plugin`, `PluginContext`, `EffectDef`, ...), which editors read through JSDoc. Experimental namespaces The helper namespaces below exist for the bundled plugins and **may change within API 1.x**, until a third-party plugin needs them and they are settled. Use them if they save you work, pin the Taflor version you test against, and expect to adapt. | namespace | for | what | | ------------- | ------------------------------------------ | --------------------------------------------------------------------------------------------------------- | | `effects` | `tableEffects` | particle counts, seeded randomness, sprites, drifting texture layers | | `frames` | `tokenFrames`, `imageFrames` | `frames.token` draws along a token's outline, `frames.image` the image frame layer's contract and helpers | | `paths` | `pathStyles`, `pathMotions`, `pathMarkers` | `paths.decor`: stamps along the curve, offset and jittered lines, motions locked to the server clock | | `pings` | `pingStyles` | the ping's dot and ring markup and shape helpers | | `kinds` | bundled object kinds | grid helpers, small UI builders, the dice, path and marker helpers, the server clock, the sound gate | | `TableObject` | object kinds | the base class of a kind's objects | ## Object kinds An object kind has two halves: what the server enforces is declared in the manifest (`contributes.objectKinds`: `layer`, `snap`, sizes, `carriedByMaps`, `defaults`, `playerFields`, and a JSON Schema for `data`), and the browser half is registered in code (`ctx.registry.objectKinds.register(name, {Class, label, ...})`, with a class that extends `TableObject`). The loader merges the two; a code def that repeats a manifest field with a different value throws. The bundled `measure`, `paths`, `markers`, `gminfo`, `dice` and `media` plugins are the worked examples. The fields that reach into the table itself (`attach`, `container`, `doubleClick`, `accessChanged`, `ownMenu`) are for bundled plugins only; a plugin's kind with one of them is refused. Third-party object kinds need the install pipeline (M2) for the server to accept them on a table. ## Shipping one module Write and test your plugin as plain ES modules, which needs no build step. For a release, bundle the code into one module per entry. Every module is one more request each time a table loads, and the install review warns when an entry's graph loads more than 10. The host installs your files as they are and never bundles them itself. [esbuild](https://esbuild.github.io/) does it in one command. Pin its version in your own `package.json`, so the same sources always give the same bytes: ``` npx esbuild main.js --bundle --format=esm --outfile=dist/main.js \ --external:@taflor/api '--external:@plugin/*' \ --sourcemap --charset=utf8 --legal-comments=inline ``` - `@taflor/api` stays external: the page maps it to the core's module, and a copy inside your bundle would have registries and classes of its own. The same holds for `@plugin/*`, the entries of plugins you require. - Leave out `--minify`. Readable code gives readable stack traces in the GM's error reports, and the web server usually compresses the file anyway. - Point the manifest's `entry` at the bundle (`"entry": "dist/main.js"`) and ship the `.map` next to it. Shipping the sources too is up to you. - The bundle lives in another folder than the sources, so `import.meta.url` changes its base. Use it only for files whose path you know relative to the bundle, or not at all. - Test what you ship: `mountPlugin` with `dir` imports the manifest's `entry`, so it runs the bundle (see [Testing a plugin](https://taflor.org/docs/how-to/testing/index.md)). Taflor's own bundled plugins are bundled the same way when a release is built: the server runs them from their bundles in production and from their sources while you develop. The format of those release bundles is described in the design specification, which will be published later. # Testing a plugin `@taflor/testkit` starts a plugin the way the table page does - the manifest checked, its data registered, then `activate(ctx)` with the real context, registries and loader - but in Node, without a browser. Every bundled plugin is tested with it, and the checks it runs on yours are the same ones. Not published yet The kit is `testkit/` in the Taflor repository; the npm package `@taflor/testkit` follows with the first stable plugin API. Until then, import it by path from a Taflor checkout. It needs Node 22.15 or newer and runs with `node:test`. ## A plugin's tests These are the tests of the `lantern` example from [Writing a plugin](https://taflor.org/docs/how-to/plugins/index.md), in its `tests/` folder: ``` // The lantern example's own tests, as a plugin repository has them (docs/how-to/testing.md). // Run with `node --test tests/`; server/taflor_server/tests/js/test_docs_examples.mjs runs them // in Taflor's checks. import assert from "node:assert/strict"; import test from "node:test"; import { fileURLToPath } from "node:url"; // In a plugin repository of its own: from "@taflor/testkit". import { assertOwnNamespace, assertRegisteredAsDeclared, manifestProblems, mountPlugin, readManifest, runEffect } from "../../../../../testkit/index.js"; const dir = fileURLToPath(new URL("..", import.meta.url)); const manifest = readManifest(dir); test("the manifest is valid, and every file it names is there", () => { assert.deepEqual(manifestProblems(manifest, { dir }), []); }); test("it starts, registers what it declares and writes only its own names", async () => { const mounted = await mountPlugin(manifest, { dir }); try { assertRegisteredAsDeclared(mounted.registry, manifest); assertOwnNamespace(mounted, manifest); } finally { await mounted.unmount(); } }); test("the glow draws and stays well within the frame budget", async () => { const mounted = await mountPlugin(manifest, { dir }); try { const glow = mounted.registry.registry("tableEffects").get("lantern:glow"); const run = runEffect(glow, { frames: 120 }); assert.ok(run.calls.get("fillRect") > 0); assert.ok(run.avgMs < 2, `${run.avgMs.toFixed(3)} ms per frame`); } finally { await mounted.unmount(); } }); ``` Run them with `node --test tests/`. Taflor's own checks run them too (`server/taflor_server/tests/js/test_docs_examples.mjs`), so this page can't drift from what the kit does. ## What the kit gives you `mountPlugin(manifest, options)` starts one plugin. With `dir` (the plugin's folder) it imports the entry and reads labels and data files from there, and `@taflor/api` resolves to the core's API module. It returns: | field | what | | ------------------- | ---------------------------------------------------------------------------------------------- | | `ctx` | the plugin's context, as `activate` got it | | `activated` | what `activate` returned, awaited (the page's loader drops it) | | `registry` | the registries, with the core's entries and the plugin's (`registry.registry("tableEffects")`) | | `notices` | what the GM was told (`ctx.ui.notify`, failures), `[message, level]` | | `logged`, `reports` | console lines, and the `plugin.error` reports the page would send | | `sync`, `messages` | the in-memory sync (`memorySync()`): what the plugin wrote and what the "server" answered | | `state`, `reason` | `"active"`, or why not (with `allowFailure: true` it doesn't throw) | | `unmount()` | stops it as the page does: `deactivate`, then the rollback; throws if `deactivate` failed | Options include `host` (a `fakeHost({...})`: role, user, capabilities, providers), `settings`, `timeoutMs`, and `mounts` and `tools` to inspect what the plugin contributed to menus, the HUD and the tool chain (`new Mounts()` and `new Tools()` of the client). With `bundle: true` (and `dir`), the kit starts the plugin from its bundle in `/_bundle/` instead of its source entry (SPEC §10.8). Pass a path instead of `true` to take the bundle from another folder that holds its `bundle.json`, such as one that `bundle-plugins.mjs --out DIR` wrote. The kit reads `bundle.json` first and throws if the bundle is missing, belongs to another plugin, lacks a file or is stale, i.e. built from sources that have changed since. So a test never runs an old bundle by mistake. For Taflor's bundled plugins, `scripts/bundle` builds the bundles, and its equivalence test mounts every code plugin both ways and compares what each registers. For your own plugin, build with your bundler first and mount the result the same way. The checks: - `manifestProblems(manifest, {dir})` - one line per problem, as the server words them: the schema, and every file the manifest names exists inside the folder. `assertValidManifest` throws instead. - `assertRegisteredAsDeclared(registries, manifest)` - the plugin registered exactly the names its `contributes` declares, under its namespace, its `performance` keys included. - `assertOwnNamespace(mounted, manifest)` - nothing written outside the plugin's namespace: no registry entry under another id, no `data.ext.` in its object writes. - `runEffect(def, {frames})` - plays a `tableEffects` def on a fake canvas as the core's engine does; returns `{frames, avgMs, maxMs, calls}`. - `perfProbe({budgetMs})` - a frame scheduler on simulated frames that times `ctx.frame` callbacks for real: `run(frames)`, `stat(owner)`, `assertWithinBudget(owner)`. `mountPlugin` uses one; it's `mounted.probe`. - `fakeTable()`, `fakeStore()`, `fakeCamera()` - a real `Table` prototype without the DOM, for bundled kinds that attach to the table. A mounted plugin has hooks of its own: a test that wants the page's dice tray to ask its `dice.summary` provider hands the provider on, as `test_docs_examples.mjs` does for the `pbta-moves` example of [Systems and dice](https://taflor.org/docs/how-to/systems/index.md). ## The protocol conformance suite The conformance suite is for **servers and hosts**, not plugins: it checks that a table authority answers the protocol as specified. The scenarios live in `@taflor/protocol` (`protocol/conformance/v2//*.yaml`, format in `protocol/conformance/FORMAT.md`): a fixture with seats and objects, then steps that `send`, `expect`, `never` and `expectClose`. A server or host claims a capability only if it passes that capability's scenarios. Two runners exist: - **Python, in-process**, against `taflor_server`: `taflor_server.testing.conformance.run_scenario`, which `server/taflor_server/tests/test_conformance.py` runs for every scenario. A host that replaces Taflor's (PhaseSix, for example) runs the same tests with its own host. - **JavaScript**: `runScenario(scenario, target)` of `protocol/conformance.js`, with `loadScenarios()` and the message validators. The client plays every scenario against its offline authority, `OfflineSync` (`server/taflor_server/tests/js/test_conformance_offline.mjs`), which lists the scenarios only a server can pass, with the reason. A network runner against any running server comes with 1.x. # Systems and dice A system is a game's rules: entity schemas, sheets, dice and initiative. Full system plugins (kind `system`, with entity schemas, sheets in frames and a declarative dice spec) arrive with milestone M3. What 0.3.0 has is the dice half, on both sides: - **On the server**, a `DiceSystem` that the host provides draws every number that matters and returns a `RollResult`. Its `ext` carries the system's own data to the browser. - **In the browser**, a system's client plugin reads the results: `dice.classify` marks single dice, `dice.summary` writes one line under the total. The `diceSystems` registry rolls for pages without a server. The running example is a Powered-by-the-Apocalypse system: `2d6+1 Go aggro` rolls two six-sided dice plus one, and the tray says "Go aggro: weak hit, at a cost". Both halves are in `docs/examples/` and are run by tests (`server/taflor_server/tests/test_docs_generated.py`, `server/taflor_server/tests/js/test_docs_examples.mjs`). ## On the server: a dice system The server never runs plugin code; the dice system is Python that the **host** provides (`TableHost.dice_system(table)`), from its own code or from a server extension. Without one, the core rolls standard expressions itself: `NdS` and `NdS±M`, summed, nothing explodes, no classes. ``` """A dice system on the server (SPEC §8.5): "2d6+1 Go aggro" rolls 2d6 plus one, and tells its client plugin which move was rolled through ``RollResult.ext``. The systems guide's example (docs/how-to/systems.md); server/taflor_server/tests/test_docs_generated.py rolls it.""" import re from taflor_server.host import DieFace, RollResult MOVE = re.compile(r"^\s*2d6\s*(?:([+-])\s*(\d{1,2}))?\s*(.*?)\s*$", re.IGNORECASE) class PbtaDice: id = "pbta" #: The declarative spec the client gets; this system needs none. spec = {} def parse(self, expression): match = MOVE.match(expression or "") if match is None: raise ValueError(f"not a move roll: {expression!r}") sign, amount, move = match.groups() modifier = int(amount or 0) * (-1 if sign == "-" else 1) return {"modifier": modifier, "move": move} def evaluate(self, plan, context, rng): faces = [DieFace(6, rng.randint(1, 6)) for _ in range(2)] total = sum(face.value for face in faces) + plan["modifier"] return RollResult( expression=f"2d6{plan['modifier']:+d}" if plan["modifier"] else "2d6", dice=faces, total=total, classes=["success"] if total >= 10 else ["fail"] if total < 7 else [], detail={"modifier": plan["modifier"]}, # For the client plugin, under this system's id; JSON, small, not too deep. ext={"pbta": {"move": plan["move"]}} if plan["move"] else {}, ) def initiative(self, record, token): # PbtA games have no initiative: the combat tracker asks for it by hand. return None ``` The protocol, in `taflor_server.host`: | member | what | | ------------------------------ | ------------------------------------------------------------------------------------------ | | `id` | the system's id; it also keys its data in `RollResult.ext` | | `spec` | the declarative spec the client gets (`{}` when there is none) | | `parse(expression)` | a plan of your own; `ValueError` for input it can't roll | | `evaluate(plan, context, rng)` | a `RollResult`; draw with `rng` (`randint`, `random`), never with your own generator | | `initiative(record, token)` | an `InitiativeSpec` (`expression`, `tiebreak`), or `None`: the tracker asks for it by hand | `RollResult` has `expression`, `dice` (each `DieFace`: `sides`, `value`, `exploded`, `rerolled`), `total` (`None` when a roll has no sum), `classes`, `detail` and `ext`: - **`classes`** classify the whole roll. The tray and the log mark `megacrit`, `crit`, `success` and `fail`, the first one that matches in that order; other names are kept and passed on. - **`detail`** is the system's breakdown; `detail["modifier"]` shows in the roll's line. - **`ext`** is the system's own data for its client plugin, a JSON object keyed by system ids: `{"pbta": {"move": "Go aggro"}}`. At most 4096 bytes encoded and 16 levels deep; anything else is refused with `ValueError`. It goes with the roll in `dice.rolled` and in the roll log. Players get `ext` as `null` for a roll on a token hidden from them, because a system's data can tell whose roll it was. Rolls from older servers have no `ext`; read it as `{}`. ### The roll log The host keeps the log, if it wants one (`TableHost.roll_log(table)`, `None` for no log). The core gives every roll a `roll_id` and a server time `at`, and calls `RollLog.record(game, table, user, actor, result, visibility, entry)` with the log entry: the fields of `dice.rolled` the dice log shows, as the GM gets them, `ext` included. **Store `entry` as given**, including `entry["ext"]` (the checked copy), never the raw `result.ext`. `RollLog.history(game, user, cursor, limit)` returns `{"records": [entry, ...], "cursor": or None}`, newest first; the core shapes each entry for its reader. Rolls made outside the table (a sheet, another page of the host) reach it through `api.broadcast_roll(...)`, with `record=True` to log them like table rolls. ## In the browser: reading the results The browser never decides a roll; it shows the server's. A system's client plugin explains a result through two providers, exclusive slots of the hook catalogue: ``` // The example of the systems guide (docs/how-to/systems.md): the two dice providers. The server // rolls; this plugin only reads the result it gets, in frozen copies. Its test is // server/taflor_server/tests/js/test_docs_examples.mjs. /** The data a server-side dice system put into `RollResult.ext`, under its id. */ const own = (roll) => roll.ext?.pbta ?? {}; /** @type {import("@taflor/api").Plugin} */ export default { activate(ctx) { const t = ctx.plugin.t; // One line under the total, plain text, asked when the roll is shown (the reader's language). ctx.hooks.provide("dice.summary", (roll) => { if (typeof roll.total !== "number") return null; const move = own(roll).move ? `${own(roll).move}: ` : ""; if (roll.total >= 10) return move + t("hit.strong"); if (roll.total >= 7) return move + t("hit.weak"); return move + t("miss"); }); // The chips of single dice: a six marks as "success", a one as "fail". ctx.hooks.provide("dice.classify", (die) => (die.value === die.sides ? ["success"] : die.value === 1 ? ["fail"] : [])); }, }; ``` - **`dice.classify(die, roll) → string[]`** gives the classes of one die for its chip in the tray and the dice log. `die` and `roll` are frozen copies; `roll.ext` is there. The roll's own classes come only from `RollResult.classes` on the server. - **`dice.summary(roll) → string | null`** gives one line under the total on the tray's card and in the dice log. It is asked when the roll is shown, so it is in the reader's language. It is plain text, never HTML, cut to 200 characters; a provider that throws shows nothing. Both run for every shown roll, so keep them cheap and pure: no network, no state. A provider slot holds one provider. A second plugin that provides `dice.summary` fails to activate and is rolled back, with both plugins named. ## Rolling without a server The pages without a server - the dev harness, the sandbox, the website's demo - roll in the browser, through the `diceSystems` registry. The bundled `standard` plugin registers its `standard` system there (`server/taflor_server/plugins/standard/`): a def with `parse`, `evaluate` and `initiative`. `parse(expression)` returns a plan or throws, `evaluate(plan, context, random)` returns a `RollResult` (same shape as the server's), `initiative(record)` an `InitiativeSpec` or `null`. In 0.3.0 these pages always roll with `standard`; real tables always roll on the server. # Server extensions Not available yet Server extensions arrive with milestone M4, together with the "first server extension" tutorial. A server extension is an ordinary Django app, installed from pip, a Git URL or a local path. It runs with the server's full rights, talks to the core only through `taflor_server.api` and its registries, and needs a restart to activate. §9 of the design specification (published later) describes the extension descriptor, the hooks and the versioned server API. # Operations Not available yet The container image, the compose file and the setup wizard arrive with milestone M1. What is already decided (§2 of the design specification, published later): - Two modes: standalone (one image or `pip install` plus the `taflor` CLI) and preconfigured (inside a host project, or the standalone image started with a preset). - PostgreSQL only, in every mode. The default install is a `compose.yaml` that brings PostgreSQL along. - One process by default. More workers need Redis for the channel layer and the cache. - Settings come from the environment, an operator-owned `taflor.toml`, the database (written by the setup wizard and the management interface) and defaults, in that order of precedence. Planned how-tos (§13.1): self-host, log in with OIDC, migrate from PhaseSix's table. # Reference # Reference | page | what | source | | ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | | [Registries](https://taflor.org/docs/reference/registries/index.md) | every registry a plugin can fill, its def shape, its fallback, and which take data files | checked against `manifest/v1.json` and `manifests.DATA_REGISTRIES` at build time | | [Hooks](https://taflor.org/docs/reference/hooks/index.md) | the client hook catalogue | generated from `protocol/data/hooks.json` | | [Plugin API (ctx)](https://taflor.org/docs/reference/plugin-api/index.md) | the `ctx` of plugin API 1.0 and the `@taflor/api` module | the JSDoc of `static/table/js/api/index.js` | | [Bundled plugins](https://taflor.org/docs/reference/bundled-plugins/index.md) | the plugins that ship with Taflor | generated from their manifests, tested against `bundled.plugin_ids()` | The machine-readable sources are in `@taflor/protocol` (`protocol/` in the repository): - `schemas/manifest/v1.json`: the plugin manifest, `table-plugin.json` - `schemas/protocol/v2/`: every websocket and HTTP message - `schemas/page-config/`, `schemas/sheet/`, `schemas/extension/v1.json`: the table page's config, the sheet protocol, the server extension descriptor - `data/hooks.json`, `data/capabilities.json`, `data/permissions.json`: the hook, capability and permission catalogues - `conformance/v2/`: the conformance scenarios ([Testing a plugin](https://taflor.org/docs/how-to/testing/#conformance)) The server's host interface (`TableHost`, `DiceSystem`, `RollLog`, the providers) is documented in the docstrings of `taflor_server/host.py`, its public functions in `taflor_server/api.py`. Generated pages for the protocol messages, the client API (from JSDoc) and the server API (from docstrings) follow with milestone M4. # Registries A plugin declares the short names it registers in its manifest's `contributes`, per registry, and registers them with `ctx.registry..register(shortName, def)` (or, where the "data file" column says yes, from a JSON file: `"contributes": {"noteInks": {"names": ["cobalt"], "data": "inks.json"}}`). Stored ids are `:`. Each registry has `register`, `get`, `resolve`, `list` and `on("change", fn)`. - **Data file.** Data files are limited to the registries whose defs the core checks and keeps inert - used as text, numbers, ids and asset URLs, never as markup or code. The server refuses a manifest, and the loader a plugin, that gives any other registry a data file. A `content` or `skin` plugin has no code (the manifest schema and the loader refuse its `entry`), so data files are all it can bring. - **Fallback.** A reader that meets an unknown id (a plugin switched off) uses the fallback, without changing what is stored. A registry without one shows nothing for an unknown id. - **perfKey.** Animated defs name a Performance switch; every `tableEffects` def is animated. This table is checked against the manifest schema and the server's allowlist when the docs are built. | registry | data file | fallback | def (plugin API 1.0) | | --------------- | --------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `tableEffects` | no | `none` | `{label, group, resolution?, fps?, tint?(intensity, layer), create() → {resize(view), frame(ctx2d, time, dt, view), still(ctx2d, view)}, perfKey}`; table and image effects | | `tokenFrames` | no | `classic` | `{label, group?, build(outline) → {base, anim?, motion?}, css?}`; helpers in `frames.token` | | `imageFrames` | no | - | `{label, placement: "inner" \| "outer", animated, render(layer, box, source)}`; helpers in `frames.image` | | `pathStyles` | no | `solid` | `{label, group, defaults: {color, width, spacing}, animatable, stamped?, spaced?, render(pathCtx)}`; helpers in `paths.decor` | | `pathMotions` | no | - | `{label, scope, group?, stamp?(pathCtx, index, count, timing), path?(pathCtx, wrapper, timing)}` + CSS | | `pathMarkers` | no | `none` | `{label, render(pathCtx, at, dir)}` | | `markerStyles` | yes | - | `{label, group: "position" \| "effect" \| , ...}`: a marker's glyph or effect area | | `notePapers` | yes | `sticky` | `{label, font?, size?, align?}` + CSS on `[data-note-style]` | | `noteFonts` | yes | `default` | `{label}` + CSS on `.table-note[data-note-font]`, with its `@font-face` | | `noteInks` | yes | `light` | `{label}` + CSS on `[data-note-ink]` | | `fogStyles` | no | `plain` | `{label, paint(fogPaint), layers?}` + stepped CSS | | `clothPatterns` | yes | `linen` | `{label, tile: , size: [w, h], detail, noise?}` | | `trails` | yes | `steps` | `{label, spacing, lifetime, scatter}` + CSS | | `cursorStyles` | no | `arrow` | `{label, svg, hotspot, trail?}` | | `pingStyles` | no | `ripple` | `{label, markup() → string}` + CSS; helpers in `pings` | | `diceSkins` | no | `light` | a dice skin: colours, materials, `paint?`, `numeral?`, `pipShape?`, `family` | | `diceEffects` | no | - | `(effectCtx) => void`, at most 1.5 s per roll | | `dieModels` | no | - | `{sides, geometry()}` | | `props` | no | - | `{name: {lang: text}, model?: url, procedural?: (three) => {object, anchor, flicker(n)}, size?, light?, credit?}` | | `icons` | no | - | `{svgPath, evenOdd?}` on a 24×24 grid; path data only | | `skins` | yes | - | `{label, stylesheet?, tokens?: {--table-*: value}, defaults?: {frame?, pattern?}}`; [skin tokens](#skin-tokens) only | | `diceSystems` | no | - | `{label?, parse(expression), evaluate(plan, context, random) → RollResult, initiative?(record)}` ([Systems and dice](https://taflor.org/docs/how-to/systems/index.md)) | | `groups` | no | - | `{label, order}`: picker groups, ids `-` (`effect-magic`) | | `sheetKinds` | no | - | `{kind, url(ref), origins}` | | `tokenOverlays` | no | - | `{label, render(token, layer), when(token)}` | | `objectKinds` | no | fallback object | the browser half of an object kind (`Class`, `label`, ...); the server half is `contributes.objectKinds.` in the manifest ([Object kinds](https://taflor.org/docs/how-to/plugins/#object-kinds)) | ## Skin tokens A `skins` def sets the core's custom properties, and only these. Each value must match its type exactly, or the def is refused and the plugin fails to start: nothing in a skin reaches the CSS as `url()`, `var()`, a second declaration or markup. `stylesheet` is a `.css` file of the plugin; `defaults` names a token frame and a cloth pattern by id. | token | type | values | | ----------------------------------------------------------------------------------------------------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | `--table-accent`, `--table-accent-text`, `--table-text`, `--table-muted`, `--table-danger`, `--table-cloth` | colour | `#rrggbb` or `#rrggbbaa` | | `--table-accent-rgb`, `--table-black-rgb`, `--table-white-rgb`, `--table-panel-rgb`, `--table-fog-rgb` | RGB triple | `R, G, B`, each 0 to 255 | | `--table-handle-size`, `--table-character-panel-width` | length | a number with `px` (up to 2000), `rem` or `em` (up to 120) | | `--table-heading-font` | font | up to four families, separated by `,` or `,`: generic ones (`serif`, `system-ui`, ...), `"Quoted Name"` or bare words of letters, digits and hyphens | ``` { "harbour": { "label": "skin.harbour", "stylesheet": "harbour.css", "tokens": { "--table-accent": "#2f8f9d", "--table-accent-rgb": "47, 143, 157", "--table-panel-rgb": "16, 32, 40", "--table-heading-font": "\"IM Fell English\", Georgia, serif" }, "defaults": {"frame": "classic", "pattern": "linen"} } } ``` **Dice event colours.** A skin's stylesheet may colour the dice effects with `--dice-` on the dice layer (`one`, `six`, `explode`, `crit`, `megacrit`). Write them as `#rrggbb`: the effects read the value as one opaque colour, and a translucent colour or anything that isn't a colour falls back to the event's own colour. Labels (`label`) are keys in the registering plugin's own label catalogue. A def's file fields (a cloth pattern's `tile`) are paths inside the plugin; the loader turns them into URLs. # Hooks A plugin uses a hook through `ctx.hooks` in the role the catalogue gives it: | role | call | semantics | | -------- | ---------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | listener | `ctx.hooks.on(name, fn)` | observes; the return value is ignored; errors are caught and reported | | filter | `ctx.hooks.filter(name, fn, {priority})` | gets a value, returns it, changed or not; chained by ascending priority, then the core's, then by load order; a filter that throws, or returns `undefined` or a promise, is skipped | | provider | `ctx.hooks.provide(name, impl)` | an exclusive slot; a second provider throws, naming both plugins, and its plugin's activation is rolled back | A name outside the catalogue, or a hook used in another role, is refused. Each call returns what removes the handler; all of them go when the plugin stops. Payloads are frozen copies. No hook fires per frame, during drags, or while a full state is applied. The catalogue is data: `protocol/data/hooks.json` in `@taflor/protocol`, with each hook's payload schema; the table below is generated from it. | hook | role | since | what | | ------------------- | -------- | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `table.state` | listener | 1.0.0 | After every full state: the first one and each reconnect. Object hooks don't fire while a state is applied. | | `object.added` | listener | 1.0.0 | An object came to the table (read-only copy of its data). Not during drags or a full state. | | `object.changed` | listener | 1.0.0 | An object's state changed (read-only copy). Never for moves alone, never while the user drags it (SPEC §7.10.3). | | `object.removed` | listener | 1.0.0 | An object left the table (read-only copy of its last data). | | `object.create` | filter | 1.0.0 | The props of an object before the client sends its creation; the server validates them again. (not called by the core yet) | | `selection.changed` | listener | 1.0.0 | The selected object ids. | | `access.changed` | listener | 1.0.0 | The user's access changed (role, hidden objects, read-only). | | `camera.settled` | listener | 1.0.0 | The world rectangle in view, once a pan or zoom has ended. | | `menu.object` | filter | 1.0.0 | The items of an object's context menu; an alternative to ui.contextMenu.contribute for reordering. (not called by the core yet) | | `menu.table` | filter | 1.0.0 | The items of the table's context menu. (not called by the core yet) | | `dice.rolled` | listener | 1.0.0 | A roll (read-only copy of dice.rolled, SPEC §8); the tray plays it, plugins may add effects. | | `dice.classify` | provider | 1.0.0 | Classes of a single die for its chip in the dice tray and the dice log, given frozen copies of the die and the roll; the roll's own classes come only with RollResult.classes (SPEC §8.5). | | `dice.summary` | provider | 1.0.0 | One line about a roll under its total in the dice tray and the dice log, given a frozen copy of the roll (with its ext); a string, or null for none. Shown as plain text (never HTML), cut to 200 characters, computed when the roll is shown, so in the viewer's language. A provider that throws shows nothing (SPEC §7.10.2, §8.5). | | `token.overlays` | filter | 1.0.0 | The overlay list of a token. (not called by the core yet) | | `message.*` | listener | 1.0.0 | A plugin message x.. (SPEC §6.6), with its payload. (through `ctx.messages.on`) | | `sheet.message` | listener | 1.0.0 | A message of the sheet protocol (SPEC §7.14). (not called by the core yet) | Server hooks (for server extensions, snake_case names such as `object_changed`) are a separate catalogue; they run once per change on the server, not per browser. # Plugin API (ctx) Plugin API `1.0.0` (`API_VERSION` of `@taflor/api`). A manifest's `api` is a semver range over it, `"^1.0"`. The typed declarations are the JSDoc of `server/taflor_server/static/table/js/api/index.js` (`PluginContext`, `PluginUi`, `PluginTools`, `PluginToolDef`, `PluginRegistry`, `Plugin`). ## The entry module ``` export default { activate(ctx) // required; may be async; 5 s deactivate() // optional; ctx.dispose callbacks and the rollback run anyway } ``` ## `ctx` `ctx` is frozen and made per plugin. After the plugin stops, its methods that register or write throw ("the plugin was stopped"). | member | what | | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `plugin` | `id`, `version`, `settings` (the lock's, read-only), `assetUrl(path)` (a file of the plugin, versioned), `t(key, vars)` (its labels) | | `me` | `userId`, `role`, `isGm`; live, read-only | | `access` | `may(kind, what)`, `mayEdit(object)`, `seesHidden`, `readOnly`, `on("change", fn)` | | `host` | the page's host providers and capabilities, read-only | | `registry` | one [registry](https://taflor.org/docs/reference/registries/index.md) per name: `register(shortName, def) → unregister`, `get`, `resolve`, `list`, `on("change", fn)` | | `frame` | `request(callback(time, dt), {fps?, perfKey?, still?}) → cancel`: the shared per-frame scheduler | | `hooks` | `on`, `filter`, `provide` ([Hooks](https://taflor.org/docs/reference/hooks/index.md)) | | `perf` | `enabled(key)` (a plugin key or a core switch), `reduced`, `on("change", fn)` | | `prefs` | `get(key)`, `set(key, value) → Promise`: the user's preferences the server keeps; in 0.3.0 only the bundled plugins' picks (token frame, ping, cursor, trail, dice skin and effects). Other keys read `undefined`, and `set` throws | | `local` | `get(key)`, `set(key, value)`: per-device JSON values in `localStorage`, namespaced (`table.plugin..`) | | `ui` | `notify(message, level)` and the mount points: `addMenu`, `contextMenu`, `hud`, `settings`, `looks`, `inspector`, `drawer`, `modal` ([mount points](https://taflor.org/docs/how-to/plugins/#mounts)) | | `tools` | `register(def) → unregister`, `activate(id) → boolean`, `deactivate(id)`, `isActive(id)` ([tools](https://taflor.org/docs/how-to/plugins/#tools)) | | `dispose(fn)` | runs `fn` when the plugin stops, in reverse order | | `log` | `warn`, `error`: the console, tagged with the plugin id | Every handler a plugin gives `ctx` runs through its guard: an error is caught, logged and reported, and past the error budget (20 errors within 60 s) the plugin is switched off for the page load. Not in 0.3.0 The design (SPEC §7.5) also has `objects`, `table`, `selection`, `camera`, `messages`, `sound` and `documents`. They come with later versions of the client; a plugin can't write objects, table data or plugin messages yet, nor read the camera or the selection except through hooks (`selection.changed`, `camera.settled`, `object.*`). ## `@taflor/api` | export | stability | | --------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | | `API_VERSION` | stable | | `Emitter` | stable: a small event emitter, `on(event, handler) → off` and `emit(event, payload)` | | type definitions (`Plugin`, `PluginContext`, `EffectDef`, `PathStyle`, ...) | stable within 1.x, except those marked experimental | | `effects`, `frames`, `paths`, `pings`, `kinds`, `TableObject` | **experimental**: they may change within API 1.x ([details](https://taflor.org/docs/how-to/plugins/#api-module)) | # Bundled plugins These plugins ship with Taflor in `server/taflor_server/plugins/` and are on for every table. They are written with the same registries and `ctx` as any other plugin; only bundled plugins keep bare ids (`classic`, `marker`) and may use the core-only object kind fields. The exception is `sea-pack`, which stores `sea-pack:` (D18): its entries came from the core, and their old bare ids are still read as the new ones. Each folder is a worked example, with its tests in `tests/`. The table is generated from their manifests when the docs are built, and a test holds it to the server's list (`bundled.plugin_ids()`), so it always matches the release. | plugin | kind (tier) | contributes | what it brings | | ----------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `cloth-patterns` | content (T0) | `clothPatterns` | The table cloth's patterns: seamless tiles the GM lays over the cloth's colour. | | `cursors` | client (T3) | `cursorStyles` | How a user's ghost cursor looks: 14 styles from a hand and a quill to a lantern and an eye, some with a sparkle or comet trail. | | `dice` | client (T3) | objectKinds: `die` | Dice on the table: the dice bag, setting and rolling a die (R, digits, its menu and the inspector) and a flat die where no 3D die can be drawn. | | `dice-effects` | client (T3) | `diceEffects`, `groups` | Effects for the dice events: 16 animations in four groups, from a glow to lightning, runes and confetti. | | `dice-skins` | client (T3) | `diceSkins`, `groups` | How the dice look: 43 skins in seven families, from ivory and gems to clockwork and pixel art. | | `effects-magic` | client (T3) | `tableEffects` | Glow, embers, falling leaves, fireflies and a starfield. | | `effects-water` | client (T3) | `tableEffects` | A calm and a stormy ocean seen from above. | | `effects-weather` | client (T3) | `tableEffects` | Rain, thunderstorm, snow, fog and sandstorm over the table. | | `effects-wonders` | client (T3) | `tableEffects` | Aurora, blossoms, underwater light, arcane sigils and a hologram grid. | | `fog-styles` | client (T3) | `fogStyles` | How a battlemap's unexplored fog of war looks: ten styles from plain to static, some with drifting layers. | | `gminfo` | client (T3) | objectKinds: `gminfo` | GM info: pins with text only the game master sees, their card, the search (Ctrl/⌘+K) and the conversion from and to notes. | | `image-frames` | client (T3) | `imageFrames` | Frames for images and battlemaps: 25 of them, from carved wood and gilded mouldings to an old film strip and tape. | | `markers` | client (T3) | `markerStyles`, objectKinds: `marker` | Markers on the table: the marker with its style picker, its menu entries and "Show in navigation", and the styles: position markers (pin, banner, footprint, ...) and area effects (fire, mist, portal, ...). | | `measure` | client (T3) | objectKinds: `measure` | The measure object: a line, circle, cone or rectangle on the table with its size in the battlemap's units, and its bar for shape, colour and a cone's opening. | | `media` | client (T3) | objectKinds: `audio`, `video` | Audio and video on the table: their players, playback the game master shares with everyone in sync, each user's own audio volume and the track volume in the inspector. | | `papers` | skin (T1) | `notePapers`, `noteFonts`, `noteInks` | How notes look: eight papers from the sticky note to the hologram, nine fonts and a text label's inks. | | `paths` | client (T3) | `pathStyles`, `pathMotions`, `pathMarkers`, objectKinds: `path` | The path object kind with its bar, and the path styles (lines, tracks, nature, magic, directions, old map), their motions and end markers. | | `pings` | client (T3) | `pingStyles` | How a user's pings look: 14 styles from a beacon and a starburst to a bell, an eye and a feather. | | `props-basic` | client (T3) | `props` | The procedural 3D props: a candle whose flame flickers and an electric table lamp. | | `sea-pack` | client (T3) | `tableEffects`, `imageFrames`, `fogStyles`, `tokenFrames`, `diceSkins`, `diceEffects`, `pingStyles`, `cursorStyles`, `trails`, `pathStyles`, `pathMotions`, `pathMarkers`, `markerStyles`, `groups`, `notePapers`, `noteFonts` | Seafaring looks for the table: sea effects, frames, fog, dice, paths, markers, papers and a pirate font, pings, cursors and a wake. | | `standard` | client (T3) | `diceSystems` | The standard dice system in the browser: NdS and NdS+M, summed, without explosions or classes, and initiative entered by hand. | | `token-frames` | client (T3) | `tokenFrames` | Frames around the tokens: 25 decorations from vine and wood to lightning and web, most of them with a slow animation. | | `trails` | skin (T1) | `trails` | What the tokens a user moves leave behind: 10 trails from footsteps and stars to petals and ghosts. Data and CSS only, no code. | `?safe` (GM only) starts a table with the bundled plugins alone; `?safe=all` without any. `sea-pack`, the seafaring content of 15 catalogues in one plugin, is the reference for plugins that contribute to several registries.