Skip to content

Edit tables of game data

Most game data is a list of records, such as a row per unit, item or level, each with the same columns. The admin website edits such a list as a table: one row per record and a typed cell per column, with search, column choice, and adding and deleting rows. This page shows how to shape a namespace so it gets one.

You need the admin role to change a namespace's schema, and live_ops to edit its data.

Step 1: Put the list under a property

A namespace's document is always a JSON object, so the list lives under a property of it. rows is the usual name:

{
  "rows": [
    { "id": 1, "name": "Warden", "role": "tank", "hp": 1800 },
    { "id": 2, "name": "Lancer", "role": "striker", "hp": 900 }
  ]
}

Step 2: Describe a row in the schema

In the namespace's Schema page, make rows an array whose items is an object with properties. Each property becomes a column, and its type decides the cell:

{
  "type": "object",
  "properties": {
    "rows": {
      "type": "array",
      "x-otomo-key": "id",
      "items": {
        "type": "object",
        "required": ["id", "name"],
        "properties": {
          "id": { "type": "integer", "title": "ID", "readOnly": true },
          "name": { "type": "string", "title": "Name" },
          "role": {
            "type": "string",
            "title": "Role",
            "enum": ["tank", "striker", "support"],
            "enumNames": ["Tank", "Striker", "Support"]
          },
          "hp": { "type": "integer", "title": "HP", "minimum": 1, "description": "Hit points at level 1." },
          "flying": { "type": "boolean", "title": "Flying", "default": false }
        }
      }
    }
  }
}
You write You get
"type": "string", "integer", "number", "boolean" A text, number or checkbox cell
"format": "date" on a string A date picker
"enum" (with "enumNames" for labels) A drop-down
"title" The column heading
"description" Help shown when you point at the heading
"default" The value a new row starts with
"readOnly": true A cell you can see but not change
"x-otomo-key": "id" on the array Which column identifies a row. New rows get the next free number
An array or object as a column A cell that opens the full editor beside the table

x-otomo-* keywords are read by the admin website only. Config's validation ignores them, so they never change whether a document is valid.

When you get raw JSON instead

A list whose rows aren't described this way, for example rows with no properties or rows defined with oneOf, is still edited as raw JSON. Otomo never guesses a shape it could get wrong.

Step 3 (optional): Choose how the table looks

The reserved namespace ui.presentation holds layout choices for your other namespaces. Add a tables entry under your namespace's name, keyed by the path of the list:

{
  "balance.units": {
    "title": "Units",
    "tables": {
      "/rows": {
        "label": "name",
        "columns": ["id", "name", "role", "hp"],
        "frozen": ["id", "name"],
        "search": ["id", "name"],
        "rows": { "add": true, "delete": false },
        "newRow": { "role": "support" }
      }
    }
  }
}
Setting Effect
label The column that names a row, for example in the list of problems
columns The columns shown, in order. Every other column is still in the Columns menu
frozen Columns that stay in view when you scroll sideways
search The columns the search box looks in (otherwise, every typed column)
rows Whether staff can add or delete rows, within the schema's minItems and maxItems
newRow Values a new row starts with, after each column's default

A column named here that the schema doesn't have is ignored, so a layout can never break the editor.

Working in the table

  • Edit a cell by clicking into it. Changes go into the draft straight away and are marked in yellow until you save.
  • Move with ↑ and ↓ (or Enter) between rows, and Tab across columns. Esc puts back the value the cell had when you entered it.
  • Problems are listed above the table, row by row. Click one to jump to its cell.
  • Delete asks you to confirm in the row itself.

Working with someone else

Several staff members can edit one namespace at the same time. A save sends only the values that changed, so two people tuning different cells of one table — or different rows — both save without being asked anything, and each sees the other's change after saving.

A dialog appears only when you both changed the same element: the same cell, or the same list when one of you added or deleted rows. It shows what you loaded, what they saved and who saved it, and lets you keep either or type a result.

A schema edit works the same way: two admins changing different keywords both land, as consecutive schema versions, and only a keyword you both changed asks you to choose.

Saving, versions and releases work as for any other namespace: see Publish your first content update.

A list someone already shaped

Announcements are a worked example of all of this, schema and table layout included, ready to paste: see Namespace presets.