Dialogue Actions
Message Action
| Blocking | Skippable |
|---|---|
| ✅ | ✅ |
The message action is used to display a message on screen.
{
"action" : "blablalib:message",
"speaker" : "my_datapack:speaker1",
"text" : "Hello, I am speaker 1 !"
}
Choice Action
| Blocking | Skippable |
|---|---|
| ✅ | ❌ |
The choice action is used to display a choice on screen.
The player can choose one of the options, which will result in the next dialogue to be displayed.
The options can also define Save Dialogue and Action fields.
The Save Dialogue field defines which dialogue will be saved to the player's sate when the choice is choosen.
The Action field is a string that will be sent to the server when the choice is choosen.
It can be used to trigger custom events or commands.
{
"action" : "blablalib:choice",
"choices" : [
{
"name(1)" : "Option 1",
"next(2)" : "my_datapack:option_1"
},
{
"name" : "Option 2",
"next" : "my_datapack:option_2",
"save(3)" : "my_datapack:option_2",
"action(4)": "do_something"
}
]
}
- The name of the option, can be a raw string or a localization key like
option.option1.name - The next dialogue to be displayed when this option is choosen
- The dialogue to be saved to the player's state when this option is choosen
- The action to be sent to the server when this option is choosen
Text Action
| Blocking | Skippable |
|---|---|
| ❌ | ✅ |
The text action is used to display a text on screen.
All fields are optional except for the text field.
{
"action" : "blablalib:text",
"text" : "Hello, I am a text !",
"fade_in_time" : 1.0,
"hold_time" : 2.0,
"fade_out_time" : 1.0,
"x(1)" : 0.5,
"y(1)" : 0.5,
"rotation" : 0.0,
"scale" : 1.0,
"color(2)" : "#FFFFFFFF",
"alignment(3)" : "center"
}
- The position of the text on screen, can be a float between 0.0 and 1.0, where 0.0 is the left/top of the screen and 1.0 is the right/bottom of the screen
- The color of the text, can be a hex string like
#FFFFFFFFor a plain color name likewhite,black,transparent,red,green, orblue - The alignment of the text, can be
left,centerorright
Image Action
| Blocking | Skippable |
|---|---|
| ❌ | ✅ |
The image action is used to display an image on screen.
{
"action" : "blablalib:image",
"id(1)" : 0,
"image(2)" : "my_resourcepack:textures/gui/my_image.png",
"width" : 100,
"height" : 100,
"x(3)" : 0.5,
"y(3)" : 0.5,
"rotation" : 0.0,
"scale" : 1.0,
"alpha" : 255
}
- The ID of the image, it is used to reference the image in other actions
- The image to be displayed, it is a resource location like
my_resourcepack:textures/gui/my_image.png - The position of the text on screen, can be a float between 0.0 and 1.0, where 0.0 is the left/top of the screen and 1.0 is the right/bottom of the screen
Move Image Action
| Blocking | Skippable |
|---|---|
| ❌ | ✅ |
{
"action" : "blablalib:move_image",
"id(1)" : 0,
"position" : {
"time" : 1.0,
"x_start(2)" : 0.0,
"y_start(2)" : 0.0,
"x_end(2)" : 1.0,
"y_end(2)" : 1.0,
"easing(3)" : "linear"
},
"rotation" : {
"time" : 1.0,
"from(4)" : 0.0,
"to(4)" : 360.0,
"easing(3)" : "linear"
},
"scale" : {
"time" : 1.0,
"from(5)" : 1.0,
"to(5)" : 2.0,
"easing(3)" : "linear"
},
"color" : {
"time" : 1.0,
"from(6)" : "#FFFFFFFF",
"to(6)" : "#FF000000",
"easing(3)" : "linear"
}
}
- The ID of the image to be moved
- The position of the image on screen, can be a float between 0.0 and 1.0, where 0.0 is the left/top of the screen and 1.0 is the right/bottom of the screen
- The easing function to be used for the animation, can be
linear,constant,cubic_in_out.
More info on Easings - The rotation of the image in degrees
- The scale of the image
- The color of the image, can be a hex string like
#FFFFFFFFor a plain color name likewhite,black,transparent,red,green, orblue
Next Action
| Blocking | Skippable |
|---|---|
| ✅ | ❌ |
The Next Action is used to go to the next dialogue.
Wait Action
| Blocking | Skippable |
|---|---|
| ✅ | ✅ |
The Wait Action is used to wait for a certain amount of time before continuing to the dialogue.
Timings Action
| Blocking | Skippable |
|---|---|
| ✅ | ❌ |
This action is used to set the timings for the dialogue.
- The speed at which the letters are displayed on screen, in ticks per letter.
Default if 1 tick per letter. - The multiplier for the wait time when the caracter is a punctuation mark.
Default is 8.
Sound Action
| Blocking | Skippable |
|---|---|
| ❌ | ✅ |
This actions plays a sound.
{
"action" : "blablalib:sound",
"sound(1)" : "minecraft:block.note_block.banjo",
"pitch(2)" : 1.0,
"volume(3)" : 1.0
}
- The sound to be played, it is a resource location like
minecraft:block.note_block.banjo - The pitch of the sound, default is 1.0
- The volume of the sound, default is 1.0
Execute Command Action
| Blocking | Skippable |
|---|---|
| ✅ | ❌ |
This action executes a command on the server.
Since dialogues are server-side, the client cannot ask the server to execute a command.
- The command to be executed on the server.
The command is executed inside a/execute positioned as <PLAYER> rotated as <PLAYER> runcommand, so you can use relative coordinates and the player's rotation.
You can also use the<PLAYER>placeholder to refer to the player that is currently in the dialogue.
Fade Action
| Blocking | Skippable |
|---|---|
| ❌ | ✅ |
This action fades the screen to a color.
- The color to fade from and to, can be a hex string like
#FFFFFFFFor a plain color name likewhite,black,transparent,red,green, orblue - The time to fade in ticks.
Clear Action
| Blocking | Skippable |
|---|---|
| ✅ | ✅ |
This actions clears all Non-Blocking actions from the screen, or specific types of actions if specified.