> 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/convai-unreal-engine-plugin/features/narrative-design.md).

# 叙事设计

通过调用叙事触发器、注入模板键以及处理区段变化事件，从 Unreal Engine 驱动角色故事图。

叙事设计为 Convai 角色提供结构化的故事图谱——包含命名分区、命名触发器，以及可根据实时游戏数据调整目标的模板键。你可以在 Convai 控制面板中创建图谱；运行时， `UConvaiChatbotComponent` (`Convai Chatbot`）会调用触发器，并接收来自 Convai 的分区变更。

**刚接触叙事设计？** 先阅读 [叙事设计的工作原理](https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/features/narrative-design/how-narrative-design-works.md) ，了解分区、触发器和模板键。然后，在控制面板中为角色配置好图谱后，按照 [叙事设计快速入门](https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/features/narrative-design/narrative-design-quick-start.md) 进行操作。打开 Unreal Engine 之前，请使用 [叙事设计 | Playground](https://docs.convai.com/api-docs/zh/convai-playground/character-customization/narrative-design.md) 创建分区和触发器。

### 开始使用

<table data-view="cards"><thead><tr><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>叙事设计的工作原理</strong><br>了解分区、触发器、模板键，以及从调用触发器到触发分区事件的运行时流程。</td><td><a href="https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/features/narrative-design/how-narrative-design-works.md">叙事设计的工作原理</a></td></tr><tr><td><strong>叙事设计快速入门</strong><br>从 Blueprint 调用命名触发器，并通过打印新的分区 ID 确认分区已变更。</td><td><a href="https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/features/narrative-design/narrative-design-quick-start.md">叙事设计快速开始</a></td></tr></tbody></table>

### 构建与配置

<table data-view="cards"><thead><tr><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>叙事触发器</strong><br>使用 <code>Invoke Narrative Design Trigger</code> 执行命名图谱转换，使用 <code>Invoke Speech</code> 处理动态上下文事件。</td><td><a href="https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/features/narrative-design/narrative-triggers.md">叙事触发器</a></td></tr><tr><td><strong>模板键</strong><br>填充 <code>Narrative Template Keys</code> 映射，让分区目标引用实时游戏数据。</td><td><a href="https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/features/narrative-design/template-keys.md">模板键</a></td></tr><tr><td><strong>获取叙事数据</strong><br>运行时，使用以下节点查询角色的分区和触发器： <code>Convai Fetch Narrative Sections</code> 和 <code>Convai Fetch Narrative Triggers</code>.</td><td><a href="https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/features/narrative-design/fetching-narrative-data.md">获取叙事数据</a></td></tr></tbody></table>

### 参考与支持

<table data-view="cards"><thead><tr><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>叙事设计 Blueprint 参考</strong><br>Blueprint 函数、事件、属性、异步获取节点和叙事结构体参考。</td><td><a href="https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/features/narrative-design/narrative-design-blueprint-reference.md">叙事设计 Blueprint 参考</a></td></tr><tr><td><strong>叙事设计用法示例</strong><br>包含线性进度、动态上下文事件、模板键和触发器验证的 Blueprint 实例教程。</td><td><a href="https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/features/narrative-design/narrative-design-usage-examples.md">叙事设计使用示例</a></td></tr><tr><td><strong>叙事设计故障排除</strong><br>解决分区事件未触发、转换错误、模板键被忽略、获取失败以及会话未就绪等问题。</td><td><a href="https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/features/narrative-design/troubleshoot-narrative-design.md">排查叙事设计问题</a></td></tr></tbody></table>

### 后续步骤

{% content-ref url="/pages/fc5915683cbb3a9ae3782e4de53c3288e9e3b7cc" %}
[叙事设计快速开始](https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/features/narrative-design/narrative-design-quick-start.md)
{% endcontent-ref %}

{% content-ref url="/pages/55f4d0a125ab988f4603436fa20ceb69b527078d" %}
[叙事设计](https://docs.convai.com/api-docs/zh/convai-playground/character-customization/narrative-design.md)
{% endcontent-ref %}


---

# 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/convai-unreal-engine-plugin/features/narrative-design.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.
