World folders
A world folder is one OnlyWorlds world stored as plain JSON files: one file for the world, one per element. A text editor opens it, a copy backs it up, and any tool reads it with no account, key or network. Under git, each commit is a point in the world’s history and a branch is a what-if; element ids stay the same on every branch.
Layout
Section titled “Layout”moppetopia/
world.json the world
elements/
character/
admiral-fluffington--295f8866.json
location/
... one folder per element type present, lowercase singular
media/ optional; reserved for a world's media files, no shared format yet
records/ optional; world data that is not elements, one folder per producer
RECORDS.json the manifest: one entry per producer
.atlas/ a tool's private state; never needed to read the worldOne file per element. A world folder is plain JSON: world.json and one file for each element, in a folder for its element type.
The example world, Hyperion
How a file gets its name
- name
- Mr. Steinway
- id
068e92dc-10ec-7225-8000-7efd678bd862- file
mr-steinway--678bd862.json
- name
- The Consul’s Steinway
- id
068e2e56-d4b9-7c40-8000-173975bfd994- file
the-consul-s-steinway--75bfd994.json
- name
- Pack of Bellowing Saurians
- id
068e92dd-ce97-79b4-8000-90a11218fc88- file
pack-of-bellowing-saurians--1218fc88.json
The name with its accents removed, in lowercase ASCII, each run of other characters one hyphen and no hyphen at either end, cut to 40 characters with any hyphen left at the end removed; then --; then the id's last 8 characters. The id inside the file is the identity: rename a file and nothing breaks.
example/hyperion), when the docs are built: 35 element files in 19 of the 22 element type folders, every file named by the rule from its element's name and id. An element type with no elements has no folder.A folder holds one world. All 22 element types, map, pin, zone and marker included, live under elements/<type>/. A missing element type folder means no elements of that element type.
The id inside a file is the element’s identity, written in lowercase as onlyworlds.com serves it: inside a world two ids are the same id only when they are written the same (the same id). The filename is for people: rename a file and nothing breaks. The recommended name is <slug>--<tail>.json. The slug is the name with its accents removed (José becomes jose), in lowercase ASCII, each run of other characters as one hyphen (an apostrophe included: The Consul’s Steinway becomes the-consul-s-steinway) and no hyphen at either end, cut to 40 characters with any hyphen left at the end removed. The tail is the id’s last 8 characters. An element with no usable name gets <id>.json.
world.json
Section titled “world.json”Two keys are required: id (a non-empty string) and name (a string, which may be empty here, though onlyworlds.com refuses an empty name on a write). The rest are optional.
| Key | Holds |
|---|---|
description, image_url, timeline fields, length_unit, mass_unit, distance_unit |
As on Worlds. The unit keys have the same spelling on disk and on the wire. The current time is time_current on disk, the standard’s name; the API calls it time_range_current. |
format_version |
The version of this format the folder was written against, currently "0.3.24". Written only when the folder is created. |
producer |
Which tool made the folder and from what: {"tool", "version", "input"}. tool is the name the tool publishes under (@onlyworlds/sdk, onlyworlds, atlas, keel, ow-folder-store, or a converter’s repository name); input is one word from a closed list: server (an export from onlyworlds.com), bare (a world born empty in a tool), azgaar-map, worldanvil-export, foundry-world, obsidian-vault, text (a parse from prose or notes), json (loose JSON of unknown origin), notion-export (a Notion export, Markdown and CSV), legendkeeper-export (a LegendKeeper export file, .json or .lk), legendkeeper-api (a LegendKeeper project read through its API), kanka-export (a Kanka JSON export), campfire-export (a Campfire web export, the html; since v0.3.18). Written once, by the writer that makes the folder; a tool that copies, snapshots or rewrites a folder keeps the line as it found it and never invents one. Absent is the honest value for a hand-made folder or one made before this row. A reader never refuses a folder on an input word it does not know. Since v0.3.14 (2026-10-22). |
source |
Where the folder came from: {"server", "world", "at"}, the server’s address, the world’s id there and when it was exported. Written by a tool that exports from a server; absent on a folder made by hand. |
exported_as |
Which part of the world this is: {"kind", "role", "character"}, with kind owner (the whole world), member (a co-builder’s or contributor’s view), character (what one Character knows, with its {id, name}) or public. A tool that cannot tell writes none. A tool that pushes refuses to push a character or public folder as the whole world. |
origin |
Where the world first came from: {"source", "producer"}, the two lines above as the tool that first made the world from a folder gave them, kept by the server. A server’s own export (the owner’s download, the nightly file) writes it beside the export’s own source and producer, which describe this export. Keep it as you would any world key; never derive one. Absent when the server knows none, or on a folder no server wrote (since v0.3.16; onlyworlds.com serves it since 2026-10-23). |
api |
The link to a world on onlyworlds.com (world_id, api_key). Present: the folder syncs with it. Absent: a local world. |
snapshot_*, writable |
Only on a snapshot |
{
"id": "0695db52-5433-7332-8000-db7fe10da375",
"name": "Moppetopia",
"time_basic_unit": "Year",
"time_range_min": 0,
"time_range_max": 500,
"time_current": 453
}Element files
Section titled “Element files”An element file must hold a non-empty string id. The rest are the element type’s fields, link fields under bare names holding an id or a list of ids, as in the API. A list names each element once: a reader served a list that names one element twice reads it once, in its first place, and a writer that builds a list builds it so. Trimmed:
{
"id": "0695db83-afd7-76ee-8000-00f4295f8866",
"name": "Admiral Fluffington",
"location": "0695db83-972a-74da-8000-262f1559a7f1",
"rivals": ["0695db83-b69a-772b-8000-557e9ba0dcc3"]
}A reader fills in type from the folder name unless the file declares one. A file declares its type with a type exactly equal to one of the 22 type slugs as the standard spells them (location); anything else there (another case such as Location, an unknown word, a number, null) declares nothing, and the folder name fills it. A file that declares one type and sits in another type’s folder is read as it declares. A file without an id is skipped and left as it is. Tools may add their own fields under a prefix (atlas_*, x_*). An element file carries no world key: a writer adds none, and a reader gives one no meaning, since the folder is the world (a reader that keeps a file’s bytes still writes an unedited file back as it found it). An element named in prose is [Label](ow://<type>/<id>). Map coordinates run from the bottom left, y upward.
Folders and onlyworlds.com
Section titled “Folders and onlyworlds.com”- Linked: a folder with an
apiblock is that account world on disk. To find the server’s world, readapi.world_idfirst and fall back toid(older folders can differ). - Account to folder: let Atlas download the world (a linked folder), export it with the Python package’s
export_worldor the Unity SDK’sOWFolderExport, or by script read changes from the start untilhas_moreis false and writeworld.jsonfromGET /api/v2/world, renamingtime_range_currenttotime_current. - Folder to account: Atlas can take a local folder online. Or send the files to an empty world through
/bulk, strippinglocal_updated_at,server_updated_at,image_media_id,created_at,updated_at,created_by,typeandchange_seq, and renamingmap_idtomap,zone_idtozone. An element’shidden: truecan go as it is: a/bulkitem that creates takes it from the owner’s or a co-builder’s key and creates the element hidden. - A draft: a world no account holds yet is a world folder, or a world file’s content, kept wherever the tool keeps things, with no
apiblock and nosource. Each element keeps the id the tool gave it for good: going online sends every element with its id, and a host that cannot take an id refuses the whole hand-over rather than minting another. So an import that makes its ids from a source makes the same ids every time, and only one draft from that source can go online. The world’s own id is the one exception: the host gives it at the hand-over, and the tool writes that id intoworld.json. - A copy to share may drop the
apiblock, which holds a key, and leaves out private records (below), and nothing else. It keeps itsid. If a key was ever pushed somewhere public, revoke it in your account. - Archives (
.owworld; if you write a reader, schema-dist ships a test set atfixtures/owworld/, example archives with the verdict each should get): one world per zip, as one top-level folder; readers also acceptworld.jsonat the root, ignore files beside the folder, never require themimetypemarker (application/vnd.onlyworlds.world+zip, first and stored, which writers should place) and refuse one with other bytes; every reader accepts 500,000 entries and 2 GiB; a writer gives the same bytes for the same world (entries in code point order, stamped 1980-01-01); names are strict, duplicates and case-fold collisions, links, encryption and other compression methods refuse. The TypeScript SDK follows it from 4.49.0, the Unity SDK from v0.11.0 and the Python package from 0.17.0, each tested against that set, and the directory Python writes matches the TypeScript writer’s. - Records (
records/): world data that is not elements (a simulation’s ledger, a build’s provenance, a tool’s history), one directory per producer in the producer’s own format, listed inrecords/RECORDS.json, a JSON array of{producer, format, version, deltas}entries. Records are never elements: no endpoint serves them and no tool reads them as canon; a record may point at element ids, never the other way. A tool that rewrites a folder carriesrecords/through byte for byte. Private records (v0.3.15): an entry with"private": truemarks its directory private, and an export, a share or a snapshot leaves that whole directory out unless the caller asks;RECORDS.jsontravels unchanged, its private entry kept, so a reader can tell “left out” from “never there”. A writer that cannot read the manifest leaves nothing out by guess: it refuses, or the caller asks. The set carries the case on both sides from serial 49 (85 archives then). - Hidden elements:
hidden: truein an element file means the source hid it, and it stays hidden. Every writer keeps the key as it is. A tool that opens your own folder shows the element with the word hidden; a reader that hands the world on (a pack, a context packet, a share) leaves it out unless asked, and says how many it left out. A push sends the mark with the create, so the element is never published bare; a mark added to a file later goes online as a hide from the owner’s or a co-builder’s key (a contributor’s or guest’s key cannot hide online, so its tool keeps the element local and says so), and a mark removed from a file never unhides the element online. A world file keeps the mark by default; a share made withincludeHidden: falseleaves those elements out whole and counts them.
Snapshots
Section titled “Snapshots”A snapshot is a frozen copy of a world at one moment, such as a chapter’s end.
| Key | Holds |
|---|---|
snapshot_of |
The source world’s id |
snapshot_label |
A label, such as "ch05" |
snapshot_at |
Capture time (ISO 8601) |
snapshot_change_seq |
The source’s change cursor at capture |
snapshot_counts |
Optional: how many files were written per element type, a convenience count. If it and the files disagree, trust the files. |
snapshot_torn |
true only on a capture known to be inconsistent |
writable |
false. Advisory: a tool may still write. The Unity SDK opens such a folder read-only and refuses to sync into it; Atlas opens it view only (since 1.90.0). |
The writer mints a fresh world id and keeps every element id; a re-capture under the same label keeps the snapshot’s id. It copies name exactly and every world.json key the source had, keeps change_seq, created_at, updated_at and type as received, and writes no .<tool>/ folder. If the change cursor moved during the walk it fails, or on an explicit override sets snapshot_torn: true.
Who reads and writes folders
Section titled “Who reads and writes folders”| Tool | With folders |
|---|---|
| Atlas | Reference implementation; stores every world as a folder. Folder mode needs a Chromium browser. Worlds sit inside onlyworlds-atlas/<name>-<id-prefix>/: point other tools at the world’s own folder. |
| Obsidian plugin | Exports a world as a folder; imports a folder into notes |
| Toolkit | Reads a folder in place of the API; import writes new ones; carry packs a folder into an .owworld file and back and converts other apps’ exports into one |
| Python package | Reads and writes folders (read_folder, write_folder); export_world writes an account world as a folder; exports a folder to an OKF bundle |
| Unity SDK | Reads a folder, or a whole folder zipped as one .owworld file, into a world cache; writes elements, and exports an account world as a folder |
| Azgaar converter | Azgaar map in, as a folder |
| Foundry converter | Folder out, to Foundry VTT |
Known-of elements
Section titled “Known-of elements”A guest’s or player’s export can hold elements its Character only knows of: stubs marked known_of: true. A stub on disk keeps known_of, the keys a stub always keeps (id, type, name, description, supertype, subtype, image_url, created_at, updated_at, change_seq) and every other field it was served with a value, such as a Character’s public fields; its unset fields are left out, never written as empty values. A reader treats such a file as known of, never whole: a missing field is unknown, not empty. A writer never pushes it. When the element later arrives whole, it is written whole and known_of goes. The other way round, a whole element arriving as a stub (the reader lost a grant) follows the reset that brought it: after a view reset the stub replaces the whole copy, since what the reader may see narrowed; after a role reset, or with no reset at all (a folder handed over, another server), a tool that merges into an existing folder keeps the whole copy as last known. keel’s own feed always narrows a view with a view reset (What a reset keeps).
A list trimmed for its reader
Section titled “A list trimmed for its reader”A body the server trimmed for a key that may not see every linked element carries x_served_trimmed where a lost id would change what the body means: on a message, naming characters or narrator, and on a lens, naming an anchor field. Any other link simply leaves the id out. A file keeps the mark exactly as served, beside the trimmed field, as it keeps known_of. A reader reads a field the mark names as trimmed, never as empty: a message’s empty characters with the mark is to someone the reader cannot see, never to everyone. A writer never sends the mark up: a push strips it from what it sends, never from the file (since v0.3.19).
Rules for tools
Section titled “Rules for tools”Reading
- MUST read every
*.jsonin an element type folder and key on the innerid; MUST NOT parse filenames. SHOULD skip a dot-prefixed file there: it is a tool’s litter, not an element. - MUST treat a missing element type folder as empty, and MUST NOT require any
.<tool>/folder. - SHOULD also read
spatial/{map,pin,zone,marker}/(older Atlas). An id found in both layouts: serve theelements/copy, and SHOULD log the duplicate. - Visit the files of a layout by name, compared by code point, the same on every platform. An id found twice within one layout keeps the first file in that order. Never use the system’s own path sort: on Windows it ignores case, so two readers would keep different files.
- Accept both spellings:
map/map_id,zone/zone_id,time_current/time_range_current. - MUST NOT rewrite a file’s key spellings as a side effect of opening it.
- A tool holding several worlds MUST key storage by source and world id, never world id alone.
Writing
- UTF-8 without BOM, LF endings, 2-space indent, one trailing newline, keys in received order (never sorted),
1not1.0. - Write new elements under
elements/<type>/, neverspatial/; an element read from a file is written back to that file, so one id never sits in both layouts. SHOULD omit empty element type folders. - Two elements with the same filename: the later ones (by ascending id, compared by code point, the order archive entries use) MUST use the full id,
<slug>--<id>.json. - An id, once minted, MUST be kept and MUST NOT be re-derived (from a new name, say).
- MUST NOT invent data it lacks, such as timestamps, nor drop data it has. A known-of stub is written with its kept keys and served values only, and never pushed.
- MUST preserve unknown fields and MUST NOT change another tool’s prefixed field at any depth: copy it through byte for byte.
format_versiononly when creating a folder. MUST NOT create or edit a.gitignorein a folder it did not create (in your own repo,.*/keeps every tool folder out).- One writer per folder at a time; never write into another tool’s
.<tool>/. - In a linked folder, every changed element file MUST get
local_updated_atset to now (UTC, ISO 8601),server_updated_atleft alone; otherwise Atlas never sends the edit. New files carry neither.
Checking a folder
schema-dist has a checker: python walk/lint_folder.py path/to/world, with Python 3 and PyYAML. It runs from a copy of the whole repository, since it imports schema_walk.py and reads schema/ beside it: make a fresh one in a scratch directory (git clone --depth 1 https://github.com/OnlyWorlds/schema-dist, about 6 MB, or the repository’s zip without git), never a copy another project left on the disk, which can be an older serial. It names every key that is not a field of its type, every link that does not resolve or points at the wrong type, and every value of the wrong shape. Server keys, the folder’s own keys and prefixed fields pass. Its last line is the count it checked, and it exits 1 when it finds a problem. It names the folder format version it knows, and a world.json whose format_version is newer gets one warning line, never counted as a problem (since schema-dist serial 61): update the lint, or read the spec for what changed. Since serial 115 it reads the two review marks, x_review_proposed and x_review_checked, as warnings that never fail a folder: a mark that is not an object, and each key an object mark lacks. A link to an element the folder does not hold (a partial download, say) is reported, and is true. It also reports a world.json that carries an api block while git tracks it: a linked folder is never committed, so a world kept in a shared repository is the portable copy and the key stays outside it. The same checker comes inside the Python package since 0.51.0: pip install onlyworlds, then python -m onlyworlds.lint path/to/world, with no YAML library and no copy of the repository.