diff --git a/63.md b/63.md index 8d145c0..c6e192b 100644 --- a/63.md +++ b/63.md @@ -6,22 +6,28 @@ Build Your Own Adventure `draft` `optional` -This NIP introduces `kind:296` and `kind:297` as text-based notes designed to create interactive stories. These notes include options for navigating to subsequent notes, allowing readers to continue exploring the story. `Kind:296` serves as the root event for the story, while `kind:297` represents individual scenes within the narrative. +This NIP introduces `kind:296` and `kind:297` as text-based notes designed to create interactive stories. These notes include options for navigating to subsequent notes, allowing readers to continue exploring the story. `Kind:296` serves as starting events for the reader, while `kind:297` represents individual scenes within the narrative. The idea is to emulate "choose your own adventure" books, where each reader's journey through the story is unique. -Story events can include an optional `title` tag and multiple `option` tags that point to the next possible scenes. +Scene events MAY include an optional `title` tag and multiple `option` tags that point to the next possible scenes. Clients SHOULD render the options in a way that allows users to select and seamlessly navigate to the corresponding posts. -### Example for kind:296 (Root Scene) +### Example for kind:296 (Prologue) + +Prologue events are entry points in the story. + +They SHOULD contain `title`, `summary` and `image` to help clients render a preview of the story. ```jsonc { "kind": 296, "content": "", "tags": [ - ["title", ""], + ["title", ""], + ["summary", ""], + ["image", ""], ["option", "", "", ""], ["option", "", "", ""], @@ -32,12 +38,14 @@ Clients SHOULD render the options in a way that allows users to select and seaml ### Example for kind:297 (Scene) +Scenes describe a given point in a story with potential options. + ```jsonc { "kind": 297, - "content": "", + "content": "", "tags": [ - ["title", ""], + ["title", ""], ["option", "", "", ""], ["option", "", "", ""], @@ -48,4 +56,35 @@ Clients SHOULD render the options in a way that allows users to select and seaml The story concludes when no `option` tags are present. -The `.content` field SHOULD follow the same formatting rules as `kind:1`. \ No newline at end of file +The `.content` field SHOULD follow the same formatting rules as `kind:1`. + +## Reading State + +Kind `30296` stores the latest state of the story. + +The `d` tag of the replaceable event MUST match the root event's id. + +The `e` tag points to the latest scene the user has read. + +```jsonc +{ + "kind": 30296, + "tags": [ + ["d", ""], + + // cached to simplify preview purposes + ["title", ""], + ["summary", ""], + ["image", ""], + + // root with relay hint + ["E", "", ""], + + // current scene with relay hint + ["e", "", ""], + + // reading status + ["status", ""] + ] +} +``` \ No newline at end of file