DocsSetup & automation

Setup steps

A game’s setup steps are one ordered, reorderable list describing everything that happens before the first turn — the choices players make and the steps the table runs automatically. It is the authored source of truth: when you edit setup in the Studio you are editing setupSteps, and taybl derives today’s engine-facing fields (setupOptions, setup.automation, and the first phase’s selections) from it automatically. The sandbox keeps reading those derived fields, so nothing about play changes — setupSteps is purely the authoring layer on top.

Every step is exactly one of five types:

TypeOne-linerMaps to
variantA switch flipped for the whole tablea setup option + its gated automation
identityEach player claims one unique thinga per-seat component selection (+ grant)
poolThe table picks N of a set togethera shared selection
draftEach player culls a privately-dealt handa per-seat selection from a dealt pool
autoNo player input; runs silently at startone setup.automation entry

Variant

A variant is a toggle or one-of-N choice the whole table shares — beginner mode, difficulty, an edition, a board map. Set its kind (toggle or choice), its default, and (for a choice) the list of choices. Crucially, a variant carries the automation it turns on in runs[] — each entry keeps its own whenOption gate so the On/Off (or per-choice) flow survives a round-trip. One entry can name several of that variant’s values at once, so a shuffle wanted by four of five modes is one entry rather than four near-copies. Editing "Beginner mode → uses a fixed layout, skips a shuffle" happens in one place, instead of the old inverted model of authoring an automation step then gating it on an option by name.

A variant can also change what a zone is — a discard pile that rests face-up in one variation, hands that are open in another. That effect does not live in runs[]: the gate always lives on the thing being gated, so it is authored on the zone. + Change a zone, beside + Attach a placement and + Add a gated auto-step, attaches one without leaving the Setup tab. See zones that change with the variant.

Removing a choice removes what was gated to it. Delete a choice — or switch a variant from choices to a toggle, or delete the variant step outright (its trash button on the sequence rail, or Delete step in the inspector) — and the editor also drops every effect that only ran for the value you removed: gated entries in runs[], standalone auto steps, and gated setup placements. It tells you exactly what went. Those effects could never run again — no player can pick a choice that no longer exists — and leaving them behind would make the game refuse to save. If you meant to keep an effect, re-gate it to a surviving choice (or to Always) before you remove the old one.

An effect that ran for several values is treated more gently: it loses the one that disappeared and goes on running for the rest, and the card says so rather than reporting a removal. That holds wherever the gate sits — a placement, an auto step, or a zone that varies by the choice. Only when the last value it named disappears does the effect go with it.

A zone that varied by that choice is cleaned up the same way and at the same moment: the zone keeps every other setting it had and goes back to reading the way it does outside the variant. Only the reading that depended on the deleted choice is lost.

Identity, pool & draft (selection-shaped)

These three share the same selection shape — scope, targets, a from pool of ids, and a count of { min, max }:

  • identityscope: 'perSeat', targets: 'component'. Each player claims one unique thing (a color, a role, a faction). It can grant the picked piece (and its property-matched siblings) to that player — see grants.
  • poolscope: 'shared'. The table picks N from a larger set together (Dominion’s 10 of 25). Offer a "randomize for us" button with randomize. A component-targeted pool can also carry distributeTo: at game start the table deals countEach copies of each picked component type into its own slot, in pick order. Slots come in two shapes — give exactly one:
    • toZones: [ids] — a separate supply zone per pick, laid out side by side. Dominion’s 10 supply piles as 10 stack zones.
    • toZone + toCells: [ids] — one grid zone whose cells are the slots. Every copy of a pick stacks on its cell, so each cell shows a pile (top card plus a count badge). Use this when the supply is already drawn as a grid. Either way you need at least as many slots as the pool’s maximum pick count.
  • draftscope: 'perSeat' from a freshly dealt hand. Each player keeps a few (Ticket to Ride’s keep 2 of 3).

Two more player-affordance fields apply: assign (how a per-seat pick is resolved — free pick, random, deal, or draft) and exclusive (no two players may share the same pick). Because a selection phase hides every non-target zone, list any destination zone (the hand picks land in) in alsoShow to keep it on screen while picking.

Auto

An auto step is silent automation — players never act on it. It runs exactly one entry from the automation library, named in run, at game start, and surfaces to players only as a quiet "setting up…" line.

A new auto step points at the first automation it can run, so adding one does not create anything. Pick a different one from the Runs dropdown, or press beside it to make a fresh one — which takes you to the Automations tab with it open, since that is where what it does is written. The dropdown offers only the actions that mean something before the first turn — shuffle, deal, setProperty, scatter, placeWhere, and the board-shaping ones like move and sort. Play-time actions such as rollDice or Reset the board belong on a button instead.

The step shows what its automation does but cannot change it — use Edit in Automations for that. If a button or another step runs the same one, the step says so, which is your warning that a change there lands in more than one place.

A deal also says where its cards land, and the field depends on the destination. Into an open play area it takes a cell — the freepoint_X_Y point its batch lands on, typed as Across / Down in the step editor or set by dragging one of the dealt cards. Into a board it takes cells instead: the board cells the cards spread across, in deal order, added one row at a time under Where it lands. Leave that list empty for the usual case — one card per cell. See setup automation.

Fields

FieldApplies toWhat it does
typeallvariant | identity | pool | draft | auto
kindvarianttoggle (boolean) or choice (one of choices)
defaultvariantinitial value — a boolean for a toggle, a choice id for a choice
choicesvariantthe selectable values (required for a choice)
runsvariantthe gated automation this variant turns on
scopeselectionshared (the table picks together) or perSeat (each player picks)
targetsselectionzone outlines or component faces become clickable
fromselectionthe pool of ids to pick from
countselectionhow many to pick — { min, max }
grantselectionidentity assignment for component picks — see grants
assignselectionhow a per-seat pick is resolved — pick | random | deal | draft
exclusiveselectionno two players may share a pick
optionalselectionwhen true, players may skip — unfilled picks are auto-assigned randomly on game start
randomizepooloffer a "randomize for us" button
distributeTopooldeal each picked component type into its own slot — { toZones, countEach, faceUp? } for one zone per pick, or { toZone, toCells, countEach, faceUp? } for one cell per pick
alsoShowselectionextra zones kept visible during this step’s phase
dealdraftthe deal automation that produces this draft’s privately-dealt hand
runautothe single silent automation (shuffle / deal / setProperty / scatter)

Editing them in bulk

Sheet mode gives the authored steps two tabs: Setup for the choice-shaped ones (variant / identity / pool / draft) and Automation for the silent auto ones. The flat fields are columns there; the nested parts — grant, distributeTo, choices, runs — show a summary and stay editable only in Settings → Setup, where a step has room.

  • Sheet mode — the Setup and Automation tabs, one row per step
  • Setup automation — the silent shuffle/deal/setProperty/scatter ops an auto or variant step emits
  • Selections — the derived per-phase pick interaction an identity/pool/draft step expands to
  • Grants — assigning a picked component to a player
  • Zones that change with the variant — a variant that changes what a zone IS, not what is dealt into it
Sign in to ask Pip about building games.
Sign in