On this page

astrochili/narrator/narrator.narrator

The Ink language parser and runtime implementation in Lua

  • GitHub: astrochili/narrator — pinned to 2fe3aed
    1. Pick a release from astrochili/narrator releases and add its Source code (zip) URL (or a packaged .zip asset, if the library ships one) to game.project under [project] dependencies, then Fetch Libraries in the Defold editor.
    2. Run bunx @defold-typescript/cli resolve to materialize its types.
    3. Import it under a namespace alias of your choice:
      import * as narrator from "narrator.narrator"

Functions

parse_file(this: void, path: string, params?: { save?: boolean; }): Book

Parameters

  • this: void
  • path: string
  • params?: { save?: boolean; }
    • save?: boolean

Returns

  • Book

parse_content(this: void, content: string, inclusions?: string[]): Book

Parameters

  • this: void
  • content: string
  • inclusions?: string[]

Returns

  • Book

init_story(this: void, book: Book): Story

Parameters

  • this: void
  • book: Book

Returns

  • Story