DocsZones

Zones

A zone is a meaningful region of the table that holds components — a draw pile, a hand, a discard, a board, a play area. A zone answers what does this part of the table mean, and how do the things in it behave? It does not answer where is it? — a zone carries no position. Where every zone physically sits is decided in the layout, which gives each zone a box (and, for per-seat zones, one box per player).

Like everything in taybl, a zone is part of a scene, not a rules engine. A zone describes meaning and physical behaviour; it does not enforce turns or legality. The one exception is visibility — when a zone hides its contents, that hiding is enforced server-side (see visibility). Everything else is advisory, and players resolve the rules themselves.

How to edit in the Studio

Open your game → Layout tab. Select a zone on the table; the Zone inspector opens on the right. Geometry (position, size, rotation) lives in the pinned Position & size card; everything about the zone lives in the Properties card (role, who uses it, arrangement, visibility, capacity, face-on-enter, accepts), with surface art under Surface & notes and the hidden / revealOnDrag toggles under Behavior & danger. The Click menu card curates the actions players get when they click the zone or a piece in it (see below).

That Behavior & danger card also holds Lock this zone (locked) — a designer-only switch that stops the editor from grabbing the zone when you click its surface, so you can drag smaller zones on top of a big background board without the board tagging along. It is a placement property (it has no effect at runtime); see layout for the full story.

The fields

FieldWhat it doesNotes
roleThe zone’s semantic purposedraw, hand, discard, play, capture, supply, score, grid, generic — see zone roles
scopeOne at the table vs. one per playershared or perSeat — see zone scope
arrangementHow contents lay out physicallystack, fan, grid, scatter, slot — see zone arrangement
viewWho can see the contentspublic, owner, othersOnly — engine-enforced, see zone visibility
faceOnEnterFacing a component takes when it entersup, down, owner, othersOnly, keep — see zone visibility .optional()
acceptsWhich component kinds may be dropped hereArray of piece, card, die, token, any; omit to accept anything .optional()
capacityMaximum components the zone is meant to holdA positive integer; omit for unlimited. Advisory only — not engine-enforced .optional()
surfaceAssetArt rendered as the zone’s own surfaceA board image or play mat .optional()
stackDisplayHow a stack zone presents itselftopCard (default) or surface; only on stacks .optional()
gridThe grid spec for a grid arrangementRequired when arrangement is grid — see grids .optional()
hiddenSkip this zone at runtime entirelyNot instantiated, not rendered; setup targeting it is dropped .optional()
revealOnDragStay quiet until a drag beginsA render hint — the zone is still droppable; surfaces as a drop target mid-drag .optional()
actionMenuCurate the zone’s click menusWhich actions show, their order, and primary vs. overflow — see the click menu .optional()
descriptionDesigner notesNever shown to players at runtime .optional()

Most fields are advisory hints for players and the renderer. accepts is a drag-drop filter (leave it off to accept anything), capacity is purely advisory — nothing stops a player dropping an extra component into a “full” zone — and role only drives the right-click menu. The behaviour that taybl genuinely enforces is view — hidden contents are redacted from other players’ state before they ever reach the wire.

The click menu

Clicking a zone — or a piece sitting in it — opens a menu of actions: flip, move, give, capture, roll, remove for a piece/card; shuffle, draw, shuffle-into, collect-all for the zone itself. By default taybl generates this menu from the zone’s role and the component’s kind. The actionMenu field lets you curate it per zone from the Click menu card in the Zone inspector: show or hide each action, drag its order, and mark it Up front (shown inline) or More (tucked behind the ⋯ overflow). Leave it untouched and the default menu stands; custom procedures stay available whatever you choose. The same curation drives both the left-click panel and the right-click menu.

Surface art

A zone can paint its own image with surfaceAsset — point it at an uploaded asset and that art renders as the zone’s background: a board, a play mat, a scoring track. Set it under Surface & notes in the Zone inspector. For a grid zone, line the artwork up with the cells using the grid fit overlay (see grids); for a stack zone, set stackDisplay to surface so the pile shows this art instead of its top card. The whole table can carry its own art too — that is the table’s surfaceAsset, set in layout.

Sign in to ask Pip about building games.
Sign in