Trait Categories

traitCategories

Categories group traits together and control how many the player can pick from each group. Each category must be defined before traits can be assigned to it.

In the editor

"Trait categories"

Editor location
Files → Mechanics → Trait Categories
Editor type
Edit in Studio + View JSON
Size limits
  • traitCategories (entire section)100,000
  • Trait category maxSelections40 selections

Schema

json
{
  "traitCategories": {
    "<key>": {
      "name": "string",
      "maxSelections": "number",
      "traits": [
        "string"
      ],
      "description": "string",
      "subcategories": [
        {
          "name": "string",
          "traits": [
            "string"
          ],
          "description": "string"
        }
      ]
    }
  }
}

Example

json
{
  "traitCategories": {
    "Race": {
      "name": "Race",
      "maxSelections": 1,
      "traits": [
        "Human",
        "Elf",
        "Dwarf",
        "Halfling"
      ]
    },
    "Class": {
      "name": "Class",
      "maxSelections": 1,
      "traits": [
        "Soldier",
        "Scholar",
        "Scout",
        "Healer",
        "Merchant"
      ]
    },
    "Background": {
      "name": "Background",
      "maxSelections": 1,
      "traits": [
        "Noble Household",
        "Working Family",
        "Frontier Town",
        "Coastal Port"
      ]
    },
    "Perks": {
      "name": "Perks",
      "description": "Optional -- choose any that fit your character concept.",
      "maxSelections": 2,
      "traits": [
        "Iron Stomach",
        "Light Sleeper",
        "Sharp-Eyed",
        "Quick Learner",
        "Bookish",
        "Patient",
        "Cool Head",
        "Lucky"
      ],
      "subcategories": [
        {
          "name": "Physical",
          "description": "Traits rooted in the body and the senses.",
          "traits": [
            "Iron Stomach",
            "Light Sleeper",
            "Sharp-Eyed"
          ]
        },
        {
          "name": "Mental",
          "traits": [
            "Quick Learner",
            "Bookish",
            "Patient",
            "Cool Head"
          ]
        },
        {
          "name": "Fortune",
          "traits": [
            "Lucky"
          ]
        }
      ]
    }
  }
}

Fields

name

Display name of the trait category, and must be byte-identical to the outer map key — the engine matches entries by key, so the key and name have to be exactly equal (same case, same spaces). A mismatch is a validation error. Build the map as { category["name"]: category }.

description

description -- creator-authored text shown to players during character creation. It can convey whether choosing from the category is optional and how its choices should be interpreted.

maxSelections

how many traits from this category the player can choose. Set to 1 for mutually exclusive categories or to the desired multi-select cap. 0 is empirically broken in the live UI -- the category renders 'Selected 0/0' and no traits can be picked. For "pick everything that applies" categories, set maxSelections equal to the number of traits in the category. Typical values: 1 (single-pick), 3-N (multi-select).

traits

required Array<string>. Lists all trait names in this category. Validator errors if absent.

Note: The validator checks name, maxSelections, and traits on traitCategory entries.

See Authoring Guide > Traits for the pattern on hiding trigger-only system traits from the character creator.

subcategories

Splits the category's traits into collapsible sections during selection. Each entry sets a name, an optional description shown with the heading, and a traits list naming which traits belong to it. Subcategories render first, each claiming its own traits, and whatever the category's traits list still holds afterwards follows under a heading of Other. A trait named in a subcategory and again at the root is only drawn once, so repeating it changes nothing; a subcategory whose traits are all claimed elsewhere is skipped entirely, and one with a blank name also falls back to Other.