Regarding the dialog box, first of all, I control the dialogue of NPC through dialogue runner in the form of playback, add dialogue ID to NPC dialogue, and call the corresponding dialogue through id in dialogue runner.

I found a problem in the process of testing alone. The player will suddenly move when the dialogue is triggered. When the player clicks to play the next dialogue, the player will move to the mouse and click to the area.
So I added a player interaction point to the player mobile system, added a dialogue interaction point to the NPC, and added a player locking system. When the player triggers the interaction, it will move to the NPC interaction point. When the player clicks on the NPC again for dialogue, it will trigger the player locking system and lock the player at the interaction point. In this way, even if the player clicks to other areas, the player will not move before the end of the dialogue.
At present, this system can play every dialogue smoothly. I’m going to use it for the first game test.
After the first game test, I found that such an automatic dialogue system may not meet our game requirements, because the game needs to provide players with different dialogue options, so I added a new code to the basic dialogue runner.

I tested it on the NPC “Beatrice”. After the player triggers the dialogue, the system will detect whether there are any props to continue the plot. If there are, new dialogue options will be generated to advance the plot or obtain props.
I’m going to test this system on this NPC. If the team members also think it’s OK, I will apply it to every NPC.

At the same time, I also added the face of NPC to the dialogue box before the second test, because in the first game test, players would not be able to distinguish who was speaking, and the background of the dialogue box was updated.


The last change about dialogue is to purchase the store. NPC Jackie’s dialogue option needs to be connected to the store interface, not the same dialog box as before, so I made a new store ui.
After completing this step, the part about dialogue has basically been tested.