Frequently Asked Questions
Here you will find the answer to the most frequently asked questions about Dialoguer.
How do I integrate Localization into a project using Dialoguer?
Dialoguer is not a localization tool, and as such, it does not include any localization tools. That said, using an external localization tool is very easy with Dialoguer. Most localization tools use a Key->Value system, where you use the Key to look up a value from a table, and the system returns the value based on the user's language settings. In Dialoguer, simply use the Key inside the dialogue text boxes. Then, in your GUI controller that you create for your own GUI, use the returned DialoguerTextData.rawText as your Key in your localization system to get the localized text, then use the localized text in your GUI controller.
How do I hide dialogue choices based on variables?
In the TextNode and BranchedTextNode is a checkbox called advanced. Check that box, and you will see a metadata field. In this field, you can place whatever text you'd like. In this case, you can use a simple key->value formatted string like so: "1:lockpick:20, 2:boolIsTrue:3" - Then, in your onTextPhase method of your GUI controller, this metadata can be parsed, and used to hide/show your branched text choices based on specific properties. This given string for example would hide choice 1 if the player's lockpicking skill was below 20 AND only show choice 2 if global boolean 3 is true.