The player is now a duck, finally! (+ parallax background, lighting, and more!)
De_Narm @ De_Narm @lemmy.world Posts 5Comments 1,012Joined 2 yr. ago
De_Narm @ De_Narm @lemmy.world
Posts
5
Comments
1,012
Joined
2 yr. ago
The main benefit of keys for each dialogue only comes into play for localization. You could send your ridiculously long map to a translator and nothing else. When loading the dialogue, simply read a global language variable and change the file you read from.
There are a few other benefits of having every line of text in the same place. For starters, you could drop the entire thing into a spell checker. You can quickly change a few lines while having the entire exchange in view to make sure it flows right.
Lastly, you can add keys for common names. Assume you have a very important collectable, let's say 'bread'. You could write your dialogue with placeholders like 'You have to find the %s to save the world!'. Then in you dialogue object, you use an array like '[dialogue-key, word1-key, word2-key, ...]' and apply them, which is done with a '%' in Godot. That's more initial work, but now you could change the name by only editing a single value. Also useful for stuff the player can name.
But of course, game dev has no rules. If it works for you, that's all your system needs to do!