# Workflow: Building a Deck

> The numbered click-path for creating a deck asset, uploading card images, generating its sheet, and placing it on the table.

- Source: https://diceytable.com/docs/editor/workflows/build-a-deck
- Last verified: 2026-07-27

## Steps

1. In the asset explorer, create a new deck asset (the **New ▾ ▸ Deck** action in the Decks
   folder) and give it a name.
2. Double-click it to open the [Deck editor](https://diceytable.com/docs/editor/item-editors/deck) tab.
3. Pick a **per-card resolution** preset (Poker, Bridge, Square) — or type an exact size — before
   uploading your first card. This is not retroactive: cards already uploaded keep the pixels
   they were uploaded at.
4. Drag card images onto the grid to add them. Each upload is resized to the current resolution,
   WebP-encoded, and persisted immediately — you don't lose an uploaded card by closing the tab
   without saving.
5. If a card appears more than once in the deck, set its **Copies** box rather than uploading the
   image again — copies share one sheet cell, so they cost nothing extra.
6. Optionally declare a **Card data model** in the sidebar (cost, rarity, suit — whatever your
   game needs), then fill in the per-card values on the card tiles. Anything you leave alone
   inherits the model's default. **Deck data** does the same for the deck as a whole.
7. Set **Back image** (defaults to a bundled generic back) and **Back is hidden** if you want
   hand-hidden cards to show the deck's back rather than the sheet's last card.
8. If your deck's cards are landscape, turn on **Sideways**.
9. Click **Generate & Save**. This composes every card image into as many face sheets as the
   deck needs and writes the `.deck.json` document — nothing is playable until you've run this
   at least once. The footer reports each sheet's grid, the deck's size in play, and (once
   there is more than one sheet) the video memory they add up to.
10. Drag the finished `.deck.json` from the explorer onto the viewport to place it on the table.

## Definition of done

The deck appears in the Hierarchy as a `deck`-kind Entity with `stackCount` equal to your card
count **including copies**, and drawing from it on the table (with [Play
Scripts](https://diceytable.com/docs/editor/working/scripts) or on the live table) shows real card faces, not
placeholders.

## If it fails

- **Generate & Save refuses to run.** Either your card images and resolution need more than
  eight 4096px sheets, or your copy counts add up past the 1000-card deck ceiling — the footer
  says which. For the first, lower the per-card resolution: halving it quadruples the cards
  per sheet. A deck that merely needs a second or third sheet generates normally; watch the
  memory figure in the footer rather than the sheet count.
- **A card data field is flagged in red and doesn't save.** Its key isn't a valid identifier, or
  another field already uses it. The rest of the deck still saves; fix the key and save again.
- **Placing the deck says "This deck has no valid definition yet."** You haven't run
  Generate & Save at all yet — do that first.
- **You edited the deck after placing a copy and the table copy didn't change.** Expected — see
  [Working with decks](https://diceytable.com/docs/editor/working/decks#the-bake-is-a-snapshot-not-a-link). Delete the
  placed copy and re-place it.

## See also

- [Item editors: Deck](https://diceytable.com/docs/editor/item-editors/deck) — the full panel reference, including the
  row-major/V-flip sheet convention
- [Working with decks](https://diceytable.com/docs/editor/working/decks)
- [Mod scripting API](https://diceytable.com/docs/scripting-api/api) — `TableContainerContentEntry.cardId`, how a mod identifies the cards you just built.
