before i am composing my concept into a sexy smexy e-mail id like to know what the best "format" for a file would be to read from.
Best would be some kind of yaml for me, but i dont know if a can iterate through the entries.
For example a file would contain this:
dialog_part_1
text: "some cool text"
action: "dialog_part_action_1"
dialog_part_2
text: "this could be also a text about some stuff"
action: "dialog_part_action_2"
(...)
The given string from a function would be "dialog_part_1" (or any other unique string in this file)
I now want to search for "dialog_part_1" and get its "text" and "action" entries.
grab it and create a table(!) out of it.
This table didn't exist before because
a) we don't know how much dialog parts could be in the current dialog. So creating it when needed would be great
b) the name of the table is dynamically created by the given string.
In the end i want to have this extracted when searching from dialog_part_1:
local dialog_part_1 = {
text = "some cool text",
action = "dialog_part_action_1",
}
Any ideas how to format and search for / grab the "sub entries" and create a table out of it?