Skip to content

World Schema

A Yumina world is stored as a JSON object called WorldDefinition. This is the complete schema.

Top-Level Structure

json
{
  "id": "uuid",
  "version": "20.0.0",
  "name": "World Name",
  "description": "Short description",
  "author": "Creator Name",
  "language": "en",

  "entries": [],
  "variables": [],
  "rules": [],
  "reactions": [],

  "rootComponent": null,
  "components": [],
  "audioTracks": [],
  "bgmPlaylist": null,
  "conditionalBGM": [],
  "customUI": [],

  "entryFolders": [],
  "customTags": [],
  "customTagColors": {},
  "editorMode": "advanced",

  "settings": {
    "maxTokens": 12000,
    "maxContext": 200000,
    "temperature": 1.0,
    "topP": 1,
    "frequencyPenalty": 0,
    "presencePenalty": 0,
    "playerName": "User",
    "lorebookScanDepth": 2,
    "lorebookRecursionDepth": 0
  }
}

Field Reference

Identity

FieldTypeDescription
idstringUUID, auto-generated
versionstringSchema version, currently "20.0.0"
namestringWorld name (1-200 chars)
descriptionstringShort description (0-10,000 chars)
authorstringCreator's display name
languagestring (optional)BCP 47 language code ("en", "zh", "ja", etc.). Present in TypeScript interface but optional in Zod schema.

Content

FieldTypeDescription
entriesWorldEntry[]All content the AI reads — characters, lore, rules, greetings
variablesVariable[]Game state definitions with behavior rules
rulesRule[]WHEN/IF/THEN automation triggers
reactionsReaction[] (optional)Event-pattern-based rules (newer system). Can be undefined.

Presentation

FieldTypeDescription
rootComponentRootComponent | nullCustom UI virtual filesystem (React/TSX)
componentsGameComponent[]Built-in UI components (stat bars, etc.)
audioTracksAudioTrack[]BGM, SFX, and ambient tracks
bgmPlaylistBGMPlaylist | nullAuto-play music configuration
conditionalBGMConditionalBGM[]State-triggered music
customUICustomUIComponent[]Legacy UI system (use rootComponent instead)

Organization

FieldTypeDescription
entryFoldersEntryFolder[]Folder structure for organizing entries
customTagsstring[]Creator-defined tags for entries
customTagColorsRecord<string, string>Tailwind color classes for custom tags
editorMode"simple" | "advanced"Editor complexity level

Settings

FieldTypeDefaultDescription
maxTokensnumber12000Max tokens per AI response
maxContextnumber200000Max context window size
temperaturenumber1.0AI creativity (0.0-2.0)
topPnumber1Nucleus sampling threshold
frequencyPenaltynumber0Penalty for repeated tokens
presencePenaltynumber0Penalty for already-used tokens
playerNamestring"User"Default {{user}} replacement
lorebookScanDepthnumber2How many recent turns to scan for keywords
lorebookRecursionDepthnumber0How many levels of triggered-entries-triggering-entries
topKinteger (optional)Limits candidate token count (min: 0)
minPfloat (optional)Minimum probability threshold (0-1)
structuredOutputboolean (optional)falseForces JSON output format