Free-form key-value fields attached to a page, with type, validation, and refs.
dataSchema#
Defines key-value pairs with a type (int, float, seconds, percent, boolean, string) that are bound to the page. It's the "wildcard addon" — when none of the specialized addons cover what you need, this one does.
Why it matters#
Game design has a lot of "I need to note X here" situations: weapon rarity, required level, animation name, magic balancing number. Without a data schema, those fields become loose strings inside a richDoc — no validation, no structured export. Here you get type + min/max + refs to other addons without having to create a brand-new addon type.
Where it usually lives#
- Blank pages when you want to add typed free-form fields.
- Typed pages when you need extra fields that the main addon doesn't cover.
Singleton — 1 schema per page, with N entries.
Schema#
| Campo | Tipo | Padrão | Descrição |
|---|---|---|---|
idYes | string | Internal ID. | |
nameYes | string | Friendly name (e.g. Metadata, Extra Stats). | |
entriesYes | DataSchemaEntry[] | List of fields. |
DataSchemaEntry#
| Campo | Tipo | Padrão | Descrição |
|---|---|---|---|
idYes | string | Internal ID. | |
keyYes | string | Technical key (snake_case). Goes into the exported JSON. | |
labelYes | string | Friendly name shown in the UI. | |
libraryRef | { libraryAddonId, entryId } | When filled, key and label come from the Field Library (central taxonomy). | |
valueTypeYes | "int" | "float" | "seconds" | "percent" | "boolean" | "string" | Value type — determines the input in the panel and how it's formatted. | |
valueYes | number | boolean | string | The current value. | |
min | number | Floor (numeric types). | |
max | number | Ceiling (numeric types). | |
unit | string | Visual suffix (kg, mph, etc.). | |
unitXpRef | string (sectionId) | When the value represents a level, points to the XP curve used as a visual reference. | |
economyLinkRef | string (sectionId) | When the value is pulled from an economyLink — which section. | |
economyLinkField | EconomyLinkFieldKey | When economyLinkRef is set — which field from that addon (buyValue, sellValue, etc.). | |
productionRef | string (addonId) | When the value is pulled from a production addon — which addon (on the same page). | |
productionField | ProductionFieldKey | When productionRef is set — which field from that production. | |
usePageDataId | boolean | When true, the value is the dataId of the page where the schema lives. | |
notes | string | Free-form notes. |
Example#
Schema with 3 fields: rarity (string), required level (int), discovery date (string):
{
"id": "schema-meta",
"name": "Metadata",
"entries": [
{
"id": "f1",
"key": "rarity",
"label": "Rarity",
"valueType": "string",
"value": "epic"
},
{
"id": "f2",
"key": "required_level",
"label": "Required Level",
"valueType": "int",
"value": 25,
"min": 1,
"max": 100,
"unit": "lv"
},
{
"id": "f3",
"key": "discovered_in",
"label": "Discovered In",
"valueType": "string",
"value": "Patch 1.4"
}
]
}
Computed refs#
The economyLinkRef/economyLinkField and productionRef/productionField fields enable derived values: the panel shows the current value from the other addon instead of you typing it manually. Handy for reflecting the "buy price" from an economyLink in the schema without duplicating the number.
When the source addon changes, the value follows — if the economyLink changes from 100 to 120, the schema reflects that automatically.
Wizard#
No wizard of its own. You add this addon manually when you need it.