Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

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.

ActionFunctionExample
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 nameDialog.lang_data.characters[index].nameprint(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") ?

Thank you for the notice. I have uploaded a new version with fixed bugs and added a new command to the advanced text editor 

Running into get_data() null issues when adding a character sprite full or face.

I zipped my current project in case it helps. No rush, everything else works fine.

https://files.catbox.moe/1oozri.zip

I reviewed your project and saw where you were wrong.

You have put the root folder for the graphics in the path "res://Graphics/UI". The dialog tries to find the image in that path ("res://Graphics/UI/image_path") but in your case, in "res://Graphics/UI/" the image doesn't exist because it is in "res://Graphics/"

The editor will always try to move the files you use to their correct folders but sometimes it can fail especially when the files are in subfolders within the folders you have defined in the settings


Anyway throughout today or tomorrow I'll try to upload a new version that accepts subfolders and correct a bug I found testing your project that makes a command duplicate when you try to edit it with dobleclick