So, what exactly does this do? I looked it over, and I thiiink it will just one-by-one basically do game:start_dialog() for every dialog in your game so you can check them? That's cool. How would you go about calling this, just have an NPC that you delete later whose script requires this debug script and calls game_meta:start_dialogs_debug()?
Yes, but you can also start only a few dialogs if you add the optional parameters to the property list:
--[[ Get dialog ids list, ordered alphabetically. Default variables:
language (string, optional): if nil, the default language is used.
prefix (string, optional): prefix required for dialog ids.
start_dialog (string, optional): start from this one; by default: first dialog.
end_dialog (string, optional): ends in this one; by default: last dialog.
--]]
function game_meta:start_dialogs_debug(dialog_properties)
For instance, use
game:start_dialogs_debug({prefix = "blablabla"})
to start only the dialogs with the prefix "blablabla", or
game:start_dialogs_debug({start_dialog = "c", end_dialog = "f"})
to start only the dialogs whose ids are between "c" and "f" with the order for strings (which in Lua is the order of the dictionary).
-You can call those codes from the console or from Lua code (map scripts, etc). Yes, using an NPC is a way to use the code.
-Note that some errors may appear for dialogs that require input variables, since the script cannot guess when they are needed, their types, or how many of them appear.