> 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).

# Narrative Design 指南

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

## Convai Playground

1. 选择你想启用叙事设计的角色。
2. 在 convai playground 中打开叙事设计部分。\
   \ <img src="/files/688173eccba5a20b6895156fcf8b27a7090cdff5" alt="" data-size="original"><br>
3. 根据你的故事线创建一张叙事地图/图。下面显示的是一个示例。蓝色方框代表触发器（用于在图中发起一条线路），黑色方框代表章节（你希望角色谈论的内容）。\
   ![](/files/b14ef471887a99d16c5f6e8725ba4114aaaee130)<br>
4. 每个章节都有一个目标和决策。基于目标中写的内容，角色会进行说话/回应。你可以使用以下方式给角色精确台词 `<speak>{your dialogue}</speak>` 标签。\
   对于决策，添加消息作为上下文，说明角色如何自行决定切换到哪个目标。你想控制的那些，可以通过下一部分中的 invokeTrigger 来实现。<br>

   <figure><img src="/files/3006c0501b6ad4269894db53292f91009118163f" 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 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/zh/cha-jian-yu-ji-cheng/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.
