---
title: Memory System
description: "The **Memory System** is a lightweight, tag-driven state layer that lets characters, quests, dialogue, map markers, and world logic remember past events and decisions. For shared setup guidance, see the [Migration Guide](/docs/getting-started/migrate-and-integrate-hyper/) and [Integration Guide](/docs/getting-started/migrate-and-integrate-hyper/). Use the [System Atlas](/docs/system-atlas/) to…"
url: "https://gamesbyhyper.com/docs/exploration-and-narrative/memory-system/"
updated: "2026-05-25"
category: Exploration and Narrative
---

# Memory System

The **Memory System** is a lightweight, tag-driven state layer that lets characters, quests, dialogue, map markers, and world logic remember past events and decisions.

For shared setup guidance, see the [Migration Guide](/docs/getting-started/migrate-and-integrate-hyper/) and [Integration Guide](/docs/getting-started/migrate-and-integrate-hyper/). Use the [System Atlas](/docs/system-atlas/) to look up functions, variables, events, components, and ownership references. Use this page for Memory System-specific structures, integrations, and Blueprint functions.

**Related setup:** [Set Up First Narrative](/docs/getting-started/set-up-first-narrative/).

Each actor with a **Memory Component** keeps its own record of gameplay tags. Memories can be added, removed, and queried at runtime so other systems can react to what has happened before.

# Related Videos

Some videos may have been recorded before V4. The same principles still apply, but asset names, component names, and folder locations may differ. Treat the current written documentation and V4 names as the source of truth.

- Add Dialogues, Voices, Subtitles, and Conversations Walkthrough
  [Add Dialogues, Voices, Subtitles, and Conversations Walkthrough](https://www.youtube-nocookie.com/embed/4wfTLZ5E_SE?rel=0&modestbranding=1)

# Memory Structures

## Memory Context

**Memory Context** defines which memories must exist and which memories must not exist before a dialogue line, quest stage, NPC reaction, map marker, or other gameplay element is valid.

| Field | Type | Purpose | Examples |
| --- | --- | --- | --- |
| **Has these memories** | Gameplay Tag Container | All listed memories must exist before the action or dialogue can proceed. | **Memory.Dialogue.HelpedVillager**, **Memory.Quest.Completed.BanditCamp**, **Memory.Trait.KnownMerchant** |
| **Cannot Have These Memories** | Gameplay Tag Container | None of the listed memories may exist. If any are present, the event, dialogue, or quest stage is blocked or skipped. | **Memory.Dialogue.GoodbyeSaid**, **Memory.Quest.Failed.Tutorial**, **Memory.Relationship.Betrayed** |

## Memory Map Marker

**Memory Map Marker** links remembered events to map or world markers. This lets discovered locations, completed objectives, or story moments affect what the player sees on the map.

| Field | Type | Purpose | Examples |
| --- | --- | --- | --- |
| **Marker Tag** | Gameplay Tag | Unique identifier for the marker linked to the memory. | **Marker.Discovered.ForestCave**, **Marker.Quest.BanditCamp**, **Marker.Story.PastEvent** |
| **Map Element** | Struct Map Element | Visual, positional, and functional data for the map marker. | Discovery icons, travel points, world beacons, NPC markers, and event markers. |

# System Integrations

The Memory System is system-agnostic. It is already used by systems such as Dialogue and Quest logic, but the same pattern can be applied to combat, exploration, map markers, tutorials, factions, or any other runtime state that benefits from tag-based memory.

## Dialogue System

The Dialogue System uses the Memory Component for context-aware conversations. Before a dialogue option or sentence is shown, the system can check **Has These Memories** and **Cannot Have These Memories** through **F_Dialogue_Option_Condition** and **F_Memory_Context**.

- **HasTheseMemories: Memory.Quest.Completed.RebuildVillage** can unlock friendly follow-up dialogue.
- **CannotHaveTheseMemories: Memory.Dialogue.BetrayedNPC** can block cooperative responses.

Dialogue outcomes can also add or remove memory tags through **F_Dialogue_EventTrigger**. For example, a persuasion line can add **Memory.Dialogue.HelpedVillager**, while an aggressive response can add **Memory.Relationship.Hostile**.

Predefined sentences can use memory conditions too, which prevents repeated or contradictory lines and makes NPCs react to earlier events.

Players and NPCs can keep separate Memory Components. That allows asymmetric knowledge: an NPC can remember that the player lied, while the player can remember that they spared the bandits.

![Player and NPC Memory Separation screenshot](/wp-content/uploads/docs/Exploration%20and%20Narrative/Memory%20System/memory-system-player-and-npc-memory-separation-screenshot-001.png)

Memory variables for dialogue options are configured under the option index.

## Quest System

The Quest System can grant memories as rewards. This records achievements, quest outcomes, and world-changing events in a way that other systems can query later.

**Location:** Stage Rewards > Reward Type: Memory

Example:

- **RewardType:** Memory
- **Reward:** Memory.Saved.NPCMan

After the memory is granted, other systems can use it to unlock dialogue branches, change NPC behavior, reveal or remove map markers, or unlock new quests.

1. The player completes **Save the Lost Villager**.
2. The quest grants **Memory.Saved.NPCMan**.
3. The Dialogue System detects the memory.
4. The villager now greets the player gratefully, and related world logic can react.

![Purpose and Benefits screenshot](/wp-content/uploads/docs/Exploration%20and%20Narrative/Memory%20System/memory-system-purpose-and-benefits-screenshot-002.png)

# Adding and Removing Memories

Adding and removing memories is how the world records that something happened, or clears a state when circumstances change. Any system can update memories at runtime through Blueprint events, overlaps, triggers, quest rewards, dialogue outcomes, or event bindings.

## Event Binding Example

Event bindings are reactive. They let the Memory System listen for events such as damage, theft, discovery, or injuries and record them as memories.

For example, when an NPC is damaged, the system can check who caused the damage. If the player caused it, a tag such as **Memory.AttackedByPlayer** can be added to that NPC or faction.

![Example 1 - Event Binding (Damage Memory Trigger) screenshot](/wp-content/uploads/docs/Exploration%20and%20Narrative/Memory%20System/memory-system-example-1-event-binding-damage-memory-trigger-screenshot-003.png)

When creating your own bindings in **AC_Memory**, add the binding under **Bind all event listeners**.

![Example 1 - Event Binding (Damage Memory Trigger) screenshot](/wp-content/uploads/docs/Exploration%20and%20Narrative/Memory%20System/memory-system-example-1-event-binding-damage-memory-trigger-screenshot-004.png)

## Overlap Trigger Example

Overlap triggers are proactive. They let designers mark world states when the player enters or leaves an area.

- Entering a restricted zone can add **Memory.InRestrictedArea**.
- Leaving the zone can remove **Memory.InRestrictedArea**.
- Discovery volumes can add landmark, tutorial, safe-zone, or story memories.

# Important Functions

| Function | Purpose | Common Use |
| --- | --- | --- |
| **Add Memory** | Adds a Gameplay Tag to the target Memory Component. Adding the same tag twice is safe. | Quest outcomes, dialogue outcomes, discoveries, attacks, tutorials, and temporary states such as **Memory.InCombat**. |
| **Remove Memory** | Removes a Gameplay Tag from the component. | Clearing temporary or mutually exclusive states, leaving zones, ending combat, or resetting repeatable content. |
| **Has Memory** | Checks whether the component contains a memory tag. | Fast gates for UI, AI, dialogue, quests, map logic, vendor discounts, and greeting variants. |
| **Matches Memory Context** | Validates a full Memory Context by checking required memories and blocked memories. | Data-driven branching in dialogue options, quest availability, map marker visibility, and scripted sequences. |

![Add Memory screenshot](/wp-content/uploads/docs/Exploration%20and%20Narrative/Memory%20System/memory-system-add-memory-screenshot-005.png)

![Remove Memory screenshot](/wp-content/uploads/docs/Exploration%20and%20Narrative/Memory%20System/memory-system-remove-memory-screenshot-006.png)

![Has Memory screenshot](/wp-content/uploads/docs/Exploration%20and%20Narrative/Memory%20System/memory-system-has-memory-screenshot-007.png)

![Matches Memory Context screenshot](/wp-content/uploads/docs/Exploration%20and%20Narrative/Memory%20System/memory-system-matches-memory-context-screenshot-008.png)
