# Narrative Design Guide

Narrative design is a method of structuring interactive stories, particularly for convai non-player characters (NPCs) in web-based environments. It utilizes a graph-based system where each node represents a step in the story progression.

## Convai Playground

1. Select your Character in which you want to enable Narrative Design.
2. Open Narrative Design section in convai playground.\
   \ <img src="https://413558230-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2FbIKjRfIp5XpiDtYtmkaY%2Fimage.png?alt=media&#x26;token=bc4296ac-c4ba-4c81-be0c-419625a26a9f" alt="" data-size="original"><br>
3. According to your storyline create a narrative map/graph. Shown bellow is an example. The blue boxes represent triggers (used to initiate a line in the graph) and the black boxes represent sections (what you want the character to speak about). \
   ![](https://413558230-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2FfaSJpTOp4xG3KGxuWTlV%2Fimage.png?alt=media\&token=6995e83d-c7f3-4be6-a1b3-fffdd396c7a7)<br>
4. Each section has an objective and decisions. Based on whats written in Objective the character would speak/respond. You can give the character exact dialogues using `<speak>{your dialogue}</speak>` tags.\
   For decisions add messages as context on how the character can decide on which objective to move to own its own. The once you want to control can be through invokeTrigger in the next section.<br>

   <figure><img src="https://413558230-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2FrGsRSTjcRc4VIsZdjrxJ%2FScreenshot%20(114).png?alt=media&#x26;token=96ff7028-82ce-4989-870a-6629d68de757" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/narrative-design-guide.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
