DocsComponents

Dice

A die (kind: die) is a randomiser — a cube of pips, a custom symbol die, a coin modelled as a two-faced die. Its faces are an ordered list of at least two DieFace entries; rolling picks one at random.

taybl rolls the die and shows the chosen face, but it never reads the result — there is no "add the dice", no re-roll rule, no hit table. Players interpret the value themselves, just as at a real table. A die’s value can be a number (a d6) or a string (a symbol die), and a face can carry its own art so the rolled face draws correctly.

Rolling at the table

Players roll by picking a die up and putting it back down where it was: a press released over the same zone rolls; released over a different zone it simply moves there. A click is that same gesture with no travel — so a click rolls, and what it rolls depends on the zone.

Put the dice in a zone of their own and the whole tray rolls at once — clicking any die, or the felt between them, rolls every die in the zone. In a zone mixed with cards or pieces only the die you clicked rolls, so the rest of the zone keeps ordinary drag-and-drop. R over a die, and the right-click Roll / Roll all / Roll N entries, all still work.

Clicking a single die in a dice-only tray does not roll only that die — it rolls the whole tray. Splitting the tray into one zone per die is not needed to roll one at a time: use right-click Roll on the die, the R hotkey over it, or Roll on its row in the zone inspector. Roll all and Roll N on the zone are there too.

A libraryType: spinner die is the exception: it presents as a click-to-spin wheel that owns its own click, so a zone containing one is never treated as a dice tray. Give spinners their own zone, apart from the dice you want to roll together. See Handling pieces & cards.

Setting a die by hand

Plenty of games let a player change a die instead of re-rolling it — spend a token to turn a die to any face, bump one up a pip, flip it over. Every die can be set by hand, so you never have to re-roll until the number you are entitled to comes up.

Right-click a die for three ways to move it off its current face:

EntryWhat it does
Flip to opposite faceTurns the die over, the way a physical die gives you 7 − n. On a d6: 6 ↔ 1, 5 ↔ 2, 4 ↔ 3.
Value +1 / Value −1Steps one face up or down the die’s face list.
Set to NPuts the die straight on that face. A die with more than eight faces shows Set value… instead, which opens a grid of every face.

The F hotkey flips the die under your cursor, and = / step it up and down. Stepping stops at the die’s own ends — a d6 will not go above 6 or below 1, and it never wraps around.

Double-clicking a die flips it too. Mind the first click, though: it still rolls, so a double-click rolls the die and then turns it onto the opposite face. When you only want to roll, click once.

A die with lettered or pictorial faces works the same way. Because taybl walks the face list rather than doing arithmetic, +1 moves to the next face you authored and "opposite" is the face on the other end of the list.

A die that has not been rolled yet is on no face at all, so the first of these verbs simply settles it on its first face.

Setting a die is a normal table action: it appears in the activity log with your name and the face you chose, exactly like a roll, so the rest of the table can see what happened. It does not animate — only a real roll tumbles. A spinner is the exception again: it has no reverse, so it offers the value entries but no Flip.

How to edit in the Studio

Open your game → Layout tab and select the die. The component inspector shows a Die faces section listing every face: edit each face’s value in its text box, give it an image with the face slot beside it — upload one, or press Choose to pick from the images the game already holds — and use + Add face / the ✕ button to add or remove faces (a die must keep at least two).

Colour

A die does not need uploaded art to be coloured. Its face colour is the shared backgroundColor field: on other kinds that is a fill painted behind transparent art, but a die has no art to sit behind, so the fill is the die itself. Select the die in the Layout tab and use Appearance → Die colour in the component inspector. Pips and numbers switch to light ink automatically on a dark die, so a black die stays readable.

You can also just ask Pip — "make the dice red" is a change it can apply for you.

Dice added from the component library arrive with a colour already chosen from a small swatch (ivory, red, blue, black); that swatch stays editable in the inspector afterwards, and so does the free colour picker. Colour and face art are independent: a face with its own binding image draws that image, and the colour shows on the faces that have none.

Die fields

FieldValuesDefaultWhat it does
kinddieMarks this component as a die
facesarray of DieFace (≥ 2)Required. The faces the roll chooses between
backgroundColor#rrggbb.optional()The die’s face colour — see Colour above. Absent → white

A die shares the rest of its fields with every kind — see components overview.

DieFace

FieldValuesDefaultWhat it does
valuenumber or stringThe face’s value — 6 for a pip die, "sword" for a symbol die
bindingFaceBinding.optional()Art drawn when this face lands; absent → the renderer shows the bare value. Like any face binding it takes a rotation, for a symbol that came in turned

A face needs only a value — art is optional. A plain d6 is just six faces with values 16 and no bindings.

Sign in to ask Pip about building games.
Sign in