Persistence between games

Leoreth

Bofurin
Retired Moderator
Joined
Aug 23, 2009
Messages
38,045
Location
風鈴高等学校
Does anyone here know about a good approach to implement persistence between games? Usually data is only saved for a specific game in the save file. I would like to implement some kind of achievement system, where players can earn achievement in one game and still have them in the other.

Let's say I implement this in Python, can I just pickle that data somewhere? If so, how can I put that global save/pickle file in a general location?
 
If you don't mind modding the DLL, you can use some functions in the EXE to read and write XML files. If you need better control than that, then you could take tinyxml2 from M:C. I modified it to be allowed to be compiled into the DLL and it gives access to all the xml tools, not just the ones the exe handpicked. Also hidden somewhere in M:C is a piece of code, which will allow writing to an xml file next to the DLL file.

I don't know of any way to do this from python though, but if you really want to to, you can mod the DLL and then expose some functions to make them be called from python.
 
Does anyone here know about a good approach to implement persistence between games? Usually data is only saved for a specific game in the save file. I would like to implement some kind of achievement system, where players can earn achievement in one game and still have them in the other.

Let's say I implement this in Python, can I just pickle that data somewhere? If so, how can I put that global save/pickle file in a general location?
There are Python functions to add data to the saves. I have never been able to get them to work but others have. I think I read about it in the BUG documentation but I can't find it.
 
There are Python functions to add data to the saves. I have never been able to get them to work but others have. I think I read about it in the BUG documentation but I can't find it.
I think the idea is that it is between games, not gaming sessions. This means something like if you research everything, then you unlock a certain promotion. This promotion is then unlocked even when you start a new game and you will have it from the start. Since it will not be using the savegame file, it will require some other method of saving unrelated to the savegame system.
 
The way I was gong to approach it was to have some "event" XML, similar to the way Platyping uses it. Read it in at the start and then write out a new file at the end.
 
It's definitively DLL work. But you can start by looking at how FFH handles its achievements and tracking which scenarios you've completed.
 
Thanks for your ideas. tiny2xml is a good tool but I'll also look into what FFH is doing. I didn't realise they had that kind of persistence.
 
Back
Top Bottom