#Search for a dialogue generator
1 messages · Page 1 of 1 (latest)
so you want pretty formatted chat messages?
For that there are 2 main websites:
https://text.datapackhub.net/
both tools do the same but have different kinds of GUI's. It depends on preference which one to use.
Ah, thank you so much! But what I actually meant was if there’s a tool that lets you create dialogue when clicking on an NPC (or maybe by pressing a button that’s linked to a command block). For example: when I click on a villager named David, he would say ‘Hello’ -> ‘I’m David’ -> ‘Nice to meet you’ -> ‘The End’ (shown kind of like in the picture I uploaded). Sorry for not explaining it clearly before!
not that I know of
There might be libraries that have functions to simplify the process but I don't think there is a tool for that.
It's not that complicated to set up yourself though.
You can have an advancement that triggers when interacting with a specific entity (villager named David in this case) and this advancement runs a function.
The function can be a self scheduling function that repeats itself as long as a score (message counter) is not the amount of messages. With a list of if statements you can then print the message that the score value is.
something like this (pseudo code):
revoke advancement
scoreboard david message add 1
execute if score david message 1 run tellraw <message 1>
execute if score david message 1 run tellraw <message 2>
execute if score david message 1 run tellraw <message 3>
execuute if score david message matches ..2 schedule <THIS> 3s
this would print the 3 messages each 3 seconds apart to the chat.
at the end you can reset the counter so it can repeat the process if david is clicked again.
or do it before calling the loop
Thanks, I’ll give it a try and get back to you as soon as I can