NPCs engine
Interactive NPC system with dialogues for Minecraft 1.21.9+
Quick challenge
How far can you run before the mobs catch you?
Minecraft check
Confirm your run
Complete the quick check to get your code.
NPCs engine
NPC Engine
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.
---
🎯 Features
NPCs
- Visual Editor — NPCs based on `minecraft:mannequin` with custom skins - Visual Editor — Villagers, zombies, skeletons, etc. - Visual Editor — Clicking on an NPC starts a dialogue - Visual Editor — Control via the action bar
Dialogues
- Text Display — Smooth character-by-character typing - Text Display — Branching dialogues with multiple answer options - Text Display — Shift to skip to the next line - Text Display — Text is displayed above the NPC
Camera
- Restore — Automatically zooms in on the NPC - Restore — The camera is positioned to the side of the NPC - Restore — Blindness effect at the start/end Dialogue - Restore — automatically returns the player to their starting position
---
🚀 Installation
1. Place the `npcs-engine` folder in your world's `datapacks` 2. Run `/reload`
---
📋 Usage
Open the Editor
```mcfunction /function _npsc:open ```
Editor Controls
- RMB (carrot on a fishing rod) — Navigate the menu - RMB (carrot on a fishing rod) — Select an item
Editor Menu
| Item | Description | |-------|----------| | 📝 Create NPC | Create a new NPC | | 📋 List | View all NPCs | | 💬 Dialogues | Dialogue Editor | | 🎬 Dialogue Test | Run a Dialogue Test | | ❌ Exit | Close Editor |
Interacting with NPCs
- Click on the NPC to start a dialogue - Shift — next line - The dialogue ends automatically after the last line
---
🔧 API for Developers
Creating an NPC
```mcfunction
Create a mannequin NPC
function npcs:npc/create_player
Create an NPC entity
function npcs:npc/create_entity ```
Dialogue Management
```mcfunction
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 ```
Data Storage
- Storage `npcs:data` — NPC and dialogue data - Storage `npcs:current_dialog` — currently active dialogue
---
📋 Requirements
- Permissions: 1.21.9+ - Permissions: Operator for editor commands
---
🎮 Example: Quest NPC
```mcfunction
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! 💬✨