Dialogs - MarkusBordihn/BOs-Easy-NPC GitHub Wiki
Dialogs are the main conversation system in Easy NPC. They can be simple text popups, yes/no choices, or larger dialog trees with multiple entries, conditions, and button actions.
These placeholders work in dialog text:
| Placeholder | Description |
|---|---|
@npc |
NPC name |
@initiator |
Player name |
Example:
Hello @initiator, my name is @npc.
Dialog text also supports the @score() macro:
| Macro | Description | Example |
|---|---|---|
@score(scoreboard_name) |
Shows the player's scoreboard value | You have @score(coins) coins. |
If the scoreboard or value does not exist, the shown value falls back to 0.
Dialog text supports the color and formatting placeholders shown below.

Common examples:
<red>Warning</red><gold><bold>Quest Complete</bold></gold><gray>Come back later.</gray>
Basic dialog is the fastest setup for short text. It is best for greetings, one-step hints, and simple information screens.

Yes/No dialog adds two buttons with separate actions. It works well for confirmations, quests, shop prompts, or simple branching.

Each button can have its own action list.

Advanced dialog supports multiple entries, multiple text variations, dialog buttons, conditions, and priorities.
If you expand a simpler dialog with extra entries or advanced button logic, it effectively becomes an advanced dialog setup.

The advanced dialog editor lets you manage:
- entry label
- default state
- dialog text
- button list
- conditions
- priority

Only one entry should normally act as the main automatic start point.
Dialog buttons can trigger multiple actions in order. This is where dialogs connect to commands, trading, and follow-up dialogs.

If no actions are defined, the button closes the dialog.

Each dialog button can have its own conditions, set via the Conditions button in the button editor. The same condition types as for actions are available (item, scoreboard, advancement, experience, health, tag, team, game mode, ...), combined with AND logic.
When a button's conditions are not met, the button is disabled and shown with a small lock icon; hovering it explains that the requirements are not yet met. The lock updates live for conditions the client can check itself (held/inventory items, XP level, health), so a "buy" button unlocks the moment the player has enough and re-locks after spending. The server always re-validates the conditions when the button is pressed, so a locked button can never be triggered.
This makes shop-style buttons straightforward, for example:
-
Buy 1 for 2 gold— requires 2minecraft:gold_ingotin the inventory -
Buy 10 for 1 diamond— requires 1minecraft:diamondin the inventory
Pair the condition with a matching action (e.g. a command that removes the cost and gives the item) so the purchase actually happens when the button is pressed.
Easy NPC automatically prefers entries such as:
defaultstartmain
You can also mark an entry as default in the editor.

Dialogs can be filtered and ordered with:
- conditions (all types listed under Actions › Conditions, including item conditions with a quantity, scoreboard, advancement, experience level, player health, tag, team and game mode)
- priority values
A dialog is only shown when all of its conditions match. This is useful when the same NPC should react differently depending on player progress.
Note: dialog conditions decide which dialog is shown, while button conditions (see Button Conditions) decide whether an individual button inside a dialog is enabled.
Examples:
- first visit greeting
- quest-ready dialog
- fallback small talk
- hidden dialog only opened by action or command
Current default priority groups in the code are:
Critical (100)High (10)Normal (5)Low (1)Fallback (0)Manual Only (-1)
Labels such as default, start, or welcome are treated as high-priority defaults by the
current code.
Labels such as main, help, or question default to normal priority.
Labels such as bye, idle, or thanks default to low priority.
Dialogs with priority Manual Only are never selected automatically and must be opened through an
action or command.
Open the current default dialog:
/easy_npc dialog open <NPC> <player>Open a specific dialog by label:
/easy_npc dialog open <NPC> <player> <dialog_uuid_or_label>Set a dialog priority:
/easy_npc dialog set priority <NPC> <dialog_uuid_or_label> <priority>The dialog screen uses normal texture assets and can be changed with a standard resource pack. The current background textures are:
assets/easy_npc/textures/gui/dialog/scene_small.pngassets/easy_npc/textures/gui/dialog/scene_medium.pngassets/easy_npc/textures/gui/dialog/scene_large.png
The dialog navigation and close buttons also use normal textures:
assets/easy_npc/textures/gui/navigation_button.pngassets/easy_npc/textures/gui/close_button.png
To change the look, place files with the same paths inside your resource pack and let them override the originals. You do not need to modify the mod jar.

Config UI backgrounds can be overridden in the same way with:
assets/easy_npc_config_ui/textures/gui/config_screen/background.pngassets/easy_npc_config_ui/textures/gui/config_screen/background_small.png
easy_npc:give_dirt_or_stone_to_playereasy_npc:professor_quiz
