Use this space for questions related to what you're learning. For any other type of support (website, learning platform, payments, etc...) please get in touch using the contact form.
Just thanksstupid-grouseNathan you are one of the finest and most thoughtful educators I have ever come across in my entire life. You leave absolutely no stone unturned and the deliberate care and quality of your approach the the way that you anticipate questions is something to behold and an absolute gold standard of an approach. The breadth of reference and the way you take a complete computing science education and by implication of the way you walk people through this practice force your students brain to really impress upon themselves the practical implications of what this means in terms of future frameworks and what they can build and iterate on is something else, especially in your deeper segues into formats and teaching by voluntary depth.
This is one of the most remarkable ways I have seen the notion of computing science thought being conveyed in a practical fashion that conveys important theoretical concepts in a way that students naturally understand if they follow along. I just had to say that because I've been learning and teaching in my on way professionally for a long time and you have really blown me away in the way you have presented this course. No one is walking away from this feeling they did not get their moneys worth. I'm a working data scientist and economist and i wish that data science and economics were taught this way. Had to get that off my chest.110Jul. 25, 2024
Is there a way to stop exported resources getting reset?EmFirst off, thank you all for the work you've been putting into these courses! They've been so thorough, fun, and extremely helpful. I saw M8 was up just as I started tackling a dialogue system in my own practice project, and it answered a lot of questions I was about to start experimenting with - particularly with using resources to load dialogue branches.
An issue I've run into with exported resources is that changing certain things about the scene composition or script ends up completely resetting all resource data I've put in via the inspector.
For instance several times through this module, I spent some time configuring a sample dialogue in the exported field in the inspector, customizing the sprite expressions, etc. Then I went to update the export variable's name to something more fitting and... it all completely vanished, and I had to start from scratch tediously clicking through and re-filling everything all over again (but with much less effort this time, haha).
In this case, it's a small practice setting so it's frustrating, but not that big of a deal. But this would be a huge problem if you were working on an actual game with more involved scenes and lots of settings to adjust per item.
Is there a way to stop this from happening, or is it just a limitation of exporting resources? If you risk losing everything due to a misclick or typo, would it be better to just load dialogue data from an external file or script instead?
Sorry for the wall of text, and thanks again!31Jul. 18, 2024
It wouldn't let me delete all the items in Dialogue itemsThrillhouseTo test the warnings tool I did every step, reloaded the project and deleted all the items in the inspector but it won't let me delete the last item or set Dialogue Items size to 0.
Output says"set dialogue_items" every time i click the trash item or changed size to 0 but Array[DialogueItem](size 1) remains so couldn't test the warnings. Don't know if i missed a step or something?10Oct. 11, 2024
Select character etc in dialog from dropdowndavidakWhile we had the array of characters, we could simply select them using their name. But now we have to load a file.
To make editing the dialog easier, just from the Inspector, it would be great to be able to select the character, expression and voice from a dropdown. It is possible to export a list of options?40Oct. 02, 2024
The elements of DialogueItem.new() are messed updavidakI worked through this lesson until "Filling empty slots in arrays automatically", but the elements of new dialog items get messed up.
![Godot items](https://imgur.com/a/tkqeA03)
The text box, that should be empty, has the voice audio assigned. The voice is empty. The character has the expession and the expression is empty. As if each item get the default value of the next item.
When i save the item to a file after creating it using "Add Element", it looks like this:
```gdscript
[gd_resource type="Resource" script_class="DialogItem" load_steps=5 format=3 uid="uid://o6x2ihqnx2fd"]
[ext_resource type="Texture2D" uid="uid://d000xjtr4iqtk" path="res://assets/emotion_regular.png" id="1_nu3s8"]
[ext_resource type="Script" path="res://lessons/dialog_choice.gd" id="2_2ikr0"]
[ext_resource type="Script" path="res://lessons/dialog_item.gd" id="3_syh5c"]
[ext_resource type="AudioStream" uid="uid://chgko4hmxwxu5" path="res://assets/talking_synth.ogg" id="4_n5lu5"]
[resource]
script = ExtResource("3_syh5c")
choices = Array[ExtResource("2_2ikr0")]([])
text = ExtResource("4_n5lu5")
character = ExtResource("1_nu3s8")
```
Any idea how that can happen?
I also noticed that when i leave this messed up dialog item, save the scene, reload saved scene, it is different than before! The text is empty, the voice has the audio, the character and expression both have the expression.
Could this be a bug in Godot? Did anyone else experience this?30Oct. 01, 2024
I added the ability to make a choice button one shot.Brain Siege GameworksI did it by declaring two boolean vars in dialogue_choice one of which has a setter function.
`@export var is_one_shot := false`
`var is_expired := false : set = set_expired`
`func set_expired(value : bool):`
`is_expired = true`
In the main Dialogue script I added a condition to check if the button was connected to show_text() or get_tree().quit
`if button.pressed.is_connected(show_text) or button.pressed.is_connected(get_tree().quit): # only undisable the button if it is connected`
`button.disabled = false`
In Create Buttons() if the choice did not have is_quit be true, it now checks if the choice does not have is_expired set to true. additionally if the choice is one_shot button.pressed is binded to the choice's set_expired() setter function.
`if choice.is_quit:`
`button.pressed.connect(get_tree().quit)`
`else:`
`if !choice.is_expired:`
`var target_line_id := choice.target_line_index`
`button.pressed.connect(show_text.bind(target_line_id))`
`if choice.is_one_shot:`
`button.pressed.connect(choice.set_expired.bind(true))`
It adds a fair bit to the dialog system and a similar method could be used to make one button lead to a second dialog choice on subsequent uses.30Sep. 24, 2024
Multiline Docstringssebbianuuushort version: it's possible to do it by adding the BBCode tag [br] wherever you want to be a new line.
long version:
In the Documenting your code section you have an example docstring like this:
```gdscript
## DialogueChoice takes:
## - a text
## - a target dialogue line index to go to when picked
## - optionally, [member is_quit] can be set to [code]true[/code]
```
I'd guess the intention is that it's supposed to be a sort of a list with each entry on a new line.
However looking at the in editor documentation now, we can see it put everything on a single line and it's looking a little awkward.
```gdscript
DialogueChoice takes: - a text - a target dialogue line index to go to when picked - optionally, is_quit can be set to true
```
It's ignoring all the line breaks in the docstring!
We can fix that by putting the BBCode tag [br] in front of every line that's supposed to be on its own line
```gdscript
## DialogueChoice takes:
## [br]- a text
## [br]- a target dialogue line index to go to when picked
## [br]- optionally, [member is_quit] can be set to [code]true[/code]
```
Now it shows up in the documentation as expected:
```gdscript
DialogueChoice takes:
- a text
- a target dialogue line index to go to when picked
- optionally, is_quit can be set to true
```
The same thing applies to docstrings for any property, even when displaying them by hovering in the inspector.50Sep. 14, 2024
Did I understand this part of the lesson correctly?HazlarHello,
Here is the diagram that illustrates how I understand the script but I have a question.
[https://ibb.co/nQHxyKS](https://ibb.co/nQHxyKS)
Does c`hoices = new_choice` become real only when I click where the red arrow points? or is it already created implicitly?
When I read the script I am a little confused I have the impression that line 12 and 13 do the same thing from the inspector's point of view.
Thanks30Sep. 11, 2024
Just here to say that this lesson was great!iDieHello,
I really enjoyed this lesson and today, I was able to reuse almost everything I learned in it to create some configurable scenes -> it was a great feeling!
It might not be visible in-game but it makes things much cleaner in the editor.
Keep up the good work!
Dai10Sep. 04, 2024
Setter function not populating in the DocsStonemonkeyWhen I add the `Set = Setter_Function` syntax to the `dialogue_items` variable the **Method** entry for the Setter Function won't appear.
Adding functions before and after the set_choice_items function appear just fine in the documentation. When I try the inline method of writing the Set code it still won't appear.
```gdscript
@tool
@icon("res://assets/dialogue_item_icon.svg")
## This resource represents a complete dialogue entry.
##
## Dialogue Item takes:
## - a choices array
class_name DialogueItem extends SlideShowEntry
@export_group("Choices")
## The array of choices in text format along with their target index and optional quit state.
@export var choices: Array[DialogueChoice] = []:
set = set_choice_items
## This setter adds a blank Dialogue choice incase there is none.
func set_choice_items(new_choice_items: Array[DialogueChoice]) -> void:
for item in new_choice_items.size():
if new_choice_items[item] == null:
new_choice_items[item] = DialogueChoice.new()
choices = new_choice_items
```10Sep. 04, 2024
Tools are amazing!grave-toadJust wanted to drop a comment highlighting how valuable I find this type of lesson!
Most tutorials I have done in the past only focus on the flashy front-end parts of making a game, shying away from more "boring" topics like this one. But lessons like this really help me understand how important it is to learn how to mould the game engine to your needs. Creating powerful tools to liberate and lubricate the creative process.
I feel like learning this stuff is a total game changer.
So thanks to the whole team at GDQuest for taking such a holistic, thorough and thoughtful approach with this course!10Aug. 24, 2024
Changing character voices!AJ StudiosBefore I jump into the question I want to say that: This has been the toughest module so far, at least for me. I like that it pushed me to my limits, I even experienced a lot of frustration but now I have a general idea of how classes and resources work. I can see the importance of resources and how it can make our lives a lot simpler in Godot, specially been able to customize the editor based on our needs.
**Thank you for the great effort that was put into this module!**
Ok, back to the question. How can I change the second character's voice? I added 5 elements to the Array, the 4th one contains the texture of "*Pink*, but the "*talking synth*" still plays the original voice even after I change it in the editor.
Note: I removed the synth's `@export var voice := preload("res://assets/talking_synth.ogg")` but the synth still plays.
Here's the Zipped file: [https://drive.google.com/file/d/1zMdE6gbvgfmJ5yASNYSWkIHjoBuoBFKy/view?usp=sharing](https://drive.google.com/file/d/1zMdE6gbvgfmJ5yASNYSWkIHjoBuoBFKy/view?usp=sharing)20Aug. 24, 2024
Incorporating AnimationPlayer / AnimatedSpritelean-flyHi! First, thanks for making this course, as an artist I started from mostly 0 coding knowledge and have learned a lot so far!
Now I am working on a project that is purposely animation-heavy with hand-drawn assets. Is there a "clean" way to refactor this dialogue system to allow for animation playback and/or selected animated sprite frames together within the dialogue?
I have tried to look this up for a while and tested a few things without luck, so I am expect my technical knowledge is not quite there (yet). 40Aug. 17, 2024
Sentence ChangeStevenThis sentence "While static typing is a good starting to make your code less error-prone" is missing a word. "While static typing is a good starting *point* to make your code less error-prone." It's in the Editor Warnings sections at the beginning.10Aug. 12, 2024
Editor Warning Confusionwell-to-do-owlJust had a bit of confusion on the editor warning section. It's mentioned to get editor warnings to override the virtual function `_get_editor_warning()`
However in the provided code and in the code reference at the end `_get_configuration_warnings()` is used instead. I thought overriding virtual functions means you'd use the same function name, is there a typo or something I am missing? 10Jul. 21, 2024
Lesson Q&A
Use this space for questions related to what you're learning. For any other type of support (website, learning platform, payments, etc...) please get in touch using the contact form.