{"title":"Glyph draft, version 1","description":"A campaign or world draft for Glyph, built by an AI from a book. Parts carry stable keys; references are keys.","$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"kind":{"type":"string","enum":["campaign","setting"],"description":"campaign (with an optional world) or setting (a world alone)."},"game":{"type":"string","enum":["dungeon-world","dnd-5e"],"description":"dungeon-world or dnd-5e."},"edition":{"description":"null for the core edition; class-warfare for that Dungeon World supplement.","anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string","minLength":1,"maxLength":80,"description":"The draft's name in the review list."},"format":{"type":"string","const":"glyph-draft","description":"Always \"glyph-draft\"."},"version":{"type":"number","const":1,"description":"The format's version: 1."},"parts":{"minItems":1,"maxItems":6000,"type":"array","items":{"oneOf":[{"type":"object","properties":{"key":{"type":"string","const":"world"},"section":{"type":"string","const":"world"},"name":{"type":"string","minLength":1,"maxLength":80,"description":"The world's name, up to 80 characters."},"summary":{"description":"A short description of the world.","anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"player_intro":{"description":"What the players may know about the world.","anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"gm_overview":{"description":"GM only: the world's secrets and truths.","anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"tone":{"description":"heroic, grim, political or horror.","anyOf":[{"type":"string","enum":["heroic","grim","political","horror"]},{"type":"null"}]}},"required":["key","section","name"],"additionalProperties":false,"description":"The world (at most one). Required in a world draft; optional in a campaign draft."},{"type":"object","properties":{"key":{"type":"string","const":"campaign"},"section":{"type":"string","const":"campaign"},"name":{"type":"string","minLength":1,"maxLength":80,"description":"The campaign's name, up to 80 characters."},"description":{"description":"What the campaign is about.","anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"summary":{"description":"A short summary.","anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"player_summary":{"description":"What the players may read.","anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"gm_summary":{"description":"GM only: the campaign's secret summary.","anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"current_situation":{"description":"Where the story stands now.","anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"next_session_prep":{"description":"GM only: preparation for the next session.","anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"tone":{"description":"Free text, up to 100 characters.","anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"status":{"description":"prep (default), active, paused, finished or archived.","type":"string","enum":["prep","active","paused","finished","archived"]},"party_name":{"description":"The adventurers' group name.","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"party_summary":{"description":"Who the party is.","anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]}},"required":["key","section","name"],"additionalProperties":false,"description":"The campaign (exactly one in a campaign draft)."},{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z]+:[a-z0-9][a-z0-9-]{0,59}$","description":"The prefix is the entity_type: npc:strahd, quest:find-the-heir."},"section":{"type":"string","const":"entity"},"scope":{"description":"world = part of the world, shared by every campaign in it; campaign (default) = this campaign only.","type":"string","enum":["world","campaign"]},"entity_type":{"type":"string","enum":["npc","location","quest","faction","event","note","lore","clock","front","item"],"description":"npc, location, quest, faction, event, note, lore, clock, front or item."},"name":{"type":"string","minLength":1,"maxLength":100,"description":"The entity's name."},"summary":{"description":"One or two sentences.","anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"full_description":{"description":"The full description.","anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"gm_notes":{"description":"GM only notes.","anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"secret":{"description":"GM only: the entity's secret.","anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"motivation":{"description":"What it wants.","anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"is_public":{"description":"true = the players see it in their lore.","type":"boolean"},"fields":{"description":"Typed fields of the entity_type (see the docs). References to other entities are keys: giverEntityId, leaderEntityId, locationEntityId, participantIds.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"relations":{"description":"Links from this entity.","maxItems":100,"type":"array","items":{"type":"object","properties":{"target":{"type":"string","pattern":"^[a-z]+:[a-z0-9][a-z0-9-]{0,59}$","description":"The key of the other entity."},"label":{"description":"What links them, e.g. rules, fears, owes money to.","anyOf":[{"type":"string","maxLength":80},{"type":"null"}]},"color":{"description":"An edge colour #rrggbb.","anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"null"}]}},"required":["target"],"additionalProperties":false}},"state":{"type":"object","properties":{"attitude":{"description":"hostile, ally, neutral, unknown, wary or friendly.","anyOf":[{"type":"string","enum":["hostile","ally","neutral","unknown","wary","friendly"]},{"type":"null"}]},"campaign_notes":{"description":"GM only: notes on this entity in this campaign.","anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"discovered":{"description":"Whether the party has met or found it.","type":"boolean"},"status":{"description":"active, dead, missing, destroyed or corrupted.","anyOf":[{"type":"string","enum":["active","dead","missing","destroyed","corrupted"]},{"type":"null"}]},"hidden":{"description":"true = hidden from the players in this campaign.","type":"boolean"},"tags":{"description":"Short labels for this campaign.","maxItems":100,"type":"array","items":{"type":"string","maxLength":100}},"priority":{"description":"pinned, normal or archived.","type":"string","enum":["pinned","normal","archived"]}},"additionalProperties":false,"description":"Only for a world entity in a campaign draft: its state in this campaign."}},"required":["key","section","entity_type","name"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z]+:[a-z0-9][a-z0-9-]{0,59}$","description":"session:<name>, e.g. session:1."},"section":{"type":"string","const":"session"},"number":{"type":"integer","minimum":-1000000,"maximum":1000000,"description":"The session's number; unique in the campaign."},"title":{"description":"The session's title.","anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"date_planned":{"description":"YYYY-MM-DD.","anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"date_played":{"description":"YYYY-MM-DD.","anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"status":{"description":"planned, played, skipped or canceled.","type":"string","enum":["planned","played","skipped","canceled"]},"recap":{"description":"What happened, for the GM.","anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"events_summary":{"description":"The session's events, in short.","anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"consequences":{"description":"What changed in the world.","anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"next_hooks":{"description":"Threads to pick up next time.","anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"prep_notes":{"description":"GM only: preparation.","anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"gm_notes":{"description":"GM only notes.","anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"player_visible_summary":{"description":"What the players may read.","anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]},"links":{"description":"Entities of the session.","maxItems":200,"type":"array","items":{"type":"object","properties":{"entity":{"type":"string","pattern":"^[a-z]+:[a-z0-9][a-z0-9-]{0,59}$","description":"The key of an entity of the session."},"role":{"description":"appeared, mentioned, changed, introduced, resolved or died.","type":"string","enum":["appeared","mentioned","changed","introduced","resolved","died"]},"note":{"description":"What happened to it in the session.","anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}},"required":["entity"],"additionalProperties":false}}},"required":["key","section","number"],"additionalProperties":false,"description":"A campaign session (campaign drafts only)."},{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z]+:[a-z0-9][a-z0-9-]{0,59}$","description":"scene:<name>, e.g. scene:arrival."},"section":{"type":"string","const":"scene"},"title":{"type":"string","minLength":1,"maxLength":120,"description":"The scene's title."},"summary":{"description":"What happens in it.","anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"status":{"description":"planned (default), current, done or skipped; one current at most.","type":"string","enum":["planned","current","done","skipped"]},"entities":{"description":"Keys of the entities in the scene.","maxItems":20,"type":"array","items":{"type":"string","pattern":"^[a-z]+:[a-z0-9][a-z0-9-]{0,59}$","description":"A stable key the AI chooses: prefix:name, e.g. npc:strahd, location:castle-ravenloft. Sending a part with the same key again replaces it."}},"transitions":{"description":"Where the story can go next.","maxItems":20,"type":"array","items":{"type":"object","properties":{"to":{"type":"string","pattern":"^[a-z]+:[a-z0-9][a-z0-9-]{0,59}$","description":"The key of the next scene."},"label":{"description":"What leads there.","anyOf":[{"type":"string","minLength":1,"maxLength":120},{"type":"null"}]}},"required":["to"],"additionalProperties":false}}},"required":["key","section","title"],"additionalProperties":false,"description":"A scene of the story graph (campaign drafts only)."},{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z]+:[a-z0-9][a-z0-9-]{0,59}$","description":"achievement:<name>."},"section":{"type":"string","const":"achievement"},"scope":{"description":"world = part of the world, shared by every campaign in it; campaign (default) = this campaign only.","type":"string","enum":["world","campaign"]},"title":{"type":"string","minLength":1,"maxLength":80,"description":"The achievement's title."},"description":{"description":"What earns it.","anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"icon":{"description":"One emoji.","anyOf":[{"type":"string","minLength":1,"maxLength":16},{"type":"null"}]},"is_public":{"description":"true = the players see it.","type":"boolean"}},"required":["key","section","title"],"additionalProperties":false}]},"description":"The world, the campaign, entities, sessions, scenes and achievements."}},"required":["kind","game","title","format","version","parts"],"additionalProperties":false}