Skip to main content

Hi, how can i use /dialogue command?

Comments

15 comments

  • Debbie Alexander
    Moderator Beacon of Knowledge Super Star

    Ahhh, another person interested in more of an RPG-type experience! I will check into it with you. 

    Another possibility might be to have multiple NPCs and move them into the same location.

    **************** edit************

    Okay, I have played around with it. The closest I have to a correct syntax for a NOT working command is /dialogue change @s "New Dialogue"

    But if you print out the list of globals, there is no Global Dialog variable to set and if I run the command in chat, it throws errors. If I run it in the NPC, I assume it is also throwing errors because subsequent commands work, but I get no response from the dialogue command. Also, in chat, if I start to type dialogue, there is no autofill for the command. So that is the best I can do at the moment. If you make better progress, I would love to hear about it!

    0
  • Sujin Lee

    @deborah alexander Hi, deborah! thanks for sharing tips! i'll update when i found the way to use this!

    1
  • Aleece Landis
    Bug Zapper Beacon of Knowledge Super Star

    I believe you have to create a behavior pack in order to create the <sceneName: string>  to use with this command.  It seems to be a capability brought over to Bedrock from Education Edition but was never fully documented for eduation edition.  https://wiki.bedrock.dev/entities/npc-dialogs.html 

    So now I just need to figure out how to make the Behavior pack for education edition (since one saying min engine version 1.16.0 is not going to work for EE.)

    0
  • Debbie Alexander
    Moderator Beacon of Knowledge Super Star

    Ahhh, it turns out that you can name an NPC by tagging it, and the command looks like this:

    /dialogue open @e[tag=ducky] @p ducky_intro

    from here:

    https://docs.microsoft.com/en-us/minecraft/creator/documents/npcdialogue

    0
  • Aleece Landis
    Bug Zapper Beacon of Knowledge Super Star

    You can use the /dialogue open <target:npc> <target:player>  which will open the target NPCs dialogue to the target player provided the NPC exists in a ticking area that is within ticking range of the target player. 

    If you want to do /dialogue open <target:npc> <target:player> [scene:string] then you need to have written the behavior pack with a dialogue folder that has the example.diag.json file that contains the scenes you want to use.  If you have that behavior pack implemented then you can also use the.

    /dialogue change <target:npc> <scene:string> [target:player]

    0
  • Penny Support
    Bug Zapper Super Star Beacon of Knowledge Support

    We recently published some technical documentation on the Creators site about using NPCs: 

    1
  • Debbie Alexander
    Moderator Beacon of Knowledge Super Star

    I am looking forward to getting my hands on that scene file! Thanks for this great information!

    Am I correct in thinking that I have to tag the NPC in some way to use this? (in the example, the NPC has a tag)

    0
  • Aleece Landis
    Bug Zapper Beacon of Knowledge Super Star

    @deborah alexander

    You will have to create your own Scene file and dialogue folder in a behavior pack.

    I believe you can simply Name the npc (in the NPC edit Dialogue when you are worldbuilder) Or I usually do it as I summon them using the /summon command and that will work as a selector.  I believe a Unique tag or score would also work.  I have NPCs that have the same name and I'm using Name AND Score.

    I HAVE managed to make a Dialogue behavior pack for my Education Edition 1.14.70 world and it works.

    Then I started on the task of creating all the dialogue scenes to put into the dialogue.diag.json file.  (This 2nd grade spelling world has 576 spelling words.)  I already have all the dialogue and commands in a spreadsheet.

    It took me a few days, but I finally figured out how to use a VBA Macro in excel to create a text file with the correct formatting to paste into the .diag.json scene file.

    YAY I don't have to go through and paste all this stuff into the NPCs in game now!!!!!!!!!

    0
  • Daniel Masi

    Aleece,
    Can you share how you did this with a little more detail.
    This sounds amazing.
    I’ve been trying to do something like this and have met this roadblock. It is nice to know it is possible. Any clues would be appreciated.

    0
  • Aleece Landis
    Bug Zapper Beacon of Knowledge Super Star

    Daniel Masi
    What is the Roadblock you have met?

    The links Penny shared above should provide plenty of details about how to do it.

    Here is the link to the Bedrock Development Wiki that may provide a little more detail though it was based on an earlier version of the NPC Dialogue link above.

    The things you need to keep in mind when trying to use the /dialogue command.
    There needs to be an NPC close enough to the player within loaded chunks in order for the command to be able to select an NPC upon which to perform the command for the player.  You need to be able to select just ONE npc because the game gets confused when it can't figure out which entity the command should be tied to.

    So when you Summon or spawn in the NPCs, you want to make sure to give them names that will work with your dialogue files and dialogue commands.  Instead of using a spawn egg, I normally use the command
    /summon NamedNPC ~ ~ ~
    Where NamedNPC is the name I want to give that particular NPC

    0
  • Daniel Masi

    Aleece,
    Thank you! It is working!
    Do I need a file for every NPC or encounter with that NPC?
    For example, an assessment where one character is asking all of the questions. Versus a different character, one for each question.

    Another question I am thinking about is how to record a user’s input with questions. So I can see if a student got an answer wrong and then did the question again to get it correct.

    Any clues or ideas would be appreciated.

    0
  • Aleece Landis
    Bug Zapper Beacon of Knowledge Super Star

    No, you could put all the Dialogue scenes in one file or you could make several files.  The important part is the scene name

    0
  • Daniel Masi

    Thank you, Aleece.

    I am still experimenting with this. I recently had a world where it wouldn't see the NPC. I basically got it to work in one world and wanted to bring it to another world. So I copied the json files from the behavior folder and put it in the new world's folder. To my surprise, it doesn't work. It can't locate NPC, when it is right there. So I am fiddling with that. Thank you so much for your tips and Behavior Pack. 

    How did you figure out how to use a VBA Macro in excel to create a text file with the correct formatting to paste into the .diag.json scene file.???

    That sounds amazing!! 

     

    0
  • Aleece Landis
    Bug Zapper Beacon of Knowledge Super Star

    Daniel Masi

    So I copied the json files from the behavior folder and put it in the new world's folder. To my surprise, it doesn't work. It can't locate NPC, when it is right there. So I am fiddling with that. Thank you so much for your tips and Behavior Pack. 

    So I think you would need to apply the behavior pack to the world you want to use it in.  Not simply copy the json file and place it in the world folder.  I normally keep packs that I'm doing any editing on in the Development Behavior Packs folder, that way the world will check for updates when you start it up.  If you leave things in the regular behavior packs folder, it copies the pack into the world folder and then you run into issues of which one did you edit or having to edit it in multiple places etc.

    As to the Macro, it has been a a while since I did it so my memory is cloudy on that.  But I think I was mostly searching online for tutorials on how to create a macro and I did a fair bit of youtubing as well and then trial and error.  And there were definitely errors (like a dolt I spelled it comand instead of command and of course none of the commands worked!)  At least it is easy in a text editor like notepad++ or VS Code to go in and find all instances of something and correct them.

    0
  • DAVID PINILLA-CRUZ

    I have been making dialouge for npcs but i ran out of space. is there anyway to add more dialouge?

    0

Please sign in to leave a comment.