RPG Dialogue
Written conversations for Minecraft NPCs, driven entirely by datapacks. No Java needed for a modpack, one line for a mod.
A panel rises, somebody speaks a line at a time, and the player answers. Every word of it, and everything it does about the world, is a datapack file, so a modpack needs no Java and a mod needs one line of it.
Installing this on its own does nothing
RPG Dialogue is a library. No items, no changed vanilla behaviour, nothing in front of a player until a pack asks for it. The one exception is the bundled example, which is on by default.
At the panel
What the player presses, once a conversation is open.
| Key | What it does |
|---|---|
| 1–5 | Says the answer the digit is drawn beside. |
| ↑ ↓, W S | Moves between answers. Whatever the player has walking bound to, not W and S as such. |
| Wheel | The same, and it carries a long list along with it. |
| Enter, Space | Finishes the line, then turns the page or says the lit answer. |
| Escape | Leaves, if the conversation allows it. See dismissible. |
| Click | Anywhere finishes the line; on an answer, says it. |
Pointing at an item named in the text shows its tooltip.
Under a resource pack
The panel is cut out of the inventory texture, so it matches whatever resource pack the player runs. To do that it needs a plain, solid patch of the inventory's background, which vanilla has just right of the player's figure. If that spot is see-through in a pack, or lands on a line or busy artwork instead, the panel uses its own texture, which looks like vanilla's. This is checked every time resource packs are reloaded, and the game log says so whenever the panel is not cut from the inventory.
The text colours follow the panel. Under a pack that draws it dark, dark text is lightened until it is readable again.
Players have the last word
No check like that is right for every pack, so config/rpg_dialogue.properties can overrule it. Set panel_texture to inventory to always use the inventory texture, or to own to always use the mod's own. The default is auto. A change takes effect on the next resource reload (F3+T).
For resource pack authors
Draw assets/rpg_dialogue/textures/gui/panel.png and the panel uses it, whatever your inventory looks like. It is 64×32, or any multiple of that for an HD pack:
- A 32×32 panel at the top left. Its 5-pixel corners are used as they are. The column and row through its middle (x 16 and y 16) are stretched along the edges, and the pixel where they cross fills the whole inside.
- An 18×18 slot at (32, 0). Its 1-pixel edge goes round the speaker's portrait. Its inside is not used.
Installing
Minecraft 1.21.1, on either Fabric or NeoForge. There is one jar and it runs on both.
On Fabric, install Fabric API as well. It is the only dependency this mod has on either loader.
Drop the jar in mods/. On a server it belongs on the server; clients need it too, since the panel is drawn client-side.
The bundled example
Switched on when you install it: one talkative villager, a few things overheard, and lines for raiders. Every file is in the jar under data/rpg_dialogue_example/, to read as a worked example.
Right-click a villager and they will say one of six things, picked to suit the hour, your health, and how often you have bothered them already.
Turn it off in config/rpg_dialogue.properties, which the mod writes on first launch:
example_content=falseFor a modpack with its own dialogue, you need not bother
The example's speaker binding sits at priority -1000, so anything you write outranks it automatically.
Where to go next
Your first conversation
Two files, five minutes, no Java.
Dialogue files
Every field a dialogue can hold: pages, portrait, theme, choices.
Speaking to somebody
Bindings, the /dialogue command, and routing from code.
Actions
What a conversation can give, take, or do about the world.
Conditions
What has to hold before a line, a choice or a binding is used.
Values
Facts the world supplies as a line is spoken.
For mod developers
Depending on it, extending it, and every hook it offers.
