BoardGameBuilder Docs
Elements

Root Element

The top-level element that configures the data source, card size, output settings, and shared resources for a template.

Root Element

The Root element is the top-level element in every template. It defines the physical card size, connects the template to a data source (Google Sheet or CSV file), and hosts shared resources like constants, components, and drive folders. Every template has exactly one Root element, and all other elements are its descendants.

Properties

PropertyTypeDefaultDescription
SizeMMarrayCard size in mm as [width, height]
SheetFilestringGoogle Sheet ID or CSV URL for the data source
SheetIdnumber0Sheet tab index within the spreadsheet
Outputstringimage{{RowIndex}}Custom filename for generated images
OutputDPInumber300The DPI of the generated images
GroupstringSubfolder for generated images
Copiesnumber1Number of copies for the PDF layouter
DriveFoldersarrayGoogle Drive folder IDs for image assets
MergeRowsstringColumn name to merge rows by
MergeRowsMaxnumberMaximum rows per merge group
FilterarrayFilter conditions as key-value pairs
CsvFilestringGoogle Drive CSV file ID (alternative to SheetFile)
CsvSeparatorstring,Separator character for CSV parsing
ComponentsobjectReusable component definitions
Constantsobject/stringConstants for property binding

SizeMM

SizeMM defines the physical dimensions of each card in millimetres as a two-element array [width, height].

"SizeMM": [63, 88]

Standard card sizes:

  • [63, 88] — standard poker/playing card size
  • [44, 67] — mini card size
  • [70, 120] — tarot card size

The SizeMM value is used both for rendering the card image and for laying out cards in PDF output.

SheetFile

SheetFile is the primary data source for the template. Set it to a Google Sheet ID — the long alphanumeric identifier from the sheet URL. Data is fetched live from Google Sheets at render time using the signed-in user's Drive access.

"SheetFile": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms"

The column headers from row 1 of the sheet become available as {{ColumnName}} data references in all child elements.

SheetId

SheetId selects which sheet tab (worksheet) within the spreadsheet to use. Tabs are numbered from 0 (the first tab). If your spreadsheet has multiple tabs, set SheetId to the 0-based index of the tab you want to use as the data source.

"SheetId": 0

Output

Output sets a custom filename pattern for each generated image. It supports data binding with {{ColumnName}} syntax, allowing each card to produce a uniquely named file. When not set, images are named by their row index.

"Output": "{{CardName}}"
"Output": "{{Set}}-{{CardNumber}}"

OutputDPI

OutputDPI sets the DPI (dots per inch) of the rendered card images.

Group

Group specifies a subfolder name to place generated images into. It supports data binding, allowing images to be organized into subfolders based on data values — for example, grouping by act or set.

"Group": "Act {{PrintAct}}"
"Group": "{{Set}}"

Copies

Copies defines how many copies of each card should be produced for the PDF layouter. When set to a value greater than 1, the suffix -x{n} is appended to every output filename (e.g., CardName-x3.png). The PDF layouter uses this naming convention to include the correct number of copies per card. The default is 1, which produces no suffix.

"Copies": 3

If the Copies value changes, the renderer automatically removes the old output files (with the previous suffix or no suffix) and replaces them with the newly named files.

DriveFolders

DriveFolders is an array of Google Drive folder IDs that contain image assets used by the template. Image elements reference files by name, and the renderer looks up the files in these folders. Multiple folders can be specified to organize assets into separate collections.

MergeRows

MergeRows specifies the name of a column used to merge multiple spreadsheet rows into a single card. All rows with the same value in this column are combined into one card, with the merged data available as a list. This is useful for cards that aggregate data from multiple rows — for example, a character card that lists all abilities from separate rows.

"MergeRows": "CharacterName"

MergeRowsMax

MergeRowsMax sets the maximum number of rows that can be merged into a single group when using MergeRows. If a character has more rows than this limit, extra rows are split into additional cards. This prevents cards from becoming too crowded when a merge group has an unusually large number of entries.

Filter

Filter defines filter conditions as key-value pairs to limit which rows from the spreadsheet are rendered. Each entry specifies a column name and a target value — only rows where the column matches the value are included. Use this to render a subset of cards, such as only cards from a specific set or type.

CsvFile

CsvFile specifies the Google Drive file ID of a CSV file to use as the data source, as an alternative to SheetFile/SheetId. The CSV file is downloaded and parsed at render time. The first row must contain column headers.

"CsvFile": "1a2b3c4d5e6f7g8h9i0j"

CsvSeparator

CsvSeparator sets the separator character used to parse the CSV file specified by CsvFile. The default is a comma (,). Change this if your CSV uses a different delimiter such as a semicolon or tab.

"CsvSeparator": ";"

Components

Components defines reusable component templates that can be referenced by name in child elements. Each component can be either a named Google Drive file ID (pointing to a template JSON file) or an inline template definition. Components allow you to define a layout once and reuse it across multiple elements, reducing duplication and making templates easier to maintain.

Constants

Constants defines shared values that can be referenced by any element in the template using [[ConstantName]] syntax. Constants can be specified as either a Google Drive file ID (a string pointing to a JSON file with key-value pairs) or an inline object with key-value pairs. Use constants for theme colors, shared font sizes, and any value that should be consistent across the template and easily changed in one place.

On this page