I need a safe spot to store information between actual games, so that it's still there when I exit to the main menu and launch another game. Would arrays in CvGlobals be safe?
The only way to do this is to use the scriptdata fields, for example on CvGame or CvPlot. Many mods do this using the "pickle" capability in sdtoolkit or bugdata. You can search for these keywords on the forum to read many previous discussions.
The only way to do this is to use the scriptdata fields, for example on CvGame or CvPlot. Many mods do this using the "pickle" capability in sdtoolkit or bugdata. You can search for these keywords on the forum to read many previous discussions.
Can you describe more about what you are trying to do? It seems that you may want to think of this as configuration data, which is stored in ini files by BUG.
It's okay, I just added new arrays in CvTechInfos. I have a dynamic tech tree, so gameoptions might remove era's worth of techs, or change the prereqs around. I needed a way to restore the tech tree if the user went to the main menu, and then started a game with different options, w/o reloading the XML.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.