# Narrative Design Keys

We will create a simple scenario where the character welcomes the player and asks them about their evening or morning based on the player's time of day.

1. In the playground, enable Narrative Design on your character and change the starting section name to `Welcome`.<br>

2. Add the following to the Objective field of the Welcome section:\
   `The time of day currently is {TimeOfDay}. Welcome the player and ask him how his {TimeOfDay} is going.` \
   \
   Notice that by adding any string between curly brackets it becomes a variable, and what we did here is adding the time of day as a variable, then from Unreal we can pass either the word "Morning" or "Evening" and the character will respond accordingly.

   <figure><img src="/files/vhnG71djAHbuhYrl2MtK" alt=""><figcaption><p><br></p></figcaption></figure>

3. Back in Unreal, open the character's blueprint.<br>

4. Set the `Narrative Template Keys` variable with a map containing the same variable name `TimeOfDay` and for demonstration purposes we will hard code the value to "Morning".<br>

   <figure><img src="/files/Hmb79fb84uXW6hcmRNQs" alt=""><figcaption><p><br></p></figcaption></figure>

5. Start the play mode and try it out.<br>

   <figure><img src="/files/5fxdMntaHLHTv1lWn7zN" alt=""><figcaption></figcaption></figure>

6. Feel free to try other scenarios and settings to align better with your usecase.

{% hint style="info" %}

* You can use the narrative design keys feature in both sections and triggers.
* Make sure the variable names are between curly brackets and has no spaces in between.
* You can dynamically set, change or clear the narrative keys in Unreal blueprints.
  {% endhint %}


---

# 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/unreal-engine/guides/narrative-design/narrative-design-keys.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.
