Compatibility
Minecraft: Java Edition
26.1.x
1.21.9โ1.21.11
Platforms
Links
Tags
Creators
Details
Licensed ARR
Published 6 months ago
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
- Mannequins โ NPCs based on
minecraft:mannequinwith custom skins - Other Entities โ Villagers, zombies, skeletons, etc.
- Interactivity โ Clicking on an NPC starts a dialogue
- Visual Editor โ Control via the action bar
Dialogues
- Typewriter Effect โ Smooth character-by-character typing
- Choice System โ Branching dialogues with multiple answer options
- Navigation โ Shift to skip to the next line
- Text Display โ Text is displayed above the NPC
Camera
- Cinematic Mode โ Automatically zooms in on the NPC
- Positioning โ The camera is positioned to the side of the NPC
- Smooth Transitions โ Blindness effect at the start/end Dialogue
- Restore โ automatically returns the player to their starting position
๐ Installation
- Place the
npcs-enginefolder in your world'sdatapacks - Run
/reload
๐ Usage
Open the Editor
/function _npsc:open
Editor Controls
- Mouse Wheel โ 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
# Create a mannequin NPC
function npcs:npc/create_player
# Create an NPC entity
function npcs:npc/create_entity
Dialogue Management
# 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
- Minecraft: 1.21.9+
- Permissions: Operator for editor commands
๐ฎ Example: Quest NPC
# 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! ๐ฌโจ


