Skip to main content

NPC Dialogue Question

Comments

6 comments

  • Aleece Landis
    Bug Zapper Beacon of Knowledge Super Star

    I don't think you can change the dialog of that particular NPC, however you could create multiple NPCs.  And you could perhaps (make sure to name and/or tag them all with unique identifiers so you can do this, and you probably need to create them using /summon commands (example /summon minecraft:npc ~~~ name Jose)

    so that this will work) set some code in to teleport the original NPC away and teleport a new one into place depending on the answers given.  Make sure the NPC "waiting room" is close enough to be loaded while the student is going through the lesson, OR create a /tickingarea around the NPC waiting room so that they are loaded and available to teleport in.

    0
  • Jelle de Graaf

    Hello, as alleece set a dialogue cannot be changed. But i stead of teleporting a different npc you can open the dialogue for a npc. By adding the command /dialogue @e[name=npcname] @p to the right answer it opens the menu for a different npc. This would create a more seamless way to solve your problem.

    3
  • Aleece Landis
    Bug Zapper Beacon of Knowledge Super Star

    Jelle de Graaf That is an wonderful alternative that I didn't even know was an option!  Cool to learn so many ways of doing things.  You would still likely need to have a waiting room of NPCs all named and in a ticking area so you will be able to call the dialogue with the commands.

    Dang if only there was an easier way of loading all the dialogs, buttons, and commands into the NPCs.  But at least if you summon them all using commands (like from a function file) and giving them their names as you do, then you can walk along the rows in your NPC waiting room and fill in the needed info.

    0
  • Aleece Landis
    Bug Zapper Beacon of Knowledge Super Star

    After doing some more research into this.  It appears that there is a /dialogue change command.  To be able to use it, it appears that you need to create a behavior pack and create dialogue scenes.  I'm still looking into how to handle that.  I appears to be something that came from education edition but I can't find any documentation on it for Education edition.  In Bedrock 1.17 they have documentation for it.

     

    1
  • Aleece Landis
    Bug Zapper Beacon of Knowledge Super Star

    Ok.  I did a little experiment this morning, you totally can create multiple dialogues for your NPCs.  If you use the /dialogue open <target npc> <target player> you can simply use existing NPCs dialogues to make your changing dialogues.

    However, if you don't want to worry about creating that many NPC and manually populating each in game with the needed dialogue and commands.  You can create a behavior pack to allow you to enter all the different dialogues (including buttons and commands as needed) into scenes in the files.  It does require working with .json files but it would allow you to create multiple scenes and then you can use the commands

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

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

    This can allow you to use selectors on the target player (scores etc) to target who sees the changed dialogues.

    I am finding this very exciting because it means I can go through in a test editor like visual studio code and create all the dialogues in the files and use my functions to handle the /dialogue change commands.

    I have managed to do this in MCEE 1.14.70  Here is some documentation I found on the subject.

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

    2
  • Niena St Clair

    Out of curiosity, has anyone done this in 1.17.32 yet? I would appreciate any input on this because I'm struggling to get this to work. Some devices struggle with too many NPC's so coding a JSON and using /dialogue would really help. For now I just keep them out of the loaded chunk when I can.

    0

Please sign in to leave a comment.