#
Configuration
Here is an example Dialogue configuration:
npc: 11
sound: BLOCK_WOOD_BREAK
actions:
- "say: Hi! Welcome to the island, it looks like you might be lost..."
- "say: ...I think I might be able to help you!"
- "sound: ENTITY_EXPERIENCE_ORB_PICKUP"
- "cmd: /eco give %player% 1000"
- "say: You will need money in order to survive..."
- "say: Now let's bring you to your new home"
- "cmdp: /is home"
The sound
option is the sound that will be played when the letters are being written. (Optional)
The npc
option refers to a Citizens NPC ID, when the NPC is right-clicked the dialogue will start. (Optional)
The actions
option is a list of actions that will be part of the dialogue.
Placeholders
The say
action supports only PlaceholderAPI (PAPI) placeholders, BetterDialogues does not provide any placeholder for this action.
The cmd
action supports only the built-in %player%
placeholder. PAPI is not supported.
#
Example Dialogue Flow
The only instruction that waits for the player input is the say
option, the others will just run until the next say
option or until the end of the dialogue is reached.
This would be the dialogue flow for the given example:
Sends
Hi! Welcome to the island, it looks like you might be lost...
to the user letter by letter and waits for the F key.Sends
...I think I might be able to help you!
to the user letter by letter and waits for the F key.Plays the sound
ENTITY_EXPERIENCE_ORB_PICKUP
and continues to the next action.Runs the command
/eco give %player% 1000
as the console and continues to the next action.Sends
You will need money in order to survive...
to the user letter by letter and waits for the F key.Sends
Now let's bring you to your new home
to the user letter by letter and waits for the F key.Runs the command
/is home
as the player and continues to the next action.(end)
As you can see, with those simple instructions you can make your server a lot more attractive to players due to the added life you can bring to your NPCs.
The slash (/
) in the commands for the cmd
and cmdp
instructions is optional.