Categories Schema
This page describes Mythic GME 1.7.0 and later.
Overview
Categories define display names, icons, and sort order for groups of Custom Tables. The app ships with built-in categories that you can edit, and you can add your own categories alongside them in categories.json. For managing categories inside the app, see Organizing Custom Tables.
Root structure
{
"defaultCategories": [
{ "id": "core-tables", "displayName": "Core Tables", "iconKey": "dice", "sortOrder": 0, "isBuiltIn": true }
],
"categories": [
{ "id": "my-category", "displayName": "My Category", "iconKey": "dice", "sortOrder": 900, "isBuiltIn": false }
]
}
defaultCategories(array, required). Built-in categories shipped with the app. When you edit a built-in category in the app, itsidis recorded in an optionaleditedBuiltInCategoryIdsarray.categories(array, required). User-created categories. Add, rename, or remove your custom categories here.
Both arrays are required, and either array may be empty.
TableCategoryInfo fields
id(string, required). Kebab-case identifier.displayName(string, required). Category label shown in the app.iconKey(string, required). Icon name. Bundled categories use keys such asdice,user,map,book, andquestion. An unrecognized key displays a question-mark icon.sortOrder(int, required). Lower numbers appear first. Categories created in the app receive900, and sort order can be changed only by editingcategories.json.isBuiltIn(bool, required). Indicates whether the category belongs indefaultCategories(true) orcategories(false).- Optional fields include
description(string),displayNameTranslations(object mapping language code to string),descriptionTranslations(object mapping language code to string),tags(array of strings), andsource(string).
Every entry must include id, displayName, iconKey, sortOrder, and isBuiltIn with the right JSON types. If any required field is missing or has the wrong type, the app loads no categories from the file and attempts to save a timestamped copy named invalidated-categories.
Lifecycle in the app
- With Expanded Features unlocked, the app can copy a baseline
categories.jsonintomeaning_tables/categories.jsoninside your current storage location (the app folder, a custom folder, or iCloud). The app keeps an existing file instead of overwriting it. - Edit Category works on built-in categories as well as your own. Built-in categories cannot be deleted, though you can hide an unedited built-in category or delete your edited version to restore the original. Some built-in categories, such as Custom and Event Focus, cannot be hidden.
- Reset Categories to Defaults in Table Settings restores every built-in category to its shipped state and removes edits to built-in categories. Categories with
isBuiltInset tofalseare kept, and hidden categories remain hidden. - Set
isBuiltIntofalseon your own categories. On save, the app places each entry in the array matching itsisBuiltInflag. Whether a category behaves as built-in in the app (offering Hide this category and Delete my edited version) depends on itsidmatching a shipped category. - The template and sample files in Downloads hold only a few entries and an empty
defaultCategoriesarray. Copy their entries into your existingcategories.jsonrather than replacing the whole file, or built-in categories will go missing until you run Reset Categories to Defaults.
Downloads
The Downloads section at the bottom of this page includes categories.schema.json, categories_template.json, and categories_sample.json.
Related
- Getting Started with Custom Tables and Organizing Custom Tables for creating and managing categories in the app.
- Custom Table Schema for the Meaning Table and Event Focus table JSON format.