Posted July 13, 2025 by Rottencone83 Builds
#devlog #unity #gamedev #tutorial #dialogue-system #rpg #narrative-design #scriptableobjects #c-sharp #free-code
When building dynamic game worlds, one of the fastest ways to break immersion is static NPC dialogue. Whether the player just wiped out a bandit camp or rescued the mayor’s daughter, most NPCs still say the same thing they said five hours ago.
A reactive world should remember the player—and respond accordingly.
That’s why I built Echo: Dynamic Dialogue & Faction System—a fully data-driven dialogue engine designed for Unity projects that need conversations to reflect player reputation, faction standing, and narrative weight.
This devlog breaks down how the system works and why it matters.
In most RPGs or open-world games, you’ll encounter a pattern:
Talk to an NPC before a quest: they say “Leave me alone.”
Complete a major mission: their response doesn’t change.
Join their faction? Save their family? Still no change.
This kind of interaction undercuts the player’s impact on the world. It feels fake—and worse, it feels like wasted potential.
Echo solves this using a modular system of ScriptableObjects, ranked faction reputation, and a singleton dialogue engine that controls the entire UI and logic flow.
Each dialogue node can have one or more ReputationCondition
objects attached to it, like this:
csharp CopyEdit [System.Serializable] public class ReputationCondition { public FactionDefinition requiredFaction; public ReputationRank requiredRank; }
When the player interacts with an NPC, the system checks their standing with relevant factions before deciding which dialogue options to show.
Before earning reputation:
Guard: “Halt! State your business.”
After helping the guard’s faction (reputation = Friendly):
Guard: “Good to see you again, friend. Thanks for your help.”
That’s a single condition switch. The rest is handled by the system automatically—no need for a tangle of if-statements or scene-specific logic.
Echo includes:
A FactionManager
singleton that tracks reputation with any number of factions
A ReputationRank
system to define what counts as Hostile, Neutral, Friendly, etc.
DialogueData assets built as flat, non-nested ScriptableObject trees for easier debugging
A UI controller (DialogueUI.cs
) that dynamically spawns response buttons and respects all conditions
A modular DialogueTrigger
component that supports multiple interaction modes (OnEnter, OnInteract, OnStart)
Everything is clean, separated, and scalable. No hidden state. No hardcoding.
Echo ships with:
Full C# source code (no DLLs, no obfuscation)
A ready-to-use demo scene
Pre-wired prefabs for UI and core managers
Sample dialogue assets and faction templates
A professionally written README with full setup instructions
If you want your NPCs to reflect the player’s progress...
If you’re tired of hardcoding branching dialogue trees...
If you want a system that just works with Unity’s UI and data workflows...
This is it.
Echo: Dynamic Dialogue & Faction System
Now available on Itch.io.
Download or view the system here