Skip to content

Latest commit

 

History

History
92 lines (76 loc) · 1.12 KB

TemplateSchemas.md

File metadata and controls

92 lines (76 loc) · 1.12 KB

Template Schema

Template files used by QuestWeaver use a JSON notation. This document shows how the template files for the quests and stories are structured.

Quest Template Files

<Document Content> =

{
  "parent": String,
  "key": String,
  "mandatory": [
    String
  ],
  "optional": [
    String
  ],
  "titles": [
    String
  ],
  "descriptions": [
    Description
  ],
  "objectives": [
    String
  ]
}

<String> = any valid JSON string (e.g. "Foo")

<Description>=

{
  "conditions": [
    String
  ],
  "text": String
}

Story Template Files

<Document Content> =

[
  Story
]

<String> = any valid JSON string (e.g. "Foo")

<Story>=

{
  "key": String,
  "required": [
    String
  ],
  "text": String
}

The "text" String has the following form:

Word word [mandatoryNugget] word [Nugget|NuggetOption:id] word {optionalNugget:id}

Story Nugget Files

<Document Content> =

[
  Nugget
]

<String> = any valid JSON string (e.g. "Foo")

<Nugget>=

{
  "key": String>
  "requiredTypes": [
    String
  ],
  "texts": [
    String
  ]
}