Skip to content

Registries

A plugin declares the short names it registers in its manifest's contributes, per registry, and registers them with ctx.registry.<name>.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 <plugin>:<name>. 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" \| <group>, ...}: 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: <file>, 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 only
diceSystems no - {label?, parse(expression), evaluate(plan, context, random) → RollResult, initiative?(record)} (Systems and dice)
groups no - {label, order}: picker groups, ids <catalogue>-<group> (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.<name> in the manifest (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-<event> 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.