Immersive Dialogs
作者:Stormzee
Turn any entity into a talking NPC! Works for both vanilla and custom mobs!
介绍
中文介绍正在准备中,下面暂时显示原文。
What it does:
- Right-click to talk — Dialogs trigger when a player right-clicks the entity.
- Works on custom entities — Attach a dialog to any mob, including ones with custom names, NBT, and data. The entity’s normal right-click behavior (like villager trading) is automatically suppressed so the dialog always takes priority.
- Lines, your way — Add, insert, reorder, recolor, edit, and remove lines freely. Color a whole line, a single word, or set a default color for new lines.
- Mention the player — Drop the clicking player’s name right into a line (e.g. “Welcome, Steve!”).
- Named speakers — Give the talker a name with its own color (no forced bold).
- Timed pacing — A configurable delay between lines (default 3 seconds) makes conversations feel natural. The entity locks during playback so it can’t be spam-clicked.
- Audible dialogs — Attach a sound or a group of sounds; one plays at random with each line.
- Broadcast range — Keep a dialog private to the clicker, or set a range so nearby players all see it.
- Play-once dialogs — Mark a dialog to play fully just once; afterward, clicking only replays the final line. Reset it anytime to play in full again.
- Full command-block control — Lock and unlock dialogs, swap an entity’s current dialog for a new one, force-play to a player, and react to completion.
Commands (Examples):
Lines
/function dialog:create {id:"elder"}— make an empty dialog/function dialog:add_line {id:"elder",text:"Hello, traveller!"}— add a line/function dialog:add_mention {id:"elder",before:"Welcome, ",after:"!"}— line naming the clicker/function dialog:add_line_raw {id:"elder",json:'{"text":"Hi "}'}— add a raw text component/function dialog:insert_line {id:"elder",index:0,text:"Wait!"}— insert at a position/function dialog:set_text {id:"elder",index:0,text:"New text"}— change a line’s text/function dialog:set_color {id:"elder",index:0,color:"gold"}— color one line/function dialog:color_word {id:"elder",index:0,before:"Beware the ",word:"dragon",after:".",color:"red"}— color one word/function dialog:set_default_color {id:"elder",color:"green"}— color new lines/function dialog:move_line {id:"elder",from:2,to:0}— reorder a line/function dialog:remove_line {id:"elder",index:2}— delete one line/function dialog:clear_lines {id:"elder"}— delete all lines
Speaker name
/function dialog:set_name {id:"elder",name:"Elder Marn"}— set the name/function dialog:set_name_color {id:"elder",color:"aqua"}— color the name/function dialog:clear_name {id:"elder"}— remove the name
Sounds
/function dialog:add_sound {id:"elder",sound:"entity.villager.ambient"}— add a sound (random per line)/function dialog:clear_sounds {id:"elder"}— remove all sounds
Playback
/function dialog:set_range {id:"elder",range:16}— who hears it (0 = clicker)/function dialog:set_delay {id:"elder",ticks:60}— ticks between lines/function dialog:set_once {id:"elder",value:1}— play fully only once/function dialog:reset_dialog {id:"elder"}— let it play fully again
Entities (run as the target)
/execute as @e[type=villager,limit=1,sort=nearest] run function dialog:attach {id:"elder"}— give an entity a dialog/execute as @e[tag=boss] run function dialog:resize {width:3.0,height:4.0}— resize the hitbox/execute as @e[type=villager,limit=1,sort=nearest] run function dialog:detach— remove its dialog
Flow & triggers
/function dialog:unlock {id:"quest_start"}— allow a dialog to play/function dialog:lock {id:"quest_start"}— stop a dialog playing/execute as @e[tag=elder] run function dialog:switch {id:"greeting"}— swap an entity’s dialog/execute if data storage dialog:data Finished.intro run say The intro dialog finished!— run something when a dialog ends/execute as @p at @s run function dialog:play {id:"elder"}— force-play to a player
Utility
/function dialog:list— list all dialogs/function dialog:info {id:"elder"}— view a dialog’s lines/function dialog:delete {id:"elder"}— delete a dialog/function dialog:help— show the in-game command list
Compatibility
100% vanilla — no mods, no resource pack required.
Built for Minecraft 1.26.3 (data pack format 121).
Server-side: works in single-player and on multiplayer servers. Only the world owner / an operator (or cheats enabled) needs permission to run the management commands.
KEY NOTE FOR NON-DEV’s:
An index ALWAYS starts at 0, meaing dialog line 1 is saved under index: 0
常见问题
Immersive Dialogs 支持哪些 Minecraft 版本?
Immersive Dialogs 支持 Minecraft Java 版 26.3。下载时注意选择和你游戏版本一致的文件。
Immersive Dialogs 怎么安装?
新建世界时在「数据包」里把下载的 .zip 拖进去;已有的存档,把文件放进存档目录下的 datapacks 文件夹,进游戏输入 /reload 即可生效。服务器同样放在世界目录的 datapacks 里。
评论
登录后评论和评分