World dimensions
Generated by
pnpm schemas:generatefrom the Zod schemas inpackages/shared/src/schemas/. Do not edit by hand; change the schema's.describe()text instead.
A file of dimension definitions keyed by dimension ID, usually data/dimensions.yaml.
JSON Schema: world-dimensions.schema.json.
In the path headings below, [] is a list item and .* is a map value.
*
| Field | Type | Required | Description |
|---|---|---|---|
name | text | yes | Display name of the dimension. |
description | text | no | What the dimension tracks. |
schema | object | yes | Value schema in the supported JSON Schema subset. Unsupported keywords are rejected. |
initialValue | any | yes | Starting value. It must satisfy schema. |
updateRule | text | no | Natural-language rule for how the value changes in play. When non-empty, the dimension tracker settles it after each turn. Omit it for static setting. |
*.schema
| Field | Type | Required | Description |
|---|---|---|---|
type | "string" or "number" or "integer" or "boolean" or "null" or "object" or "array" or list of "string" or "number" or "integer" or "boolean" or "null" or "object" or "array" | no | JSON type of the value, or a list of types for a nullable value. |
title | text | no | Display label of this node. |
description | string | no | What this node holds. Given to the model. |
enum | list of any | no | Allowed values. |
const | any | no | The only allowed value. |
minimum | number | no | Inclusive lower bound. |
maximum | number | no | Inclusive upper bound. |
exclusiveMinimum | number | no | Exclusive lower bound. |
exclusiveMaximum | number | no | Exclusive upper bound. |
minLength | integer | no | Minimum string length in characters. |
maxLength | integer | no | Maximum string length in characters. |
items | object | no | Schema of every array element. |
minItems | integer | no | Minimum array length. |
maxItems | integer | no | Maximum array length. |
properties | map of object | no | Schemas of the named properties of an object. |
required | list of string | no | Property names that must be present. Each must be declared in properties. |
additionalProperties | boolean or object | no | false rejects undeclared keys. A schema describes dynamically named records. |
x-i18n | boolean | no | Marks this node as translatable text: its value is a string written in the file's own language; translations go in the locale edition of the file. Nodes without it are never localized. |
x-enumLabels | map of text | no | Display labels keyed by enum member. A label never replaces the stored value. |
x-derive | object | no | Computes this value from the world clock in code, in the turn the clock moves: start + perUnit * source, kept inside min / max, or the label ranges gives for that number. No model writes a derived value. Allowed on the value itself or on a property reached through properties only. |
*.schema.items
Same fields as *.schema.
*.schema.properties.*
Same fields as *.schema.
*.schema.additionalProperties
Same fields as *.schema.
*.schema.x-derive
| Field | Type | Required | Description |
|---|---|---|---|
source | "clock.elapsedSinceStart" | yes | What the value is computed from. clock.elapsedSinceStart is the time on the world clock since the session began, in the clock's base unit: minutes on a calendar, phases on a phase clock. |
start | number | no | The number when the source is 0. Default 0. |
perUnit | number | no | What one unit of the source adds to the number; negative for a countdown. Default 1. |
min | number | no | The number never goes below this. |
max | number | no | The number never goes above this. |
ranges | list of object | no | Turns the number into a label: the first range that holds the number gives the value. The last range has no bounds. Without ranges the value is the number itself. |
*.schema.x-derive.ranges[]
| Field | Type | Required | Description |
|---|---|---|---|
from | number | no | Inclusive lower bound of the number. |
to | number | no | Inclusive upper bound of the number. |
value | string or number or boolean | yes | The value of the field while the number is in range. |