Oops! For when button is being removed make sure to call "queue_free()" instead of just removing it as a child of dialogue box otherwise the buttons will live forever without being released causing a leak!
My biggest request: show off an example of a finished product right at the beginning of the video. a 42 minute video isn't bad, but its easy to just click away if I feel that I am taking the risk of maybe not learning a system that would fit my game. Other than that its not too in depth I think its a perfect amount of detail for what it is, it just takes too long to see it working. that said, great vid! Thank you!
Building a tool to solve a very specific problem for your own workflow is the most programmer thing I can image. Giving that tool away to others who might also have that problem is truly the essence of FOSS. I'm sure some game in the future will benefit from this, big or small. Right on!
Thank you so much for in-depth tutorial! I'm new into gamedev and i want to make a dialogue-rich game but most of the tutorials go like "just use dialogic! fin". And theres you with amazing flexible tool which allows ton of functionality, with good in-depth explanations and reference code to check if i want to build dialogue parser from the scratch. You're life saver!
Wow! Glad to hear this would work for you! I'm always helping and answering here and on my discord and on github so feel free to ask me any questions if you run into any issues
The funny irony of my currently following your card tutorials then imagining "what if I did roleplaying dialogue" and checking your channel to now find this. I pray I make it that far in development because I would love to use this. Even if I don't get that far, thankyou for making & sharing an open source dialogue editor / constructor!
haha thanks for the encouraging words and watching my videos! I'm always so happy to hear that I have been making something helpful and needed! so this is perfect! hope you achieve and get to the point you want in your game dev journey!
Thank you so much for creating this. Free plugins like this are a real time (and life)saver. Plus the tutorial was extremely good and useful, especially for newbies like me :D
@@ezthedev That being said, I now ran into an issue where I can't get end_of_dialogue_reached() to activate. I imported your cRPG demo to compare code, but even that has the same issue where both options ultimately leave [...] button on the screen (& doesn't do anything). DialogueResponse.eod_reached also returns as 'true' but it still adds [...], for both my game and cRPG demo. I didn't find a Github issue for this so is this a classic case of 'works on my machine' (but not on mine lol)
@@MixonBro yea end of dialogur signal is deprecated and is replaced by the boolean value. The change now should be run the "clean dialogue box" function after the "..." button is pressed for the dialogues response with 'eod_reaches' flagged
At the least , let me re-upload yhe plugin so that the old behavior still works eventho it's deprecated! I'll let you know when it's updated (maybe in like 5 hours)
@@MixonBro OKAY! it's fixed. Please try and download and use the latest commit (0.1.0-hotfix1) and see if it works. Otherwise, try using 0.0.2 version instead since that's the one the demo was created in! thanks
very cool plug-in! feels a lot more "coder-friendly" than Dialogic, which definitely fills a niche! excited to see how this plug-in evolves :D I also loved the live-dev-style of video! do you have a twitch where you do this sort of thing as well? would love to tune in to that :)
I tried doing twitch before.. but it was kind of difficult at the time to be developing and be "on" always haha. I'm thinking I'll do youtube live sessions for these live dev style work in the future! Thanks for the continued viewing and support!
Oh and yea! I peeked at Dialogic a little bit and I remembered specifically that I don't want a "visual programming" since once you get proficient the "ease of use" ends up hindering your pace in my personal experience.
I remember finding your previous video a while back and finding it very interesting. This looks so much better than my graph plugin. I might take the plunge and switch to yours 👏 but will keeo watching and evaluate.
Thanks for taking interest and considering this tool! Any feedback on what would make it usable for you (if you feel some important features are missing), I'd love to hear about it and plan for the tools future.
@@ezthedev in the time since i did decide against it (for now at least), but have another project in mind which might benefit. the game i'm currently on does lean into doing a lot of operations in the graph (as you advise against :P) and relies on a lot of custom graph nodes which i intend to integrate with the event editor later (eg. graphical buttons rather than text line edit for the character and emotion by pulling the loaded actors from the editor), though complex stuff, all the virtual hooks, etc. is still done in the EventObject script. still, i really dig the idea of incorporating both graph and text editing together. i'm not the writer but the main issue is definitely all the dragging to get a single thing done, having both graph nodes and a simple dialogue script within the nodes seems mighty neat to me. especially since the texts in this game should have manual line breaks since they're delivered using (preferably) variably-sized speech bubbles. i definitely suggest using a custom resource class for it though.., loading and storing reference to the file is much more convenient that way, as is saving it. like i have it so i make a CommandSequence resource and the plugin detects that, opening the editor in the bottom panel. no dealing with fragile file paths or anything of the sort.
@@el_primer_y_el_ultimo_caiman thanks for letting me know in detail of your use case and feedback! I did wonder initially if i should use the custom resource as the file instead of converting from/to JSON . This is helping me think towards using the resource little more, but i'm still somewhat split.. hopefully i can settle this internal conflict soon haha..
@@ezthedev Ultimately I made one final version of it, ended up writing it in C++ as a module so it can be extended from any programming language eg. C# + speed + all the features locked behind native modules. Less accessible since you need to build Godot yourself to use it but far more powerful. I'm storing the data directly as a Node so that node references can be serialized with ease. It's called godot-flow-script if you're interested, though not very well-documented yet and there are a couple of broken things still. You can do basically whatever you want with it though, even a complex FlowNode should only take a couple hundred lines of GDScript to implement between its GUI and execution and data...
Yay! Algorithm is algorithming! Haha thanks for watching! Let me know if you have any trouble or questions with it. A lot of changes are also incoming soon :)
A fantastic tutorial for a great dialogue system! I've tried one or two I've found around, but I couldn't get them to work properly or connect well with my signals, and this one is definitely working fantastic up until now, so thanks a lot! Thanks for the time dedicated to make it have an appropriate state to the public and release it, I know how much time it has probably taken from you, but we enormously appreciate it! Just in case you (or somebody) has a minute, I would like to ask two questions: 1) How do you trigger this system? I have a code layout to trigger things with a button interaction, but I am wondering what would be the command to trigger this. 2) How can you change between two different dialogues? I suspect, since the node changing the json is the EzDialogue, that we need to add an instance of Node2D for the DialogueBox on each NPC we want to interact with, correct? What am I getting wrong? Such a noob I am. I promise I try my best every day, but sometimes the simplest things seem to not work well for me, so if you have an idea on how this would be triggered in a basic way, that would be very cool. Well, anyway, take care, and have a great weekend!
So sorry I'm late on response! I just returned from a vacation and have been catching up on things! I'll try to remember to answer this within next few days!
@@Wilson-or1rt I see! I'd love to help you better in detail! You can share screenshots and longer texts and even share screen if you want to come on to my discord! I've been helping folks there! I understand if you rather not Then I'll try to answer here as best as I can! discord.com/invite/qxeNYFga
@@Wilson-or1rt otherwise, if you just want background color changed you can do something $button_node_namr.bg_color = Color("#ffffff") Or you can change the color of ui components like "button" is by changing "theme" property Here are some resources I've found! forum.godotengine.org/t/how-to-change-color-of-button-backgorund-in-gdscript/16816 docs.godotengine.org/en/latest/tutorials/ui/gui_skinning.html
@@ezthedev thanks for your answers :) I've found a workaround for my needs. I compare choice_text var in add_choice function to the choice I want to make unavailable and change parameters of the node based on that comparison.
It worked perfectly, for two days afterwards it kept giving me several errors saying that certain functions didn't exist even though I didn't change anything
We love a good old ghosy errors that mysteriously disappear after no change!! AFAIK it might be the fact that certain "class" needs registering in thr name space of the project before functions are seen... which may take some time for engine to detect.
I'm at 14 minutes of the video and just before that you show an error you've made with the var being reset @onready and I think that it's really cool and usefull that you show these kinds of mistakes! It really helps if someone stumble against the same issues and it also help knowing more about the @onready behavior ! Thank you, nice tutorial so far ! I'm trying to implement your cool Plugin to my Point N click prototype I really hope I'm going to make it work ! I think it's the only dialogue system I've seen so far that you can really adapt to differents style of games.
I'm so glad that you are finding this video and tool helpful! It's so cool you are working on point and click style! I love that genre and personally I want to expand on that style too! Good luck, and let me know if you have any questions!
I found your channel a few weeks ago and was hoping this would be released soon! Congrats on developing this. I've barely started using Godot (watched a lot of videos) but I wondered what you thought how you think your plugin is more/less appropriate than other Godot dialogue managers like Dialogic?
You know what? I have seen some of these other dialogue solutions but it all had specific things missing that I ended up wanting to make one myself! However, they have been around and open for longer so I'm sure in terms of resilience and community support they are much better than what I made. Having said this. I would love to dive deeper to see what difference they are and when I would personally use one over the other! Thanks for following along this journey!
Hey Ezra, thank you so much for making an open source project like this. I had a feeling that I would have to make a plugin like this but I basically have no programming experience so it wasn’t very viable. I’m having trouble with the choice index. No matter what button I click, it always comes back 0. I think it has to do something with the “_on_choice_selected” function in the dialogue box script because for some reason, “int” is green instead of red. I have no clue what could be causing this.
So the buttons should emit different "id" as part of the parameters for being clicked. I have a feeling there's something wrong with proper ID set up during the button creation. Since you are new to programming, feel free to drop by our discord to share screenshots and chat more live! (It's harder for me to notice comments here) worst case scenario we can schedule a time to hop on voice chat on discord to help you real time while Sharing screen! Here's the link discord.gg/VCaG9S3u
Isnt it better to put the dialog window on bottom like the Animation or AnimationTree, on when you press the EzDialogue-node on the scene-viewer? The EzDialogue menu on top beside AssetLib is maybe not the right place? Opinion on that? As well the Json file. Isit not better to create an own file-format? Even if it is json.
It may be! Exiting thing is I'd love to consider all these better options and make improvements! Maybe something customizable... si ce what works for me might not work for you! Please feel free to add these wonderful considerations as "feature request" on the github!
Thanks! As of right now, all the documentation is limited to the Readme shown in the repository here github.com/real-ezTheDev/GodotEzDialoguePlugin And it's just "how to use" doc. I haven't had the chance to dive into how the underlying architecture works, but im out here always answering questions if you have more questions!
@@ezthedev Thanks! I was just wondering because I think it would be good to have a description of all the functions available in the plugin, but I think this tutorial covers most of it. Thanks again
Fantastic add-on! Thanks so much for sharing! This will make what I'm trying to do with my current project so much easier. I have run into a small issue however. I'm 25:00 into the tutorial and my code looks to be the exact same as yours, but for for some reason after I've already selected choice 1 or 2, the following response to those choices still have 2 selectable options available. How do I have it where the choices stop popping up after the player has already picked one. I imagine this is an easy fix, but I'm not sure how to implement. If you're able to help, I'd greatly appreciate it.
Hey thanks for watching! And it would probably best for me to help if you can show as screen shot the code and the way things are set up. If you don't mind doing it, you can create it as an issue for the repository and I'll try to take a look asap!( I'm currently travelling so it might take a bit ) Meanwhile, if the choice elements are keep popping up after selecting a choice...there's a chance the dialogue box is not being properly reset to when receiving a new response signal. You will want to queue_free() the choice buttons whenever new response generated signal is being handled again. Let me know if this helps otherwise, I'll be looking for the issues in the repository for a further help!
Thanks for responding. I have reported the issue in the repository. when you say to queue_free() the choice buttons, how exactly should I go about doing so? I'm still new to Godot and have tried putting "queue_free()" in the dialogue box script's functions, but so far what I have tried hasn't worked. Where is the exact place, you'd like me to impliment the queue_free()? thanks again.@@ezthedev
@Zap-Plays I had that same issue, it turned out it was in my func clear_dialouge_box(): method The issue was I had $VBoxContainer/Text.remove_child(choice) instead of $VBoxContainer.remove_child(choice) Hope this helps!
Apologies if you said it and I'm just to tired to take it in . . . . . but would you reccomend seperating it one node per conversation or one node per character? I I have a game with 8 characters across 9 levels with characters often being encountered 3-6 times a level. How should I devide up the nodes? ? ? Plus do these all get attached to the main character or the indivdual characters? ? ?
I recommend separating it to have one dialogue file per character, and within the scene use just one EzDialogue that's shared by all the different dialogues! I know this might sound all confusing over text! So, when I wake up tomorrow I'll make a video for this and try to upload asap! "EASY Setup for Multiple Character Dialogue in GODOT" maybe..?
This looks awesome. Btw, that thing at around 14:00 is so annoying, that the _ready function and @onready vars run after adding the child to the tree, and not when instantiating the scene. It breaks the intuitive pattern of building something and adding it to the scene when it's all set up and ready, if you use default values. So no builder pattern, OR no default values, I don't know what's the worst choice here, haha. I hope there's a simple workaround for it. If someone knows a better way to deal with that, please reply :) [edit] Now that i wrote this, I'm thinking why was i even using @onready, if the values don't depend on the tree being there? I think that's the whole purpose of it. Maybe just saying "var X = Y" was enough
ah looks like this only works for normal visual novel sorta dialogue tried making it work with a scrolling history type of system and when i call .next it makes the container of the text labels bigger lol
Haha actually I've helped someone setup scrolling history type like Disco Elysium with the dialogue. The box will need to be created in a slightly different way! The font issue is interesting and strange! If you'd like, I can always help by getting on screen share voice call on the discord!
@@ezthedev well its not the font that gets larger but rather the margin container holding the vbox with the text bits and buttons are separate scenes it just makes the margin container expand for some reason im rather new to coding in general so its been an intresting lesson in trying to debug hehe
yea it just seems that .next will create a new textlabel even if theres nothing to generate so it just generates empty i guess il try adding a check to see if theres anything to generate
Thanks for the plugin! This is extremely helpful and versatile! I have a few questions: 1. How would I be able to trigger a dialogue box outside of the _ready function? (I'm fairly sure the way to do it is to just use the start dialogue function in whatever you use to trigger it, plus the dialogue generated func) 2. How would you implement a typewriter style text scroll into the label? I think that text style and this plugin would be a great combo 3. I've seen you say to use queue_free() to keep the button instances from leaking- where do I put that in the code? It just makes it so it all disappears when I use it thank you!!
Thanks for watching and using the plugin! I'll try my best to answer the questions here! 1. yup! just call start_dialogue whenever and from wherever you want to trigger the dialogue. 2. i treat "display" of the text and "building" of text to show separately. I would store the "texts_to_display" in full when you receive the response signal, then turn on a flag called something like "text_display_in_progress". Under _process() you can have the text on the dialogue box increase by one letter from "texts_to_display" until the length of both matches while "text_display_in_progress" is true. Make sure you set this to false once you displayed all of the texts from "texts_to_display". Alternatively, you can just have it display one more letter every "given" seconds while the length of "displaying text" is less than "texts_to_display" if you don't want to use the flag. I know this could sound confusing here... so i'll try and answer this on my next "answering all your questions" video! 3. it should be added under "clear_dialogue_box" function where the "choice" is being removed from the box. So, in addition to having $VBoxContainer.remove_child(choice), there should be choice.queue_free() 15:15 line13
The way it's made now, does the page break need to have a "..." choice to move onto the next or could you have your interact button pressed anywhere move onto the next choice (Like in games where it has a little arrow at the bottom of the dialog box to indicate theres a page break)?
So the page break command "---" can move on when you call ".next()" on the dialogue handler Node. Which means, on this example I made it call .next() when clicking a "..." button but you can make it trigger off of anything you want! Keyboard interaction, or automatic and timed and etc.
@@ezthedev Ah I see. So would you add an interaction in that if statement waiting for X interaction and call .next() on that interaction instead of populating a continue to next page button? like (forgive me for psuedocode here, not well versed in GDScript) if choices.is_empty() && input.on_press() Dialogue.next() Most of my coding experience is in processing data so the concepts in UI design are a little foreign to me. Thank you for the helpful responses and the FOSS spirit. This is pretty incredible.
im pretty new to this, could someone give a brief comparison between this and dialogic 2? and one important point is also the translation/localization for the dialogues
Dialogic is great and have been around longer! One major reason I decided to make my own instead of just using dialogic (aside from wanting to try making something interesting) was that dialogic is too heavy on "visual scripting". I have a philosophy that after you get really good at using visual scripting and highly UI based programming, the ui gets in the way of speed and flow! And this focuses on organization as graph, but ability to type out dialogie and its logic. Hope this helps! And hopefully someone else could answer as well! Otherwise, let me know if you have more questions
hey, making an undertale like game here and gotta say, this is highly appreciated lol. currently at timestamp 13:47 and struggling with getting the project to run right. everytime i run the scene it says "Invalid call. Nonexistent function 'instantiate' in base 'GDScript'." I've doublechecked the code and there seems to be nothing wrong with it in terms of typos. any clue on what the problem might be?🤔
Hi! Thanks for watching and choosing to use the tool! It might be better to create an issue on the repository where you can share some screenshots so I can have a better understanding on what might be going on! But from what I can tell the instantiate "missing" might mean the engine can't find the class/scene to instantiate because the script of the scene/class has an error and can't be properly compiled. Double check that there are no errors there and that there are no typos! Otherwise, please create an issue on the repo and I'll follow up!
Hi! is there any way to resize text in the plugin? I'm referring the the right window within the editor. It's usable, but it's a bit difficult to read right now.
Hey! Have tried holding ctrl(or cmd for mac) and scrolling up and down? I can't try right now, but I think since I'm using godot's text editor, I think that kind of normal operation might work! Let me know if it doesn't work!
@@ezthedev Hi there, I just downloaded your plugin, and I'm also having trouble with this. I'm on mac, so for me the normal text editor zooms with "CMD" and "+". But when I try that on the plugin text, it stays the same size. CMD and Scroll doesn't work for me either.
@@jacksons6377 huh interesting! I'm using the default text edit window provided by godot itself so it should follow pattern ... have you tried while text window is focused, holding cmd+scroll wheel?
@@ezthedev Yeah, I cmd+scroll doesn't work for me either. Just for complete transparency, I'm on a laptop, so I'm using the trackpad. I don't think that should affect anything though. Does cmd+scroll wheel work on your end?
@@jacksons6377 for me it's ctr+scroll and that works for me.. I wonder if there's different key combinations for Mac. I'm surprised the normal pinchzoom TouchPad motion doesn't work :/
Hi! First of all, thanks for the great plugin and really good explanation video. I'm surely interested in using it in my projects, but still have few things that I didn't get during wathing the video and would like to get answer if it's possible. So, my first question is - do we need to create new json file for every dialogue in the game? or can we just create dialogues in one file and then get the one we need direct in the code? Second, I had an idea of positioning dialogue boxes above character's heads. How can I do that? Should I create few dialogue boxes and make them child nodes of characters for that? Once again, thanks for the great video and plugin!
Hi! Thanks for watching. You can certainly make separate json dialogue file per character/scene/dialogue. If you want to keep everything in one file, you can do that. If you look at the third argument required for dialoguereader.start_dialogue(), you can see that it takes the "node name". The dialogue will start from this dialogue node you provide. So you can have different dialogue starting point in a single file and use the code to specify where to run from. For having different types of dialogue boxes and positioning, I would personally setup a separate box for each type so that I don't have to worry about resizing/positioning in game. It would be easier to setup just in the editor. Hope this helps!
I'm actually working on localization (translation) as my next feature! So stay tuned, but as a small idea. I'm planning on making it work along with the existing localization features of Godot. Specifically, using the widely used "gettext" docs.godotengine.org/en/stable/tutorials/i18n/localization_using_gettext.html#advantages Of course, it may change if I find that it doesn't work well with the tool, but yea! Thanks for watching
im at about the 22:30 mark in the video, and I believe I added everything the same way you did, but anytime I try to run, it says "Invalid call. Nonexistent function 'add_text' in base 'Node2d' . Im very new to this (doing my first game jam) so any help would be appreciated :)
hi! so sorry, I didn't see this comment earlier! There are few reasons why it might say that. so I'm guessing you are referring to the line $DialogueBox.add_text(response.text) that error "invalid call. Nonexistent function ..." Means, that the function named "func add_text(...)" you wrote in your DialogueBox.gd is not detected. Let's go through what could cause this mismatch. 1. you could have mispelled $DialogueBox and it's note correctly referring to the right Node in the scene. 2. You didn't attach DialogueBox.gd to the Node2D "DialogueBox" so it is treating your "DialogueBox" node as just plain Node2D, not the one you specifically defined. 3. You have an unresolved error in DialogueBox.gd, so Godot is unable to parse/read/interpret the Contents of DialogueBox.gd attached to $DialogueBox incorrectly. (the unresolved error could be anything from mispelling,indentation, or just some actual issue) Let me know if any of this helps! Otherwise hop on the discord discord.gg/CpkCrtfc and give us more questions and context (like screen shot of Dialoguebox.gd and etc)
A maybe-newbie question: What's the best-case for triggering these dialogue scenes? Right now I have a visibility system with all the separate dialogue scenes in a CanvasLayer in my 3D scene. Somewhere between the isolated dialogue scene and the CanvasLayer, they lose their initial focus, and I'm not sure how to shift focus back to the choice buttons for each dialogue scene as they activate. I was wondering if that was due to my hacky visibility toggling and if there was a better way. I also wanted to say that custom signal feature is powerful! So convenient! Keep up the great work! ♥
Hi thanks for using the plugin and watching my video! There is actually something called "grab focus" so maybe thay is something you can use docs.godotengine.org/en/stable/tutorials/ui/gui_navigation.html
Hey, I've been trying to make it so that you type and press enter it will give you the dialog. Is there anywhere where I can find information on how to do that?
one question How are chose id is being assign in plugin i mean when i say dialogue.next(1) how does it know which option i am selecting is this `1` refer to `#1` that we see in grapheditor? Also it can not go backwards? Example i have selected option 2 and in option 2 i would show text and then give option to go back to all options screen
That's a good point. As of right now, the order of choice is the order they were processed, so typically top to bottom in the file. Otherwise, most of the time it doesn't matter because the dialogue response will give you the choices in an array. For example, response.choices = [this is choice 0, this is choice 1, this is choice2] And you would show these options to the player, and when the player selects a choice, you need to make sure you call the .next() with the choice id matching the index in the original array. Let me know if this is still not clear.
I see what you mean. You want to go to "previous node" I think that's a good feature to have! I should probably add it.. For now, you can hard code going back to the "menu" node with the goto command. Or you could save a variable with a name of the node I'm the menu node and later have a 'routing node' where you check the value of that variable and route to appropriate node if you wanted something where you can go "back" to different places. Otherwise, I'll have to add "go to and come back" and/or goto previous node type!
Hey, I´m trying to implement your dialogue manager into my game. I followed your tutorial exactly, but when I try to start the game, there is an error with the start_dialogue function. The error states: "Invalid call. Nonexistent function "start_dialogue" in base "Nil"." I´m still pretty new to programming and I can´t seem to figure out what I did wrong. I would really appreciate it if anyone could help me with this issue.
Hi! It could be a lot of things so it would help to see what you have going in your project. Do you think you can upload your project in github or if you want, you can join our discord and show some screenshots and I can try and help!
Incredible! Just started learning Godot, and I just have one question. Is it possible to change the dialogue_json variable through code by passing in a JSON so I could use this node with different conversations? Whenever I try to change it, I get the error of "Trying to assign value of type 'String' to a variable of type 'JSON'." In short, is there a way to use a JSON as an argument without using just its string file path?
Hiya thanks for using the tool! Let me see if I'm understanding this right. You want to programmatically change contents of the JSON file generated by the plug-in? It might help me understand better if you can tell me the specific desired beahvior!
Sorry for the confusion. I don't want to change the contents of a single JSON. I want to have multiple JSONs, and be able to give it a different one whenever it's called. Like, what I was trying to do initially was have one scene that would initiate a dialogue scene, and as it does this, it would give give a new value to a Singleton file's variable called "DialogueToLoadNext." Then, when the dialogue system loads up, it would read the path from the auto loaded Singleton, and load whatever conversation JSON it's pointing to. But this is where the error comes in, as it is trying to grab a JSON but only finds a string. Is there any way I can achieve this without making a new copy of the node for each individual conversation JSON?@@ezthedev
I see! Well, underneath the hood when you hand over the json file to the "EzDialogueReader" Node to ".start()", it reads and loads the json as Resource object called DialogueResource, which I think would help with what you want to do. Let me make some changes so that it can be used easier for your case(might take me some time haha)
Do you mean you want audio to play after the option is selected? Or do you want to play something as they get revealed? If you want the sound to play when the option is selected, you can have something like. ?> option number 1 { signal(sound,sound_name) -> next dialogue node } And implement the custom signal with where you would take "sound_name" to determine which sound to play. Let me know if this helps. Otherwise, I could work on showing example in future videos
It needs to! That's actually in my next list of features. I'm hoping to make it so that localization json is extracted from the dialogue files and be able to take in localization language-country during processing. But to answer your question, at the current version localization is not natively supported. :(
does it say on which line/file the error is? usually when you see something like that there could be an unresolved error within the file, or the name of the variable is written wrongly. Feel free to join the discord and ask me questions so I can help you looking at screenshare / screenshot! discord link: discord.gg/KycCwPQT
Certainly! The choices are only implemented incase you need it! Otherwise, you can "move" to the next node by doing .next() without providing any choice index! I think there might be one example in this video between choices.. haha if not let me know if you need help figuring out!
Hey! Sorry you are having dome trouble. Could you tell me more in detail exactly what you are trying to do? I'm not quite understanding where you are trying to transfer the file to. If it is to your project, you can download first then copy and paste the folder.
@@ezthedev I'll step in here, if y'all don't mind! I've downloaded and imported the ez_dialogue folder into an addons folder in my project, just as you did. I can see it in the plugins section of project settings, BUT when I go to enable it, I get the following error: Unable to load addon script from path: 'res://addons/ez_dialogue/ez_dialogue.gd'. This might be due to a code error in that script. Disabling the addon at 'res://addons/ez_dialogue/plugin.cfg' to prevent further errors. I am using Godot 3.5 - I hope that's not the issue.... it very well could be, and I'd understand (not ready to jump to Godot 4 just yet) Thanks for any and all assistance!
Oh interesting! I have not tested the plugin with 3.5.. I have a feeling that might not work since I know there are some keywords and code in the plugin that only works in 4.0+
hi thanks for watching! Do you mean one line and wait for user interaction then next? or do you mean you want animated text display like some old school RPG?
Also connection should happen automatically when using the goto (->) command. It might be delayed since recent build because I made it update less but maybe that is not good.. ill look into fixing it again!
I reinstalled and it works properly now, and I rewatched the video closer to figure out how to connect the nodes lol. Thank you so much! I was wondering if you might know how to define a variable in the dialogue editor. I'm very new to this whole thing so maybe the answer is obvious, but what I'm trying to do is include the name for the speaking character in each dialogue node
@@maxperegrine7055 i'm glad it worked! So, i made this tool so that there is no native way to assign /define variables . However, you can make your own signal to do that if you want to. Let me explain and show you example on this video by timestamp. One way is to pre define the variable in the "state" and then just use it in the dialogue. You can define a variable in the state object as seen in this example 26:12 On that time stamp, I am defining a variable to use as an example for the "varaible injection" example. Or if you want to be able to define a new variable via something like "singal(set,variable_name,variable_value)", you can follow the example on 29:35 . Hope this helps!
Do you mean could the game be exported as HTML normally from Godot? I usually export my games as Web play, so it should be able to. Although, I know Godot web export does have some known issues generally. Or did you mean something different?
Hi! I don't see why it wouldn't! But I haven't personally tried it out yet! I havent looked too deeply yet, but there seems to be a solution/discussion regarding using the plugin with c# and it seems one of the users were able to work it out! Please check it out and if you need more support feel free to let me know! github.com/real-ezTheDev/GodotEzDialoguePlugin/issues/7
It should! Conceptually thr class and it's functions for the dialogue should be same as any other gdscript to c# usage. I've had some users say they were able to use it with c#! So i know it can be used, But also had some people ask how they would do it. I have not worked with c# in godot so I don't have a direct answer... so it'll be a but of experiment for me to try and figure out exactly how that might work.
I was finally able to come back to this tutorial and finish it! EzDialogue works wonders and I'm hoping it can be my go to dialogue system for when I'm trying to make a game, especially since I'm an amatuer. Idk if you can answer this or if maybe you're planning to address questions in an update video, but I'm currently trying to attach the EzDialogue system to any NPC the player interacts with. I have an interaction system that I got from the channel DashNothing, but when I try to impliment EzDialogue into this interaction system, either the game crashes or EzDialogue doesn't pop up at all. I'm simply trying to have it where when a character walks up to a NPC and the button pressed[E] to interact with said NPC is pressed, EzDialogue is triggered. If there's any way you can help, I'd greatly appreciate, if not, I totally understand as i'm asking for something out of the scope of the video.
Hi! Thanks for using the plugin and watching the video! The use case you are mentioning with interacting should work normally. (In fact, my game uses such interaction.) I'll have to check out the interaction system you mentioned to better understand, but at base, it should work if you trigger ".start_dialogue" wherever you want to trigger the interaction. There maybe nuisances with giving control focus between different UI and such.. hmm I'll try and cover it on my next "answering questions" video!
@@DiscourseElysium hmmmm it shouldn't impact the OS version, but to help you better what are you seeing as the problem? what part of the plugin just not working when installing?
oh interesting! You mean the demo in the repo? I'm utilizing "queue_free()" which seems to indicate it internally dealloc and if there is any unhandled reference that reference would be invalid. I checked the debugger's Node count during the demo's run and it does seem to drop the node count when buttons are removed. Is there something else that needs to be done, and which monitoring should I be looking at to confirm this?
@@ezthedevI meant in the video, when you use remove_child. If I had found something like this in the repository, I would have made an issue on github. And yes, queue_free should free the nodes sometime between the current frame and the next. There is a lot more to how it works, but almost always it is what you want.
Hey, great addon, I really like it but I feel there needs to be some kind of tutorial on how to implement it in an actual game like an FPS (I've barely seen tutorials on those and I need one rn). I'm having trouble mainly with the game showing different dialogue depending on what is instantiating it (For example if I click button 1, i wanna get button1dialog.json as the dialog tree, but if I click button 2, i wanna get button2dialog.json)
I'll look at some opportunity to answer specific questions like these later! For this particular example, you can always have a button call EzDialogue.start_dialogue(button1dialogue,state) that way you are "starting" the dialogue with two different dialogue file when clicking on a button. Now , if you mean you want it so that you can have a dialogue that looks like ?> button 1 { signal(start_new_dialogue,button1dialogue) } ?> button 2 { signal(start_new_dialogue,button2dialogue) } you can implement your "custom signal" named "start_new_dialogue" to close out any on going dialogue logic and start a new dialogue.
I get this error: Failed to load script "res://addons/ez_dialogue/ez_dialogue.gd" with error "Compilation failed" and also this one: Failed to load script "res://addons/ez_dialogue/main_screen/main_panel.gd" with error "Parse error"
Ooo this is as soon as you paste the addon and enable it in your project? If so, what version of godot are you using? The plugin support is only for newer versions of godot (4.x)
it seems like i can add the plugin without error on my godot 4.2.2 Are you facing this in a very specific part of the video? Would love to help you if you can share your project via github!
I know! very different video from me. Was this too in-depth? is this better fit for live session? in-addition to live session? Let me know!
Oops! For when button is being removed make sure to call "queue_free()" instead of just removing it as a child of dialogue box otherwise the buttons will live forever without being released causing a leak!
My biggest request: show off an example of a finished product right at the beginning of the video. a 42 minute video isn't bad, but its easy to just click away if I feel that I am taking the risk of maybe not learning a system that would fit my game. Other than that its not too in depth I think its a perfect amount of detail for what it is, it just takes too long to see it working. that said, great vid! Thank you!
@neverknow2474 I second this. Honestly I just find it easier to follow along if I know what the product I'm trying to make should look like
why is any code ever written in Godot? everything should be nodes
Building a tool to solve a very specific problem for your own workflow is the most programmer thing I can image. Giving that tool away to others who might also have that problem is truly the essence of FOSS. I'm sure some game in the future will benefit from this, big or small. Right on!
thank you for the encouragement and continued support!
Your dialogue system is an absolute gem. Thank you so much for your work on this addon, and this video
Thank you so much! This means a lot!
I find it interesting how confident you are in your programming to do the recording live then fix bugs on the fly. Very inspirational.
haha thanks!
I just wanted to make sure people see my mistakes and avoid them!
Thank you so much for in-depth tutorial! I'm new into gamedev and i want to make a dialogue-rich game but most of the tutorials go like "just use dialogic! fin". And theres you with amazing flexible tool which allows ton of functionality, with good in-depth explanations and reference code to check if i want to build dialogue parser from the scratch. You're life saver!
I'm glad this is helpful! Hoping to be more helpful as I work more on different aspects of my game and contents!
absolutely beautiful. worked like a fucking charm
i'm so glad to hear that it works! thanks for watching and using the tool!
yes exACTLY what i was hoping to find. God bless you man this is definitely how im going to do dialogue from now on.
Wow! Glad to hear this would work for you! I'm always helping and answering here and on my discord and on github so feel free to ask me any questions if you run into any issues
Thank you much for releasing it!
Glad I could help!
The funny irony of my currently following your card tutorials then imagining "what if I did roleplaying dialogue" and checking your channel to now find this. I pray I make it that far in development because I would love to use this. Even if I don't get that far, thankyou for making & sharing an open source dialogue editor / constructor!
haha thanks for the encouraging words and watching my videos! I'm always so happy to hear that I have been making something helpful and needed! so this is perfect! hope you achieve and get to the point you want in your game dev journey!
Excited to look into this and try!
yay! excited for you as well! :D
Thank you so much for creating this. Free plugins like this are a real time (and life)saver. Plus the tutorial was extremely good and useful, especially for newbies like me :D
Thank you so much for watching! I hope I can keep making things that continue to be helpful for you!
@@ezthedev That being said, I now ran into an issue where I can't get end_of_dialogue_reached() to activate. I imported your cRPG demo to compare code, but even that has the same issue where both options ultimately leave [...] button on the screen (& doesn't do anything).
DialogueResponse.eod_reached also returns as 'true' but it still adds [...], for both my game and cRPG demo. I didn't find a Github issue for this so is this a classic case of 'works on my machine' (but not on mine lol)
@@MixonBro yea end of dialogur signal is deprecated and is replaced by the boolean value.
The change now should be run the "clean dialogue box" function after the "..." button is pressed for the dialogues response with 'eod_reaches' flagged
At the least , let me re-upload yhe plugin so that the old behavior still works eventho it's deprecated! I'll let you know when it's updated (maybe in like 5 hours)
@@MixonBro OKAY! it's fixed. Please try and download and use the latest commit (0.1.0-hotfix1) and see if it works. Otherwise, try using 0.0.2 version instead since that's the one the demo was created in! thanks
very cool plug-in! feels a lot more "coder-friendly" than Dialogic, which definitely fills a niche! excited to see how this plug-in evolves :D
I also loved the live-dev-style of video! do you have a twitch where you do this sort of thing as well? would love to tune in to that :)
I tried doing twitch before.. but it was kind of difficult at the time to be developing and be "on" always haha.
I'm thinking I'll do youtube live sessions for these live dev style work in the future!
Thanks for the continued viewing and support!
Oh and yea! I peeked at Dialogic a little bit and I remembered specifically that I don't want a "visual programming" since once you get proficient the "ease of use" ends up hindering your pace in my personal experience.
wow thank you for this, you are a legend!
Thanks for watching! Hope this is as useful and exciting it is to you as it is to me!
I'm super excited to give this a try, thanks so much for making it open source!
thank you so much for watching and trying it out!
and .. i noticed the ko-fi tip!
I appreciate it so much!
Thank you for building this, its perfect!
thank you!
I remember finding your previous video a while back and finding it very interesting. This looks so much better than my graph plugin. I might take the plunge and switch to yours 👏 but will keeo watching and evaluate.
Thanks for taking interest and considering this tool! Any feedback on what would make it usable for you (if you feel some important features are missing), I'd love to hear about it and plan for the tools future.
@@ezthedev in the time since i did decide against it (for now at least), but have another project in mind which might benefit. the game i'm currently on does lean into doing a lot of operations in the graph (as you advise against :P) and relies on a lot of custom graph nodes which i intend to integrate with the event editor later (eg. graphical buttons rather than text line edit for the character and emotion by pulling the loaded actors from the editor), though complex stuff, all the virtual hooks, etc. is still done in the EventObject script. still, i really dig the idea of incorporating both graph and text editing together. i'm not the writer but the main issue is definitely all the dragging to get a single thing done, having both graph nodes and a simple dialogue script within the nodes seems mighty neat to me. especially since the texts in this game should have manual line breaks since they're delivered using (preferably) variably-sized speech bubbles.
i definitely suggest using a custom resource class for it though.., loading and storing reference to the file is much more convenient that way, as is saving it. like i have it so i make a CommandSequence resource and the plugin detects that, opening the editor in the bottom panel. no dealing with fragile file paths or anything of the sort.
@@el_primer_y_el_ultimo_caiman thanks for letting me know in detail of your use case and feedback! I did wonder initially if i should use the custom resource as the file instead of converting from/to JSON . This is helping me think towards using the resource little more, but i'm still somewhat split.. hopefully i can settle this internal conflict soon haha..
@@ezthedev Ultimately I made one final version of it, ended up writing it in C++ as a module so it can be extended from any programming language eg. C# + speed + all the features locked behind native modules. Less accessible since you need to build Godot yourself to use it but far more powerful.
I'm storing the data directly as a Node so that node references can be serialized with ease. It's called godot-flow-script if you're interested, though not very well-documented yet and there are a couple of broken things still. You can do basically whatever you want with it though, even a complex FlowNode should only take a couple hundred lines of GDScript to implement between its GUI and execution and data...
TH-cam recommended me your video right when I'm searching dialogue tutorial, I'm grateful I clicked your video
Yay! Algorithm is algorithming! Haha thanks for watching! Let me know if you have any trouble or questions with it. A lot of changes are also incoming soon :)
Thank you for your work. Awesome plugin! Thank you so much. Saves so much time.
No problem! I'm glad it is helpful!
A fantastic tutorial for a great dialogue system! I've tried one or two I've found around, but I couldn't get them to work properly or connect well with my signals, and this one is definitely working fantastic up until now, so thanks a lot! Thanks for the time dedicated to make it have an appropriate state to the public and release it, I know how much time it has probably taken from you, but we enormously appreciate it!
Just in case you (or somebody) has a minute, I would like to ask two questions:
1) How do you trigger this system? I have a code layout to trigger things with a button interaction, but I am wondering what would be the command to trigger this.
2) How can you change between two different dialogues? I suspect, since the node changing the json is the EzDialogue, that we need to add an instance of Node2D for the DialogueBox on each NPC we want to interact with, correct? What am I getting wrong?
Such a noob I am. I promise I try my best every day, but sometimes the simplest things seem to not work well for me, so if you have an idea on how this would be triggered in a basic way, that would be very cool. Well, anyway, take care, and have a great weekend!
So sorry I'm late on response! I just returned from a vacation and have been catching up on things! I'll try to remember to answer this within next few days!
@@ezthedev no worries, managed to figure things out myself. Thanks anyways, hope you had a great holiday time!
@@origenydestino13 oh! Phew! I'm happy to hear that you were able to figure things out!
Hi Ezra. You've made an awesome dialog system! Is there a way to change a color of one of the choices based on a variable? I couldn't figure that out.
Hi and thanks for watching!
Did you want to change the color of the choice font specifically? And did you want to set that in the dialogue?
@@ezthedev Color of the choice. Like a choice is unavailable.
@@Wilson-or1rt I see! I'd love to help you better in detail! You can share screenshots and longer texts and even share screen if you want to come on to my discord! I've been helping folks there!
I understand if you rather not Then I'll try to answer here as best as I can!
discord.com/invite/qxeNYFga
@@Wilson-or1rt otherwise, if you just want background color changed you can do something $button_node_namr.bg_color = Color("#ffffff")
Or you can change the color of ui components like "button" is by changing "theme" property
Here are some resources I've found!
forum.godotengine.org/t/how-to-change-color-of-button-backgorund-in-gdscript/16816
docs.godotengine.org/en/latest/tutorials/ui/gui_skinning.html
@@ezthedev thanks for your answers :) I've found a workaround for my needs. I compare choice_text var in add_choice function to the choice I want to make unavailable and change parameters of the node based on that comparison.
As an Ezra you have my respect
It worked perfectly, for two days afterwards it kept giving me several errors saying that certain functions didn't exist even though I didn't change anything
We love a good old ghosy errors that mysteriously disappear after no change!! AFAIK it might be the fact that certain "class" needs registering in thr name space of the project before functions are seen... which may take some time for engine to detect.
looks awesome. I was wondering if this could be combinded with the Rich system tho to get like text effects for dialogues tho
I played around with it and discover. it can work with it.
Haha I'm glad you figured it out! It treats any display as text so it should work as is for you to treat it as rtf!
I'm at 14 minutes of the video and just before that you show an error you've made with the var being reset @onready and I think that it's really cool and usefull that you show these kinds of mistakes! It really helps if someone stumble against the same issues and it also help knowing more about the @onready behavior ! Thank you, nice tutorial so far ! I'm trying to implement your cool Plugin to my Point N click prototype I really hope I'm going to make it work ! I think it's the only dialogue system I've seen so far that you can really adapt to differents style of games.
I'm so glad that you are finding this video and tool helpful!
It's so cool you are working on point and click style! I love that genre and personally I want to expand on that style too! Good luck, and let me know if you have any questions!
I found your channel a few weeks ago and was hoping this would be released soon! Congrats on developing this.
I've barely started using Godot (watched a lot of videos) but I wondered what you thought how you think your plugin is more/less appropriate than other Godot dialogue managers like Dialogic?
You know what? I have seen some of these other dialogue solutions but it all had specific things missing that I ended up wanting to make one myself! However, they have been around and open for longer so I'm sure in terms of resilience and community support they are much better than what I made.
Having said this. I would love to dive deeper to see what difference they are and when I would personally use one over the other!
Thanks for following along this journey!
Hey Ezra, thank you so much for making an open source project like this. I had a feeling that I would have to make a plugin like this but I basically have no programming experience so it wasn’t very viable. I’m having trouble with the choice index. No matter what button I click, it always comes back 0. I think it has to do something with the “_on_choice_selected” function in the dialogue box script because for some reason, “int” is green instead of red. I have no clue what could be causing this.
So the buttons should emit different "id" as part of the parameters for being clicked. I have a feeling there's something wrong with proper ID set up during the button creation.
Since you are new to programming, feel free to drop by our discord to share screenshots and chat more live! (It's harder for me to notice comments here) worst case scenario we can schedule a time to hop on voice chat on discord to help you real time while Sharing screen!
Here's the link
discord.gg/VCaG9S3u
Isnt it better to put the dialog window on bottom like the Animation or AnimationTree, on when you press the EzDialogue-node on the scene-viewer? The EzDialogue menu on top beside AssetLib is maybe not the right place? Opinion on that?
As well the Json file. Isit not better to create an own file-format? Even if it is json.
It may be! Exiting thing is I'd love to consider all these better options and make improvements! Maybe something customizable... si ce what works for me might not work for you! Please feel free to add these wonderful considerations as "feature request" on the github!
that's a cool plugin
Awesome plugin! Is there any documentation for this to use it in ways not covered by this tutorial?
Thanks!
As of right now, all the documentation is limited to the Readme shown in the repository here github.com/real-ezTheDev/GodotEzDialoguePlugin
And it's just "how to use" doc. I haven't had the chance to dive into how the underlying architecture works, but im out here always answering questions if you have more questions!
I'm also very responsive in our discord too if it gets to that haha
@@ezthedev Thanks! I was just wondering because I think it would be good to have a description of all the functions available in the plugin, but I think this tutorial covers most of it. Thanks again
@@pretendsushi2929 I see! Yea all the ones I cover here should be explained in the document, but video is supplemental
Fantastic add-on! Thanks so much for sharing! This will make what I'm trying to do with my current project so much easier.
I have run into a small issue however. I'm 25:00 into the tutorial and my code looks to be the exact same as yours, but for for some reason after I've already selected choice 1 or 2, the following response to those choices still have 2 selectable options available.
How do I have it where the choices stop popping up after the player has already picked one. I imagine this is an easy fix, but I'm not sure how to implement. If you're able to help, I'd greatly appreciate it.
Hey thanks for watching!
And it would probably best for me to help if you can show as screen shot the code and the way things are set up.
If you don't mind doing it, you can create it as an issue for the repository and I'll try to take a look asap!( I'm currently travelling so it might take a bit )
Meanwhile, if the choice elements are keep popping up after selecting a choice...there's a chance the dialogue box is not being properly reset to when receiving a new response signal.
You will want to queue_free() the choice buttons whenever new response generated signal is being handled again. Let me know if this helps otherwise, I'll be looking for the issues in the repository for a further help!
Thanks for responding. I have reported the issue in the repository.
when you say to queue_free() the choice buttons, how exactly should I go about doing so? I'm still new to Godot and have tried putting "queue_free()" in the dialogue box script's functions, but so far what I have tried hasn't worked. Where is the exact place, you'd like me to impliment the queue_free()? thanks again.@@ezthedev
@Zap-Plays I had that same issue, it turned out it was in my func clear_dialouge_box(): method
The issue was I had $VBoxContainer/Text.remove_child(choice) instead of $VBoxContainer.remove_child(choice)
Hope this helps!
idk if I will use it because I want to learn a lot, so, doing it myself, but it's cool bro thanks
Go for it! It is a great way to learn! Thanks for watching!
Apologies if you said it and I'm just to tired to take it in . . . . . but would you reccomend seperating it one node per conversation or one node per character? I I have a game with 8 characters across 9 levels with characters often being encountered 3-6 times a level. How should I devide up the nodes? ? ?
Plus do these all get attached to the main character or the indivdual characters? ? ?
I recommend separating it to have one dialogue file per character, and within the scene use just one EzDialogue that's shared by all the different dialogues!
I know this might sound all confusing over text! So, when I wake up tomorrow I'll make a video for this and try to upload asap!
"EASY Setup for Multiple Character Dialogue in GODOT" maybe..?
This looks awesome.
Btw, that thing at around 14:00 is so annoying, that the _ready function and @onready vars run after adding the child to the tree, and not when instantiating the scene.
It breaks the intuitive pattern of building something and adding it to the scene when it's all set up and ready, if you use default values. So no builder pattern, OR no default values, I don't know what's the worst choice here, haha.
I hope there's a simple workaround for it. If someone knows a better way to deal with that, please reply :)
[edit] Now that i wrote this, I'm thinking why was i even using @onready, if the values don't depend on the tree being there? I think that's the whole purpose of it. Maybe just saying "var X = Y" was enough
Pro tip: Control > Layout > Anchor Preset > Custom > Grow Direction > Vertical > Top
Awesome!!!
Why is this awesome addon is not part of official godot AssetLib?
Haha thanks for such a high compliment! I hope I can get it to a quality to embe actually good enough to be included as base engine tool :)
ah looks like this only works for normal visual novel sorta dialogue
tried making it work with a scrolling history type of system and when i call .next it makes the container of the text labels bigger lol
Haha actually I've helped someone setup scrolling history type like Disco Elysium with the dialogue. The box will need to be created in a slightly different way!
The font issue is interesting and strange! If you'd like, I can always help by getting on screen share voice call on the discord!
@@ezthedev well its not the font that gets larger but rather the margin container holding the vbox with the text bits and buttons are separate scenes
it just makes the margin container expand for some reason
im rather new to coding in general so its been an intresting lesson in trying to debug hehe
OOP wait its creating margin containers that are just invisible
yea it just seems that .next will create a new textlabel even if theres nothing to generate so it just generates empty i guess il try adding a check to see if theres anything to generate
yup i just added a check to see if the text arg was blank and if it is then not to generate a textbox and that works
Thanks for the plugin! This is extremely helpful and versatile! I have a few questions:
1. How would I be able to trigger a dialogue box outside of the _ready function? (I'm fairly sure the way to do it is to just use the start dialogue function in whatever you use to trigger it, plus the dialogue generated func)
2. How would you implement a typewriter style text scroll into the label? I think that text style and this plugin would be a great combo
3. I've seen you say to use queue_free() to keep the button instances from leaking- where do I put that in the code? It just makes it so it all disappears when I use it
thank you!!
Thanks for watching and using the plugin! I'll try my best to answer the questions here!
1. yup! just call start_dialogue whenever and from wherever you want to trigger the dialogue.
2. i treat "display" of the text and "building" of text to show separately. I would store the "texts_to_display" in full when you receive the response signal, then turn on a flag called something like "text_display_in_progress".
Under _process() you can have the text on the dialogue box increase by one letter from "texts_to_display" until the length of both matches while "text_display_in_progress" is true.
Make sure you set this to false once you displayed all of the texts from "texts_to_display".
Alternatively, you can just have it display one more letter every "given" seconds while the length of "displaying text" is less than "texts_to_display" if you don't want to use the flag.
I know this could sound confusing here... so i'll try and answer this on my next "answering all your questions" video!
3. it should be added under "clear_dialogue_box" function where the "choice" is being removed from the box.
So, in addition to having $VBoxContainer.remove_child(choice), there should be choice.queue_free() 15:15 line13
The way it's made now, does the page break need to have a "..." choice to move onto the next or could you have your interact button pressed anywhere move onto the next choice (Like in games where it has a little arrow at the bottom of the dialog box to indicate theres a page break)?
Frr! Got the same doubt. Want to make it completely keyboard navigable ngl.
@@cybeartron i feel like that wouldnt be too bad if you added controls to select and tab through the buttons
Yeah I just added a grab_focus in the ready function of the choices@@DiersakZelesnik
So the page break command "---" can move on when you call ".next()" on the dialogue handler Node.
Which means, on this example I made it call .next() when clicking a "..." button but you can make it trigger off of anything you want! Keyboard interaction, or automatic and timed and etc.
@@ezthedev Ah I see. So would you add an interaction in that if statement waiting for X interaction and call .next() on that interaction instead of populating a continue to next page button? like (forgive me for psuedocode here, not well versed in GDScript)
if choices.is_empty() && input.on_press()
Dialogue.next()
Most of my coding experience is in processing data so the concepts in UI design are a little foreign to me.
Thank you for the helpful responses and the FOSS spirit. This is pretty incredible.
im pretty new to this, could someone give a brief comparison between this and dialogic 2?
and one important point is also the translation/localization for the dialogues
Dialogic is great and have been around longer! One major reason I decided to make my own instead of just using dialogic (aside from wanting to try making something interesting) was that dialogic is too heavy on "visual scripting".
I have a philosophy that after you get really good at using visual scripting and highly UI based programming, the ui gets in the way of speed and flow! And this focuses on organization as graph, but ability to type out dialogie and its logic. Hope this helps! And hopefully someone else could answer as well! Otherwise, let me know if you have more questions
hey, making an undertale like game here and gotta say, this is highly appreciated lol. currently at timestamp 13:47 and struggling with getting the project to run right. everytime i run the scene it says "Invalid call. Nonexistent function 'instantiate' in base 'GDScript'." I've doublechecked the code and there seems to be nothing wrong with it in terms of typos. any clue on what the problem might be?🤔
Hi! Thanks for watching and choosing to use the tool! It might be better to create an issue on the repository where you can share some screenshots so I can have a better understanding on what might be going on!
But from what I can tell the instantiate "missing" might mean the engine can't find the class/scene to instantiate because the script of the scene/class has an error and can't be properly compiled. Double check that there are no errors there and that there are no typos! Otherwise, please create an issue on the repo and I'll follow up!
Hi! is there any way to resize text in the plugin? I'm referring the the right window within the editor. It's usable, but it's a bit difficult to read right now.
Hey! Have tried holding ctrl(or cmd for mac) and scrolling up and down? I can't try right now, but I think since I'm using godot's text editor, I think that kind of normal operation might work! Let me know if it doesn't work!
@@ezthedev Hi there, I just downloaded your plugin, and I'm also having trouble with this. I'm on mac, so for me the normal text editor zooms with "CMD" and "+". But when I try that on the plugin text, it stays the same size. CMD and Scroll doesn't work for me either.
@@jacksons6377 huh interesting! I'm using the default text edit window provided by godot itself so it should follow pattern ... have you tried while text window is focused, holding cmd+scroll wheel?
@@ezthedev Yeah, I cmd+scroll doesn't work for me either. Just for complete transparency, I'm on a laptop, so I'm using the trackpad. I don't think that should affect anything though. Does cmd+scroll wheel work on your end?
@@jacksons6377 for me it's ctr+scroll and that works for me.. I wonder if there's different key combinations for Mac. I'm surprised the normal pinchzoom TouchPad motion doesn't work :/
Hi! First of all, thanks for the great plugin and really good explanation video. I'm surely interested in using it in my projects, but still have few things that I didn't get during wathing the video and would like to get answer if it's possible.
So, my first question is - do we need to create new json file for every dialogue in the game? or can we just create dialogues in one file and then get the one we need direct in the code?
Second, I had an idea of positioning dialogue boxes above character's heads. How can I do that? Should I create few dialogue boxes and make them child nodes of characters for that?
Once again, thanks for the great video and plugin!
Hi! Thanks for watching.
You can certainly make separate json dialogue file per character/scene/dialogue. If you want to keep everything in one file, you can do that. If you look at the third argument required for dialoguereader.start_dialogue(), you can see that it takes the "node name". The dialogue will start from this dialogue node you provide.
So you can have different dialogue starting point in a single file and use the code to specify where to run from.
For having different types of dialogue boxes and positioning, I would personally setup a separate box for each type so that I don't have to worry about resizing/positioning in game. It would be easier to setup just in the editor.
Hope this helps!
It looks cool! How is it difficult to add translations(other languages) for dialogues?
I'm actually working on localization (translation) as my next feature! So stay tuned, but as a small idea. I'm planning on making it work along with the existing localization features of Godot. Specifically, using the widely used "gettext" docs.godotengine.org/en/stable/tutorials/i18n/localization_using_gettext.html#advantages
Of course, it may change if I find that it doesn't work well with the tool, but yea! Thanks for watching
im at about the 22:30 mark in the video, and I believe I added everything the same way you did, but anytime I try to run, it says "Invalid call. Nonexistent function 'add_text' in base 'Node2d' . Im very new to this (doing my first game jam) so any help would be appreciated :)
hi! so sorry, I didn't see this comment earlier!
There are few reasons why it might say that.
so I'm guessing you are referring to the line $DialogueBox.add_text(response.text)
that error "invalid call. Nonexistent function ..." Means, that the function named "func add_text(...)" you wrote in your DialogueBox.gd is not detected. Let's go through what could cause this mismatch.
1. you could have mispelled $DialogueBox and it's note correctly referring to the right Node in the scene.
2. You didn't attach DialogueBox.gd to the Node2D "DialogueBox" so it is treating your "DialogueBox" node as just plain Node2D, not the one you specifically defined.
3. You have an unresolved error in DialogueBox.gd, so Godot is unable to parse/read/interpret the Contents of DialogueBox.gd attached to $DialogueBox incorrectly. (the unresolved error could be anything from mispelling,indentation, or just some actual issue)
Let me know if any of this helps! Otherwise hop on the discord discord.gg/CpkCrtfc
and give us more questions and context (like screen shot of Dialoguebox.gd and etc)
Thanks so much! I’ll try looking at it again today
A maybe-newbie question: What's the best-case for triggering these dialogue scenes? Right now I have a visibility system with all the separate dialogue scenes in a CanvasLayer in my 3D scene.
Somewhere between the isolated dialogue scene and the CanvasLayer, they lose their initial focus, and I'm not sure how to shift focus back to the choice buttons for each dialogue scene as they activate. I was wondering if that was due to my hacky visibility toggling and if there was a better way.
I also wanted to say that custom signal feature is powerful! So convenient! Keep up the great work! ♥
Hi thanks for using the plugin and watching my video! There is actually something called "grab focus" so maybe thay is something you can use
docs.godotengine.org/en/stable/tutorials/ui/gui_navigation.html
Hi, your video lesson helped me a lot! can anyone tell me how to change the interface?
Thanks for watching! But to better help, could you explain what you exactly mean by "the interface"?
Hey, I've been trying to make it so that you type and press enter it will give you the dialog. Is there anywhere where I can find information on how to do that?
OMG! god like plugin
Pretty epic
This is so cool
Thanks!
Does this work as well as a text box or only as a button, like typing left and you go left?
It can work with whatever you want! It may take some figuring out but it should work!
@ezthedev This is my first project on Godot, where could i get help for this?
one question
How are chose id is being assign in plugin
i mean when i say dialogue.next(1) how does it know which option i am selecting
is this `1` refer to `#1` that we see in grapheditor?
Also it can not go backwards?
Example i have selected option 2 and in option 2 i would show text and then give option to go back to all options screen
That's a good point.
As of right now, the order of choice is the order they were processed, so typically top to bottom in the file.
Otherwise, most of the time it doesn't matter because the dialogue response will give you the choices in an array. For example, response.choices = [this is choice 0, this is choice 1, this is choice2]
And you would show these options to the player, and when the player selects a choice, you need to make sure you call the .next() with the choice id matching the index in the original array.
Let me know if this is still not clear.
@@ezthedev thanks for the answer
Could you please re read i added another question 😅
I see what you mean. You want to go to "previous node" I think that's a good feature to have! I should probably add it..
For now, you can hard code going back to the "menu" node with the goto command. Or you could save a variable with a name of the node I'm the menu node and later have a 'routing node' where you check the value of that variable and route to appropriate node if you wanted something where you can go "back" to different places.
Otherwise, I'll have to add "go to and come back" and/or goto previous node type!
@@ezthedev
>you can hard code going back to the "menu" node with the goto command.
Eh what?? where is goto command?
@@drac8854 ah sorry I mean the "-> menu node" I call the "->" go to haha..
Hey, I´m trying to implement your dialogue manager into my game. I followed your tutorial exactly, but when I try to start the game, there is an error with the start_dialogue function. The error states: "Invalid call. Nonexistent function "start_dialogue" in base "Nil"." I´m still pretty new to programming and I can´t seem to figure out what I did wrong. I would really appreciate it if anyone could help me with this issue.
Hi! It could be a lot of things so it would help to see what you have going in your project. Do you think you can upload your project in github or if you want, you can join our discord and show some screenshots and I can try and help!
@@ezthedev alright, I'll Go on your Discord. Thanks for the Fast reply.
Great! Here's the link
discord.com/invite/c8gcPMp9
Incredible! Just started learning Godot, and I just have one question. Is it possible to change the dialogue_json variable through code by passing in a JSON so I could use this node with different conversations? Whenever I try to change it, I get the error of "Trying to assign value of type 'String' to a variable of type 'JSON'." In short, is there a way to use a JSON as an argument without using just its string file path?
Hiya thanks for using the tool!
Let me see if I'm understanding this right. You want to programmatically change contents of the JSON file generated by the plug-in?
It might help me understand better if you can tell me the specific desired beahvior!
Sorry for the confusion. I don't want to change the contents of a single JSON. I want to have multiple JSONs, and be able to give it a different one whenever it's called. Like, what I was trying to do initially was have one scene that would initiate a dialogue scene, and as it does this, it would give give a new value to a Singleton file's variable called "DialogueToLoadNext." Then, when the dialogue system loads up, it would read the path from the auto loaded Singleton, and load whatever conversation JSON it's pointing to. But this is where the error comes in, as it is trying to grab a JSON but only finds a string. Is there any way I can achieve this without making a new copy of the node for each individual conversation JSON?@@ezthedev
I see! Well, underneath the hood when you hand over the json file to the "EzDialogueReader" Node to ".start()", it reads and loads the json as Resource object called DialogueResource, which I think would help with what you want to do. Let me make some changes so that it can be used easier for your case(might take me some time haha)
I appreciate the help! You're really going above and beyond here. Thank you
Haha always happy to help and see the game makers follow their goals!
How would I add audio files to the specific dialogue(-options)?
Do you mean you want audio to play after the option is selected? Or do you want to play something as they get revealed?
If you want the sound to play when the option is selected, you can have something like.
?> option number 1 {
signal(sound,sound_name)
-> next dialogue node
}
And implement the custom signal with where you would take "sound_name" to determine which sound to play.
Let me know if this helps. Otherwise, I could work on showing example in future videos
@@ezthedev Thats cool, thanks! Yeah, if you dont mind, showing examples would help me a lot since i am a total beginner in godot
does each node include options for localization?
It needs to! That's actually in my next list of features. I'm hoping to make it so that localization json is extracted from the dialogue files and be able to take in localization language-country during processing.
But to answer your question, at the current version localization is not natively supported. :(
so good
for some reason i get "Invalid get index 'start' (on base: 'Dictionary')." 22:36
so sorry for a late reply! I have been so busy.. taking a look right now and will answer soon!
does it say on which line/file the error is? usually when you see something like that there could be an unresolved error within the file, or the name of the variable is written wrongly.
Feel free to join the discord and ask me questions so I can help you looking at screenshare / screenshot!
discord link: discord.gg/KycCwPQT
Can we use it for normal dialogues? I mean without the option to choose (yes or no) (right or left), thank you
Certainly! The choices are only implemented incase you need it! Otherwise, you can "move" to the next node by doing .next() without providing any choice index! I think there might be one example in this video between choices.. haha if not let me know if you need help figuring out!
@@ezthedev Thank You Very much 😊
You are awesome, appreciated. thank you very much!
hope it is helpful!
What about localisation functionality?
It's coming up ! By next 2 major patches! That's the plan
how do you transfer the github file it isnt working for me in the addons
Hey! Sorry you are having dome trouble. Could you tell me more in detail exactly what you are trying to do? I'm not quite understanding where you are trying to transfer the file to.
If it is to your project, you can download first then copy and paste the folder.
@@ezthedev I'll step in here, if y'all don't mind! I've downloaded and imported the ez_dialogue folder into an addons folder in my project, just as you did. I can see it in the plugins section of project settings, BUT when I go to enable it, I get the following error:
Unable to load addon script from path: 'res://addons/ez_dialogue/ez_dialogue.gd'. This might be due to a code error in that script.
Disabling the addon at 'res://addons/ez_dialogue/plugin.cfg' to prevent further errors.
I am using Godot 3.5 - I hope that's not the issue.... it very well could be, and I'd understand (not ready to jump to Godot 4 just yet)
Thanks for any and all assistance!
Oh interesting! I have not tested the plugin with 3.5.. I have a feeling that might not work since I know there are some keywords and code in the plugin that only works in 4.0+
Is it possible to make it display one line at a time?
hi thanks for watching!
Do you mean one line and wait for user interaction then next?
or do you mean you want animated text display like some old school RPG?
I can't rename the nodes and I can't connect them either, please help
Hey! Sorry I had released a broken version recently. It should be fixed now. Please try the newest build and let me know if it is still broken
Also connection should happen automatically when using the goto (->) command. It might be delayed since recent build because I made it update less but maybe that is not good.. ill look into fixing it again!
I reinstalled and it works properly now, and I rewatched the video closer to figure out how to connect the nodes lol. Thank you so much!
I was wondering if you might know how to define a variable in the dialogue editor. I'm very new to this whole thing so maybe the answer is obvious, but what I'm trying to do is include the name for the speaking character in each dialogue node
@@maxperegrine7055 i'm glad it worked!
So, i made this tool so that there is no native way to assign /define variables . However, you can make your own signal to do that if you want to.
Let me explain and show you example on this video by timestamp.
One way is to pre define the variable in the "state" and then just use it in the dialogue.
You can define a variable in the state object as seen in this example 26:12 On that time stamp, I am defining a variable to use as an example for the "varaible injection" example.
Or if you want to be able to define a new variable via something like "singal(set,variable_name,variable_value)", you can follow the example on 29:35 .
Hope this helps!
Is it possible to export for HTML after installing this plugin?
Do you mean could the game be exported as HTML normally from Godot? I usually export my games as Web play, so it should be able to.
Although, I know Godot web export does have some known issues generally.
Or did you mean something different?
@@ezthedev yes, exactly that. Than you!
hi i am using c# will your plugin works anyway?
Hi! I don't see why it wouldn't! But I haven't personally tried it out yet!
I havent looked too deeply yet, but there seems to be a solution/discussion regarding using the plugin with c# and it seems one of the users were able to work it out! Please check it out and if you need more support feel free to let me know!
github.com/real-ezTheDev/GodotEzDialoguePlugin/issues/7
Does this work for C# ?
It should! Conceptually thr class and it's functions for the dialogue should be same as any other gdscript to c# usage.
I've had some users say they were able to use it with c#! So i know it can be used, But also had some people ask how they would do it. I have not worked with c# in godot so I don't have a direct answer... so it'll be a but of experiment for me to try and figure out exactly how that might work.
I was finally able to come back to this tutorial and finish it! EzDialogue works wonders and I'm hoping it can be my go to dialogue system for when I'm trying to make a game, especially since I'm an amatuer.
Idk if you can answer this or if maybe you're planning to address questions in an update video, but I'm currently trying to attach the EzDialogue system to any NPC the player interacts with. I have an interaction system that I got from the channel DashNothing, but when I try to impliment EzDialogue into this interaction system, either the game crashes or EzDialogue doesn't pop up at all. I'm simply trying to have it where when a character walks up to a NPC and the button pressed[E] to interact with said NPC is pressed, EzDialogue is triggered. If there's any way you can help, I'd greatly appreciate, if not, I totally understand as i'm asking for something out of the scope of the video.
Hi! Thanks for using the plugin and watching the video!
The use case you are mentioning with interacting should work normally. (In fact, my game uses such interaction.)
I'll have to check out the interaction system you mentioned to better understand, but at base, it should work if you trigger ".start_dialogue" wherever you want to trigger the interaction. There maybe nuisances with giving control focus between different UI and such.. hmm
I'll try and cover it on my next "answering questions" video!
Can you give another link to your discord please ? all those you sent are dead now
Ah! Yea sorry haha to prevent spam bot joining I put time limit on links! Here's the new one you can use!
discord.com/invite/kEtrbtf5
cant get it to install properly but looks cool
Hi! What version of godot are you using? It's for 4.x so if you are using previous version that might be the issue. Otherwise, I can help you!
@@ezthedev thanks for the reply! It’s the latest version which I think is 4.3, but maybe it’s because I’m on a Mac or something?
@@DiscourseElysium hmmmm it shouldn't impact the OS version, but to help you better what are you seeing as the problem? what part of the plugin just not working when installing?
@@ezthedev when I drag and drop I get an error on the bottom of Godot that says something like "failed to load plugin with parse error"
@@DiscourseElysium very interesting let me try to replicate and get back to you
The demo is leaking the buttons. Yes, you removed them, but you didn't free them. Nodes are not reference counted.
oh interesting!
You mean the demo in the repo?
I'm utilizing "queue_free()" which seems to indicate it internally dealloc and if there is any unhandled reference that reference would be invalid.
I checked the debugger's Node count during the demo's run and it does seem to drop the node count when buttons are removed. Is there something else that needs to be done, and which monitoring should I be looking at to confirm this?
@@ezthedevI meant in the video, when you use remove_child. If I had found something like this in the repository, I would have made an issue on github.
And yes, queue_free should free the nodes sometime between the current frame and the next. There is a lot more to how it works, but almost always it is what you want.
Ah! I see! Haha thanks for pointing it out!
Hey, great addon, I really like it but I feel there needs to be some kind of tutorial on how to implement it in an actual game like an FPS (I've barely seen tutorials on those and I need one rn). I'm having trouble mainly with the game showing different dialogue depending on what is instantiating it (For example if I click button 1, i wanna get button1dialog.json as the dialog tree, but if I click button 2, i wanna get button2dialog.json)
I'll look at some opportunity to answer specific questions like these later!
For this particular example, you can always have a button call EzDialogue.start_dialogue(button1dialogue,state)
that way you are "starting" the dialogue with two different dialogue file when clicking on a button.
Now , if you mean you want it so that you can have a dialogue that looks like
?> button 1 {
signal(start_new_dialogue,button1dialogue)
}
?> button 2 {
signal(start_new_dialogue,button2dialogue)
}
you can implement your "custom signal" named "start_new_dialogue" to close out any on going dialogue logic and start a new dialogue.
I get this error:
Failed to load script "res://addons/ez_dialogue/ez_dialogue.gd" with error "Compilation failed"
and also this one:
Failed to load script "res://addons/ez_dialogue/main_screen/main_panel.gd" with error "Parse error"
Ooo this is as soon as you paste the addon and enable it in your project? If so, what version of godot are you using? The plugin support is only for newer versions of godot (4.x)
Also, please make sure you are usijg latest version of the main branch. Meanwhile I'll try to test in a bit and see if I get the same error!
it seems like i can add the plugin without error on my godot 4.2.2
Are you facing this in a very specific part of the video? Would love to help you if you can share your project via github!