
Interactive NPC system with dialogues for Minecraft 1.21.9+
Interactive NPC system with dialogues for Minecraft 1.21.9+
NPC Engine is a data pack for creating NPCs with a dialogue system, response options, and a cinematic camera.
minecraft:mannequin with custom skinsnpcs-engine folder in your world's datapacks/reload/function _npsc:open
| Item | Description |
|---|---|
| 📝 Create NPC | Create a new NPC |
| 📋 List | View all NPCs |
| 💬 Dialogues | Dialogue Editor |
| 🎬 Dialogue Test | Run a Dialogue Test |
| ❌ Exit | Close Editor |
# Create a mannequin NPC
function npcs:npc/create_player
# Create an NPC entity
function npcs:npc/create_entity
# Add a dialogue line
function npcs:dialog/editor/add_line {npc_id:1,text:"Hello, traveler!"}
# Add a choice
function npcs:dialog/editor/add_choice {npc_id:1,text:"Where shall we go?",choices:["North","South"]}
# Start a dialogue programmatically
function npcs:dialog/start_play
npcs:data — NPC and dialogue datanpcs:current_dialog — currently active dialogue# 1. Create an NPC
function npcs:npc/create_player
# 2. Add dialogues (npc_id = 1)
function npcs:dialog/editor/add_line {npc_id:1,text:"Greetings, hero!"}
function npcs:dialog/editor/add_line {npc_id:1,text:"I have something for you" task."}
function npcs:dialog/editor/add_choice {npc_id:1,text:"Will you accept it?",choices:["Of course!","Not now"]}
Create living worlds with the NPC Engine! 💬✨