Yarn Spinner Format
How Dialogue Forge exports to Yarn Spinner for Unreal Engine
Yarn Spinner Format
Dialogue Forge exports to Yarn Spinner's .yarn format, which can be used directly in Unreal Engine with the Yarn Spinner plugin.
Basic Syntax
Yarn
title: Start
---
Stranger: You find yourself at a crossroads.
Stranger: What brings you here?
-> I seek treasure
<<jump TreasurePath>>
-> I seek knowledge
<<jump KnowledgePath>>
-> None of your business
<<set $hostile = true>>
<<jump HostilePath>>
===Node Structure
Each dialogue node becomes a Yarn node:
Yarn
title: NodeId
---
// Content goes here
===Variables (Memory Flags)
Set variables when choices are made:
Yarn
-> Accept the quest
<<set $quest_accepted = true>>
<<jump QuestStart>>Check variables for conditional choices:
Yarn
<<if $has_key>>
-> Use the key to unlock the door
<<jump UnlockedDoor>>
<<endif>>
<<if $gold >= 100>>
-> Bribe the guard (100 gold)
<<set $gold -= 100>>
<<jump BribedGuard>>
<<endif>>Visited Tracking
Yarn Spinner tracks visited nodes automatically:
Yarn
<<if visited("MetTheStranger")>>
Stranger: We meet again, traveler.
<<else>>
Stranger: A new face in these parts.
<<endif>>Export from Dialogue Forge
- Build your dialogue in the graph editor
- Click Export → Yarn Spinner (.yarn)
- Import the
.yarnfile into Unreal Engine
Import to Dialogue Forge
- Click Import → Yarn Spinner (.yarn)
- Select your
.yarnfile - Nodes appear in the graph editor
Unreal Engine Integration
The Yarn Spinner Unreal plugin provides:
- Blueprint nodes for running dialogues
- Variable storage integration
- Custom commands for game logic
- Localization support
See Yarn Spinner Unreal Docs for setup.