# Schema

The standard defines 22 **element types**, the fields each one carries, and typed links between them. An **element** is one record in a world: a Character, a Location, a Law.

Use as much of it as you need. Only `name` is required: the key must be present, and an empty string is accepted, on every element type, Pins and Markers included. So a world of nothing but Objects is a valid world. Supertype and subtype sort a world's elements into its own kinds, `x_` fields carry data the standard doesn't model, and high-volume data can live in your own database beside the world, keyed by element id.

## The 22 element types

| Element type | Definition |
| :--- | :--- |
| [Character](/docs/schema/element_categories/character) | A Character represents an individual with agency and the capacity to make choices that affect their world. |
| [Creature](/docs/schema/element_categories/creature) | Creatures are living entities within a world that exhibit behavior and agency but lack the strategic reasoning or social complexity of Characters. |
| [Species](/docs/schema/element_categories/species) | A Species defines a distinct biological or cultural form of life. |
| [Family](/docs/schema/element_categories/family) | A Family is a group tied together by lineage, heritage or community. |
| [Collective](/docs/schema/element_categories/collective) | A Collective is a group of individuals that acts as a unit but has no formal governance of its own. |
| [Institution](/docs/schema/element_categories/institution) | Institutions are organized bodies with purpose and structure. |
| [Location](/docs/schema/element_categories/location) | A Location represents a distinct place within the world where activities occur and elements converge. |
| [Object](/docs/schema/element_categories/object) | Objects are tangible, non-living things that can be made, owned, traded or destroyed. |
| [Construct](/docs/schema/element_categories/construct) | Constructs are abstract or conceptual structures that exist within a world and can have causal, symbolic, or systemic roles. |
| [Ability](/docs/schema/element_categories/ability) | An Ability represents something an entity in the world can do: a defined action, power, skill, or effect that can change the world or its perception. |
| [Trait](/docs/schema/element_categories/trait) | Traits describe qualities that shape how a character or creature acts, responds, or is perceived. |
| [Title](/docs/schema/element_categories/title) | A Title is a formal designation that confers identity, standing, or power within a world. |
| [Language](/docs/schema/element_categories/language) | Languages are systems of shared meaning, whether natural, constructed, or symbolic. |
| [Law](/docs/schema/element_categories/law) | A Law represents a formalized rule or set of guidelines that governs the actions of individuals or groups within a specific jurisdiction. |
| [Event](/docs/schema/element_categories/event) | An Event represents a time-bound happening within the world. |
| [Narrative](/docs/schema/element_categories/narrative) | Narratives represent stories told in your world, and can involve the organization or reinterpretation of Events. |
| [Phenomenon](/docs/schema/element_categories/phenomenon) | Phenomena are ongoing or emergent conditions that act in or upon the world. |
| [Relation](/docs/schema/element_categories/relation) | Relations are non-material and capture meaningful connections between world elements. |
| [Map](/docs/schema/element_categories/map) | A Map represents a spatial template that defines a coordinate system for placing elements within your world. |
| [Pin](/docs/schema/element_categories/pin) | Pins represent a single element on a single Map, indicating its position in that particular world view. |
| [Marker](/docs/schema/element_categories/marker) | Groups of Markers, each at a specific coordinate, together designate a Zone in the world. |
| [Zone](/docs/schema/element_categories/zone) | Zones represent abstract or meaningful areas within the world that hold significance due to cultural, political, environmental, or narrative reasons. |

**22 element types.** From Pin's 5 fields to Character's 33. Narrative is the most linked: 23 of its 28 fields are links to other elements.

- **Blue**: Character 33 fields (11 links), Creature 18 fields (7 links), Species 17 fields (8 links), Collective 14 fields (8 links), Family 12 fields (9 links), Institution 10 fields (7 links).
- **Green**: Location 32 fields (23 links), Object 14 fields (9 links), Zone 10 fields (5 links), Map 7 fields (2 links), Marker 6 fields (2 links), Pin 5 fields (2 links).
- **Pink**: Construct 26 fields (20 links), Title 24 fields (18 links), Trait 14 fields (2 links), Law 11 fields (8 links), Language 8 fields (3 links).
- **Amber**: Narrative 28 fields (23 links), Event 22 fields (17 links), Relation 22 fields (18 links), Ability 14 fields (8 links), Phenomenon 10 fields (6 links).

Generated from the schema. The element types are grouped by the colours the SDK and Atlas draw them in: a visual aid, not part of the standard, which has 22 independent element types and no layer above them. Each element type's own fields: the [base fields](/docs/schema/fields) every element carries are not counted. A Pin's `element` link counts as one field; on the wire it is two, `element_type` and `element_id`.

Every element also carries the same base fields (name, description, supertype, subtype, image and more). [Fields](/docs/schema/fields) lists them, with the field types and what is required. [Worlds](/docs/schema/worlds) covers the container that holds the elements and its timeline. [A worked example](/docs/schema/example) reads one small world through the API, link by link.

## Typed links

Links are typed fields. A Character's `location` is a single link that holds one Location; its `friends` is a multi link that holds any number of Characters. Each link field names the element type it points to, so a tool always knows what kind of element is on the other end. One field, the Pin's `element`, is a generic link that can point to an element of any element type (on the wire, `element_type` and `element_id`).

Links point one way, from the element that holds the field. For connections that carry their own history, span or intensity, the standard has an element type of its own: [Relation](/docs/schema/element_categories/relation). [Conventions](/docs/schema/conventions) covers when to use which.

### What links to what

Select an element type to see the element types its link fields point at, with the fields named on each. Each element type's own page lists the same fields in its table.

- **Ability** links to Construct (`requisites`, `tradition`, `systems`), Location (`locus`), Object (`instruments`), Phenomenon (`effects`, `source`), Trait (`talents`). Linked from Character (`abilities`), Collective (`abilities`), Construct (`abilities`), Creature (`abilities`, `actions`), Event (`abilities`), Family (`abilities`), Narrative (`abilities`), Object (`abilities`), Phenomenon (`empowerments`), Relation (`abilities`), Species (`adaptations`), Trait (`empowered_abilities`).
- **Character** links to Ability (`abilities`), Family (`family`), Institution (`institutions`), Language (`languages`), Location (`birthplace`, `location`), Object (`objects`), Species (`species`), Trait (`traits`), other Characters (`friends`, `rivals`). Linked from Collective (`characters`), Construct (`founder`, `characters`), Event (`characters`), Family (`ancestors`), Location (`founders`), Narrative (`protagonist`, `antagonist`, `narrator`, `characters`), Phenomenon (`wielders`), Relation (`actor`, `characters`), Title (`holders`, `characters`).
- **Collective** links to Ability (`abilities`), Character (`characters`), Construct (`symbolism`), Creature (`creatures`), Institution (`operator`), Object (`equipment`), Phenomenon (`phenomena`), Species (`species`). Linked from Construct (`collectives`), Event (`collectives`), Location (`populations`), Narrative (`collectives`), Relation (`collectives`), Title (`collectives`), Zone (`populations`).
- **Construct** links to Ability (`abilities`), Character (`founder`, `characters`), Collective (`collectives`), Creature (`creatures`), Event (`events`), Family (`families`), Institution (`custodian`, `institutions`), Language (`languages`), Location (`locations`), Narrative (`narratives`), Object (`objects`), Phenomenon (`phenomena`), Relation (`relations`), Species (`species`), Title (`titles`), Trait (`traits`), Zone (`zones`), other Constructs (`constructs`). Linked from Ability (`requisites`, `tradition`, `systems`), Collective (`symbolism`), Event (`constructs`), Family (`traditions`), Institution (`constructs`), Language (`classification`), Law (`penalties`, `prohibitions`), Location (`cults`, `extraction_methods`, `extraction_goods`, `industry_methods`, `industry_goods`, `currencies`, `building_methods`, `fighters`), Narrative (`constructs`), Object (`materials`, `technology`, `consumes`), Phenomenon (`triggers`), Relation (`constructs`), Species (`reproduction`), Title (`constructs`), Zone (`principles`).
- **Creature** links to Ability (`abilities`, `actions`), Language (`languages`), Location (`location`), Species (`species`), Trait (`traits`), Zone (`zone`). Linked from Collective (`creatures`), Construct (`creatures`), Event (`creatures`), Family (`creatures`), Institution (`creatures`), Narrative (`creatures`), Relation (`creatures`), Title (`creatures`).
- **Event** links to Ability (`abilities`), Character (`characters`), Collective (`collectives`), Construct (`constructs`), Creature (`creatures`), Family (`families`), Institution (`institutions`), Language (`languages`), Location (`locations`), Object (`objects`), Phenomenon (`phenomena`), Relation (`relations`), Species (`species`), Title (`titles`), Trait (`traits`), Zone (`zones`), other Events (`triggers`). Linked from Construct (`events`), Narrative (`events`), Relation (`events`).
- **Family** links to Ability (`abilities`), Character (`ancestors`), Construct (`traditions`), Creature (`creatures`), Institution (`governs`), Language (`languages`), Location (`estates`), Object (`heirlooms`), Trait (`traits`). Linked from Character (`family`), Construct (`families`), Event (`families`), Narrative (`families`), Relation (`families`), Title (`families`).
- **Institution** links to Construct (`constructs`), Creature (`creatures`), Object (`objects`), Zone (`zones`), other Institutions (`parent_institution`, `allies`, `adversaries`). Linked from Character (`institutions`), Collective (`operator`), Construct (`custodian`, `institutions`), Event (`institutions`), Family (`governs`), Law (`author`), Location (`primary_power`, `secondary_powers`), Narrative (`conservator`, `institutions`), Relation (`institutions`), Title (`issuer`, `body`, `institutions`).
- **Language** links to Construct (`classification`), Location (`spread`), other Languages (`dialects`). Linked from Character (`languages`), Construct (`languages`), Creature (`languages`), Event (`languages`), Family (`languages`), Narrative (`languages`), Object (`language`), Relation (`languages`), Title (`languages`).
- **Law** links to Construct (`penalties`, `prohibitions`), Institution (`author`), Location (`locations`), Title (`adjudicators`, `enforcers`), Zone (`zones`), other Laws (`parent_law`). Linked from Narrative (`laws`), Title (`laws`).
- **Location** links to Character (`founders`), Collective (`populations`), Construct (`cults`, `extraction_methods`, `extraction_goods`, `industry_methods`, `industry_goods`, `currencies`, `building_methods`, `fighters`), Institution (`primary_power`, `secondary_powers`), Object (`vehicle`, `buildings`, `defensive_objects`), Species (`delicacies`), Title (`governing_title`), Zone (`zone`), other Locations (`parent_location`, `rival`, `partner`, `extraction_markets`, `industry_markets`). Linked from Ability (`locus`), Character (`birthplace`, `location`), Construct (`locations`), Creature (`location`), Event (`locations`), Family (`estates`), Language (`spread`), Law (`locations`), Map (`location`), Narrative (`locations`), Object (`location`), Phenomenon (`environments`), Relation (`locations`), Species (`locations`), Title (`locations`).
- **Map** links to Location (`location`), other Maps (`parent_map`). Linked from Marker (`map`), Pin (`map`).
- **Marker** links to Map (`map`), Zone (`zone`).
- **Narrative** links to Ability (`abilities`), Character (`protagonist`, `antagonist`, `narrator`, `characters`), Collective (`collectives`), Construct (`constructs`), Creature (`creatures`), Event (`events`), Family (`families`), Institution (`conservator`, `institutions`), Language (`languages`), Law (`laws`), Location (`locations`), Object (`objects`), Phenomenon (`phenomena`), Relation (`relations`), Species (`species`), Title (`titles`), Trait (`traits`), Zone (`zones`), other Narratives (`parent_narrative`). Linked from Construct (`narratives`), Relation (`narratives`).
- **Object** links to Ability (`abilities`), Construct (`materials`, `technology`, `consumes`), Language (`language`), Location (`location`), Phenomenon (`effects`), Trait (`affinities`), other Objects (`parent_object`). Linked from Ability (`instruments`), Character (`objects`), Collective (`equipment`), Construct (`objects`), Event (`objects`), Family (`heirlooms`), Institution (`objects`), Location (`vehicle`, `buildings`, `defensive_objects`), Narrative (`objects`), Phenomenon (`catalysts`), Relation (`objects`), Title (`symbols`, `objects`).
- **Phenomenon** links to Ability (`empowerments`), Character (`wielders`), Construct (`triggers`), Location (`environments`), Object (`catalysts`), other Phenomena (`system`). Linked from Ability (`effects`, `source`), Collective (`phenomena`), Construct (`phenomena`), Event (`phenomena`), Narrative (`phenomena`), Object (`effects`), Relation (`phenomena`), Species (`affinities`), Title (`phenomena`), Zone (`phenomena`).
- **Pin** links to Map (`map`), any element (`element_id`).
- **Relation** links to Ability (`abilities`), Character (`actor`, `characters`), Collective (`collectives`), Construct (`constructs`), Creature (`creatures`), Event (`events`), Family (`families`), Institution (`institutions`), Language (`languages`), Location (`locations`), Narrative (`narratives`), Object (`objects`), Phenomenon (`phenomena`), Species (`species`), Title (`titles`), Trait (`traits`), Zone (`zones`). Linked from Construct (`relations`), Event (`relations`), Narrative (`relations`).
- **Species** links to Ability (`adaptations`), Construct (`reproduction`), Location (`locations`), Phenomenon (`affinities`), Trait (`traits`), Zone (`zones`), other Species (`nourishment`, `parent_species`). Linked from Character (`species`), Collective (`species`), Construct (`species`), Creature (`species`), Event (`species`), Location (`delicacies`), Narrative (`species`), Relation (`species`), Title (`species`).
- **Title** links to Character (`holders`, `characters`), Collective (`collectives`), Construct (`constructs`), Creature (`creatures`), Family (`families`), Institution (`issuer`, `body`, `institutions`), Language (`languages`), Law (`laws`), Location (`locations`), Object (`symbols`, `objects`), Phenomenon (`phenomena`), Species (`species`), Zone (`zones`), other Titles (`superior_title`). Linked from Construct (`titles`), Event (`titles`), Law (`adjudicators`, `enforcers`), Location (`governing_title`), Narrative (`titles`), Relation (`titles`), Zone (`titles`).
- **Trait** links to Ability (`empowered_abilities`), other Traits (`anti_trait`). Linked from Ability (`talents`), Character (`traits`), Construct (`traits`), Creature (`traits`), Event (`traits`), Family (`traits`), Narrative (`traits`), Object (`affinities`), Relation (`traits`), Species (`traits`).
- **Zone** links to Collective (`populations`), Construct (`principles`), Phenomenon (`phenomena`), Title (`titles`), other Zones (`linked_zones`). Linked from Construct (`zones`), Creature (`zone`), Event (`zones`), Institution (`zones`), Law (`zones`), Location (`zone`), Marker (`zone`), Narrative (`zones`), Relation (`zones`), Species (`zones`), Title (`zones`).

## Where the schema lives

| What | Where |
| :--- | :--- |
| The standard, as YAML | [github.com/OnlyWorlds/OnlyWorlds](https://github.com/OnlyWorlds/OnlyWorlds/tree/main/schema): one file per element type, plus `base_properties.yaml` for the fields every element shares and `world.yaml` for the world itself; the standard's version is in the `VERSION` file at the repository root |
| Governance | [council.onlyworlds.com](https://council.onlyworlds.com): the standard changes in public, by motion and vote. Take part on the site or through the toolkit. |
| For tool builders | [schema-dist](https://github.com/OnlyWorlds/schema-dist): the generated distribution, its decoder (the walk), and the ruling table. Vendor it rather than writing a parser of your own. |