Hi I hope this hasnt been already asked
I'm making a text-based rpg and I'm trying to understand wich is the best way to store a very large amount of text paragraphs into external files, in order to share them to writers/translator etc, just like the dialog.tlk file of bioware games, which contains ALL the text data of the game. (examples = http://bgtlk.cpptea.com/)
I'd also need the archive to feature some group-like and paragraph numeration, the ini file would be ok but I wonder what's the memory limit of it.
arrays would be also great (I've made an editor to write/edit/save the dialogue paragraphs which is just fine)
but I wonder also stability and memory issues, plus any way to import-export array text into a txt/rtf file for backup and additional editing purposes.
I think I'd recommend inis, since you can always use multiple items for a reeeeeaaaaally long monolouge, plus that you can include how many inis you like. You could have a folder with hundreds of inis if you wanted to!
...though that would munch som memory.
But the fact that it's so easy to edit them makes up for it.
Arrays are also good, though a lot harder to edit manually.
If you're just going to load data, use Lua. Exporting it into a saveable format is a bit of a hassle to learn. But if you just want to load then display stuff like dialogs, Lua is good. You don't even need to learn any of the scripting, just do something like:
Then just load it into whatever alterable strings and display!
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.
INIs - they're easy to edit, and it's easy to organize the data inside them.
64kb is a huge amount of plain text. You're being way too ambitious if you think you're going to make an RPG of such epic proportions that you need more.
The other good alternative would be delimited text files (eg. CSV), which are basically like 2d arrays. You can edit them easily in MS Excel, and use them in MMF2 with the Dynamic Array Extension.