Building an NPC Dialogue System from Scratch
I built a branching NPC dialogue system for my game - head tracking, choice memory, inventory integration, and all the bugs that came with it.
The Challenge
I’ve been putting off building an NPC dialogue system for Scrapconomy because so much of the story is driven by dialogue. If this doesn’t work, the game could feel lifeless. So I finally sat down and tackled it head-on.
The Game Plan
My approach was to build a simple test level to validate all the core features I need. The scenario: talk to an NPC named Steve, insult him, apologize, and then he gives you a key to open his secret chest. It's a simple premise, but it tests everything. Talking, making choices, the NPC remembering those choices, and receiving objectives and items.
Building Steve
I modeled and texture-painted Steve in Blender, gave him a skeleton, and set up an idle animation through Mixamo. Then I used Blender’s custom properties system as a kind of data map. Godot reads those properties to find the NPC’s ID, locate their script folder, and load their dialogue script and voice files.
