Mastering Dialog in Godot | Game Dev Tutorial 12

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey welcome back friends I've been away from making videos for a while but all of your support and comments have been amazing thank you for being such a positive friendly bunch in today's video I'm gonna share with you my tool for implementing text dialog in Godot last year while making my game welcome to the afterlife for the community game jam I ran face-first into the problem of implementing dialog for my games characters since time was in short supply during the jam I took the easy way out and hard-coded the text right into the dialog player script it worked but it certainly wasn't a technique that would be scalable for a larger project there's a link to the game and the Godot project in the description if you want to play and check out how it works since the RPG I'm working on right now is dialog heavy I had to come up with a more robust scalable way to deal with the mountains of text data and I'm going to share that with you today so let's get to it the XP dialog system tool is on the Godot asset library so it's easy to get just search for dialog in the asset library and it will pop up simply download and install everything once installed go to the project settings and under the plugins tab enable the XP dialog tool now you have access to the story file editor under the project's tools menu the XP dialog tool comes with two editors the story file editor and the dialogue editor the story file editor allows you to create and manage dialogue records while the dialogue editor allows you to edit one of the records by entering text into nodes on a node graph in the story file editor you can create records and delete them by checking their checkbox and pressing delete each record is given a unique dialogue ID or D ID but you can also give it a unique human readable name and a human readable description detailing the contents of the record records can also be assigned tags open the tag manager to create and delete tags for this story project once a tank is created it can be assigned to a record by selecting the desired tag from the drop-down menu checking the record checkboxes and pressing the apply button tags can be removed in the same way with the remove button the applied tags can be viewed in each records tag drop-down menu once we have lots of records finding a single one might be difficult but in the search bar we can search our records via the descriptions dialog ID or the record name we can also filter the records via their applied tags at the moment we have a few records but no text data is stored in any of them to edit a record select the edit button to be brought into that records dialog editor the dialog editor is a node graph that stores text data in notes to create our first node click the add node button each node is assigned a unique node ID or an ID text can be typed directly into the notes text box or via an expanded editor window [Music] if you find your typing a lot of the same thing into each node you can save and load templates each node has one input and any number of outputs that can be linked together the number of output slots can be increased for conditional branching each slot stores the NID it's linked with when your dialog player loads the story file it can choose which slot to follow during runtime however linking notes together is not at all required if your dialog is linear your dialog player might simply iterate over the node IDs once all our text is filled in we can head back to the story file editor to save our story using save story as saves the story file that can be reloaded back into the editor but if we're sure we're finished with our work we can use fake story ads which strips out all unnecessary data from the story file for use in our exported game stories can also be exported as a CSV file to your local hard drive the purpose of this is for localization and translation export the story send it anywhere to be translated then re-import the translated csv file and save a new story file for each language when your game runs it can choose which story file to load based on your applications language settings the story files can be read via a helper class provided in the add-on folder called a story file reader implementing the front end dialog player and/or the text dialog boxes is left up to you in your unique project however there is an example dialog player included with this project to use a baked story file load the story reader class from the add-on folder create an instance of the class load your desired baked Story file and finally pass it into the story readers read function the readme found in this project and on the github repo provides more details about how to use the story reader class and defines each of its functions let's take a look at the demo dialog player by pressing f6 [Music] and there you have it if you think this dialog editor can be improved I'd love to hear from you in the comments below and your questions are always welcome I'm using this tool to create my dream RPG if you're interested in the game I'm making be sure to follow me on Twitter or I post dev logs if you like what I do and want to join the community subscribe and hit the like button it might seem small but it helps out a lot I hope to see you in the next video until then happy Debi
Info
Channel: Dave the Dev
Views: 16,052
Rating: undefined out of 5
Keywords:
Id: P1wRejjKlLE
Channel Id: undefined
Length: 6min 51sec (411 seconds)
Published: Fri May 15 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.