Quantcast
Channel: Civilization Fanatics' Forums
Viewing all articles
Browse latest Browse all 12856

Questions about loading and saving mod data

$
0
0
I'm working on a mod for the advanced setup screen. I plan on adding many option that will need to be saved for the next time the user starts a game with the advance setup screen. Since I want the data to be saved independent to saved games it looks like Modding.OpenUserData() is the way to go. I tried it using the SetValue() function and it works well. Unfortunately saving each piece of data separately is very slow - it causes a noticeable delay when doing so. I could convert my tables that need saved to a few big strings and save them but this is still kind of slow (not to mention a pain in the butt). I'm hoping there is a better way. Does anybody have any ideas?

I've noticed that some mods appear to access the database directly using .Query. Can I used this method the both load and save data? Would it be faster than the method mentioned above. If so how do I do it. Please be gentle - I know nothing about SQL. :confused:

Sorry for all of the questions - I tried searching for answers but my lack of knowledge on databases just left me confused.

Viewing all articles
Browse latest Browse all 12856

Trending Articles