Skip to main content
Version: Next (dev)

The table window

Opening a Data Table asset opens the table window: a header bar, five tabs and a status bar. The grid only creates editors for the cells you edit, so tables with many thousands of rows stay responsive.

The Rows tab of the table window with a row selected and the inspector on the right

The Rows tab: the grid on the left, the inspector with the selected row and column statistics on the right, the status bar at the bottom.

Header bar​

ElementDescription
DotGreen when the document is saved, amber when it has unsaved changes.
File name and folderThe table asset being edited.
schemaThe schema the table uses.
setThe Data Table Set that lists this table as a layer, or no set.
layerOnly shown when the table belongs to a set. Lists the set's layers, and picking another layer opens that layer's table. See Table sets.

Status bar​

FieldDescription
rowsRows in the table.
shownRows that pass the current filter.
selectedRows with at least one selected cell.
IssuesError and warning counts, or no issues. Details are on the Validation tab.
transformup to date, needs transform or error: the state of the table's runtime file.
runtime sizeThe size of the transformed file, or an estimate before the first transform.

Rows tab​

Toolbar​

ControlDescription
Filter boxSpace-separated terms, all of which must match. A plain word matches any cell that contains it, ignoring case. Column>40 compares a column: the operators are =, ==, !=, <, <=, >, >=. Example: rifle Damage>30.
Value filterA drop-down for the schema's first Enumeration column (all … or one value). Hidden when the schema has none.
+ RowAppends a row with every cell at its default.
DuplicateCopies the selected rows. A copy gets the original key with _Copy appended (_Copy2, … when that is taken).
Bulk editA menu built from the current selection: multiply the selected numeric column (Damage x 1.10), add a number to it, set a column to one value, Fill down from first selected, Copy selection as TSV.
DeleteRemoves the selected rows.

Every operation that changes more than one cell is a single undo step.

The grid​

  • The Key column stays pinned on the left while the rest scrolls. Click a header to sort, and sorting never moves the key column.
  • A column marked * is Required. Hover a header to see the column's type, range and description.
  • Double-click a cell, or start typing, to edit it. Each type gets its own editor: a checkbox for Bool, spin boxes limited to the column's range, a drop-down for Enumeration and Flags, a colour picker, an asset browser button, and the row picker for Row columns.
  • Derived columns are read-only and show the value the transform will compute.
  • A cell with a problem is tinted red (error) or amber (warning), and hover over it for the reason.
  • In a table that is a layer of a set, a cell the row does not author shows the value inherited from the layers below in dim italics. Authored cells are tinted as overrides.

Clipboard​

  1. Select a range and press Ctrl+C to copy it as tab-separated text. Spreadsheet applications paste it as cells.
  2. Copy a range in a spreadsheet, click the top-left cell in the grid and press Ctrl+V. Each value is parsed with the column's text form.
  3. Rows past the end of the table are added. Cells that do not parse are reported and left unchanged, and the rest of the paste is applied.
  4. The whole paste is one undo step.
note

Tip

For bigger or repeated imports, use the Import tab: it shows a preview of every change before anything is written.

Inspector​

The panel to the right of the grid edits the selected row as a form.

  • One editor per column, using the same editors as the grid. Curve, Array and Struct cells get a JSON editor that checks the text as you type.
  • A cell at its column default is shown dimmed. An authored cell has an x button that resets it to the default.
  • Derived columns are marked fx and are read-only. Hover to see the expression.
  • With several rows selected, the title reads n rows selected and an edit applies to all of them as one undo step.
  • Row section: the key, the Removed flag (for set layers) and Old Keys, the keys the row had before a rename.
  • Table section: the table's own properties, including Schema, Table Name (the name used inside table sets, where empty means the file name) and the linked source settings.
  • Column statistics for the grid's current column: count, distinct values and empty cells. Numeric columns also show minimum, maximum, mean, median and a histogram, and other columns show the most common values.

Schema tab​

The columns of the table's schema, edited in place: the list on the left, the selected column's properties on the right. The toolbar shows how many tables and store tables use the schema. + Column adds a column, Move up / Move down reorder, Remove deletes (with a confirmation when rows hold values for the column), Generated code previews the C++ header. When the table has no schema yet, the tab offers Create schema…. See Schemas & column types for every property.

Import tab​

Import from CSV, TSV, JSON or pasted spreadsheet text with a preview, export the table, and link it to a source file. See Import, linked sources & sets.

Validation tab​

Every problem in the table, with severity, row, column and message. Double-click an entry to jump to the cell on the Rows tab. Clamp out-of-range values moves every numeric value that is outside its column's range to the nearest limit, as one undo step.

Errors stop the transform: the game keeps the last good version of the table until they are fixed. Warnings are listed but do not stop it.

RuleSeverityChecked
Row without a key, key with whitespace or ; , ", duplicate key, two keys with the same hasherrorgrid, transform
Required cell emptyerrorgrid, transform
Row reference to a key that does not exist in the target tableerrorgrid, transform
Row column whose target table uses a different schema than the column expectserrortransform
Asset reference that does not resolve, or to an asset of the wrong typeerrortransform
Duplicate value in a Unique columnerrortransform
Array with more elements than Max counterrortransform
Derived expression that does not compile, or produces a value that is not a numbererrorSchema tab, transform
Value outside the column's rangewarning, or error when the column is Strictgrid, transform
Text longer than Max length, text not matching Patternwarning, or error when the column is Strictgrid (length), transform
Reference cycle in an Acyclic columnwarningtransform
Custom rules from game code (plDataTableValidator, see C++ runtime)eithertransform

Project > Data Tables… > General > Strict validation turns every range, length and pattern warning in the project into an error.

Usages tab​

Shows what refers to a row, and renames a row's key without breaking those references.

  1. Pick the row in the Row drop-down, or select it on the Rows tab: the Usages tab follows the grid's current row.
  2. Press Find usages. The list shows every scene and prefab object whose row-reference property points at the row, every table whose Row column points at it, every table set layer that overrides the key, and data store tables seeded from this table. Double-click an entry to open the asset.
  3. To rename, type the new key in New key. The field checks that the key is valid and unused.
  4. Press Rename and fix references. The key changes in this table, the old key is added to the row's Old Keys, and every reference found is rewritten.
warning

Important

Undo reverts the rename in this table only. Other assets are rewritten and saved right away. Assets you have open are changed but left for you to save. Old Keys keep the old key resolving at runtime, so save games and references that were missed still find the row.

Hot reload​

While the editor's engine process runs, for example during Play, every change in the table window is sent to it within about half a second, before the table is saved. Game code reading the table sees the new values on its next lookup. See Hot reload and held views for what that means for code that keeps row views.

Row references in the property grid​

A component property of type plDataRowRef is edited with the row picker. The field shows Table / row_key, and clicking it opens a drop-down with a table selector, a search box and the rows with their Picker column values. Type to filter, use the arrow keys and Enter to pick, or click a row. The arrow button next to the field opens the referenced table with the row selected. A reference whose table or key is missing is drawn in red. Hover over it to see which part is broken.

Keyboard reference​

KeyAction
Ctrl+C / Ctrl+VCopy the selection as TSV / paste TSV at the current cell.
F2, double-click, or typingEdit the current cell.
Ctrl+Z / Ctrl+YUndo / redo. Multi-cell operations undo as one step.
Ctrl+SSave and transform the table.