> For the complete documentation index, see [llms.txt](https://docs.convai.com/api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/web-plugins/narrative-design-guide.md).

# 叙事设计指南

叙事设计——基于叙事的 Web 端 Convai NPC。

叙事设计是一种构建互动故事的方法，尤其适用于基于网页环境中的 convai 非玩家角色（NPC）。它采用一种基于图的系统，其中每个节点代表故事推进中的一个步骤。

## Convai Playground

1. 选择你想为其启用叙事设计的角色。
2. 在 convai playground 中打开叙事设计部分。\
   \ <img src="https://2402152281-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2Fdc9mGu8yVcQhXfpX1cCd%2Fimage.png?alt=media&amp;token=e2780e85-f3fa-4c49-b5b7-eda49b4831f8" alt="" data-size="original"><br>
3. 根据你的故事线创建叙事地图/图。下面展示的是一个示例。蓝色框表示触发器（用于在图中启动一条线），黑色框表示章节（你希望角色谈论的内容）。\
   ![](https://2402152281-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. 每个章节都有一个目标和决策。角色会根据 Objective 中写的内容进行发言/回应。你可以使用 `<speak>{你的对话}</speak>` 标签。\
   对于决策，添加消息作为上下文，说明角色可以如何自行决定转向哪个目标。你想要控制的部分可以通过下一部分中的 invokeTrigger 来实现。<br>

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/web-plugins/narrative-design-guide.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
