Ways to get/set dialog data
Dialog.lang_data is a dictionary with keys: "characters", "dialogs", "langs", "default_lang", "message_config", "signals", "terms", "variables", "editor_config"
You can get or set a variable or term from code. Useful to change a players/npcs name, set custom names, give gold, etc.
Action | Function | Example |
get a variable's value | Dialog.get_variable(id) | Dialog.get_variable(0) |
get a term | Dialog.get_term(id) | Dialog.get_term(0) |
access a character's name | Dialog.lang_data.characters[index].name | print(Dialog.lang_data.characters[0].name) Dialog.lang_data.characters[0].name = NewName |
The second to last button's tooltip in the text editor is mislabeled, it should read "Show a Character's Name".
When trying to emb an image in the text I get:
Invalid get index 'size' (on base: 'Dictionary'). Did you mean '.size()' or funcref(obj, "size") ?