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.
Great module, thank you!SebI particularly appreciated the numerous challenges to write the code *before* you give the "teacher version".815May. 22, 2024
My favorite aspect of BBCode RichTextLabels is ...tesfalcon... displaying IMAGES! I used RichTextLabel in my game to display images to show the player which game items produce with which other game items in the merge trees and in the catcher. I'm not talking about emojis in speech, but explaining the game's characters, enemies, etc. using the actual images from the game in the notebook.14Jun. 19, 2024
Cannot wait for M8FernandoIt was a great module, I learned a lot and it made me excited for the next one.
Just thinking about writing the name of a character and automatically knowing what texture use, what sound play and which accent color use, made me thrilled for more.12Jun. 16, 2024
BBCode parseilliterate-spiderHi guys cant figure out where to start to put to solve it. My mind went straight here in code.
I inputed line 5
Thanks in advance!
```gdscript
func show_text() -> void:
var current_item := dialogue_items[current_item_index]
rich_text_label.text = current_item["text"]
rich_text_label.text = rich_text_label.get_parsed_text()
expression.texture = current_item["expression"]
body.texture = current_item["character"]
rich_text_label.visible_ratio = 0.0
```20Nov. 13, 2024
Love BBcode, but why did they choose it?enraged-manateeThis is just an observation. As an older web dev, I loved BBcode. But it fell out of favor a decade or so ago. I don't know why that happened. Any thoughts on why Godot devs chose bbcode over some of the more popular markup languages? Don't get me wrong, I love bbcode. Just curious about why a modern engine would use it - if you happen to know or have an opinion. 30Oct. 14, 2024
BBCode, localization and interpretation questionalarming-baboonBrowsing through [BBCode reference](https://docs.godotengine.org/en/stable/tutorials/ui/bbcode_in_richtextlabel.html#reference), I am amazed and also a bit frightened by the sheer amount of possibilities (images, links, tables, opentype features…).
Somehow, I can't shake the feeling that dialogues lines that would get translated further down the line by someone else that might not even be a developer should not contains so much code, especially since this code could change based on context, like for example :
- link to input buttons images if the player uses a controller, or key names instead if the player uses keyboard;
- different color on certains words if the item is or isn't in a player inventory;
- and so on…
So my question is: does godot provides us with a mechanism that would allow us to use a custom small subset of bbcode tags that get transformed in a specific context-based hellish tag soup in our game? Something that would take a string like:
`"You must find [weapon]excalibur[/weapon] to fulfil your quest!"`
and transform it in-game as
`"You must find [img]res://x[/img] [outline_size=x][outline_color=#x][b][color=#x]excalibur[/color][/b][/outline_color][/outline_size] to fulfil your quest!"`
with values dependant on game context…20Sep. 27, 2024
Help with making hints using BBCodeFioretinI’m trying to make hints in dialogue using the BBCode. Ideally, the hint will pop up when the player hovers over the text. I’ve added the following line of code into my script, but the hint doesn’t pop up when I hover over it. I think I’m missing something but I’m not sure what to do…
```gdscript
var dialogue_items : Array[Dictionary] = [
. . .
{
"expression": expressions_dictionary["sad"],
"text": "[i]\"The world is what you make of it,\"[/i] or so [hint={Pink}]she[/hint] says.",
"body": bodies_dictionary["sophia"],
"voice": voices_dictionary["voice_1"]
},
. . .
```
Also, in certain games, they add an additional text above the dialogue to clarify what certain words are. For example, in Honkai Star Rail, the first time you hear about the Interastral Peace Corporation, there’s a smaller text right above it that says “Galatic Monopoly”. I wonder how to implement such things in Godot?130Sep. 09, 2024
Typo about BBCodeTJHi! The lesson says:
> Notice how in the last line, I *nested* BBCode tags to combine the bold and italics format.
Looking at the actual code, what is probably intended is the `tornado` and `rainbow` tags.10Aug. 16, 2024
Button effect on 2nd attempt seems has no toggle button animation?CelsDid I miss something? Seems the toggle button and focus (color yellow animation) seems not show after the 2nd attempt?50May. 22, 2024
The last BBCode dialogue sentence change suggestion doesn't match the animationGurkWhen suggesting the three sentences changes, I noticed in the changes log that the third change is not the sentence corresponding to the rainbow decoration, and it show the same sentence twice (old and new).
I checked in the code reference and i saw that it actually changes the last one:
Instead of:
`"text": "Mhhh... I see. I'll keep at it, then.",`
It should be:
`"text": "Thanks for the encouragement. Time to [tornado freq=3.0][rainbow val=1.0]LEARN!!![/rainbow][/tornado]",`10May. 18, 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.