Request: save/load for plugins
-
Rather incorporated within original common.dll so savegames would turn into extended format:
[uuid] <data>[uuid] <data>[uuid] <data></data></data></data> ```And the library would additionally export:
void Register ( uuid ID, callback CallProc, uint CallParam );
void Unregister ( uuid ID, callback CallProc, uint CallParam );CallProc - callback that is called with registered ID. CallParam - user defined.
typedef callback void (const uuid ID, bool Loading, *Memory, uint *Size, const uint CallParam);
If Loading TRUE, *Memory contains a pointer to data that must be read and *Size contains length of those data. If Loading FALSE, *Memory must be assigned with a pointer to data that must be written into savegame, and length of those data must be written into *Size. CallParam is user defined which is simply sent back. Some consortium on idea? Or may be some way already exists to save/load? I've thought about saving/loading parallel .flplugindata files, but it seemed to me unreliable in the case of renaming savegames inside the game, or close to that, I believe tracking associated savegame might break one day, and not sure there are too many places in which game is saved/loaded completely to support multiple hooks from various plugins (if any). All this is because of Helloween's Dynamic Mission Plugins point and suddenly realized what is missing: such new (virtualized/parallel to the game) things definitely need a storage.
-
Not mine, W0dka’s and M0tah’s
-
Anyway, I’ve looked at gta’s plugins and those keep data externally (ini, txt files). Indeed, players may play any savegame without being annoyed about would-be hardcoded progress inside ones because of some plug-in. Retiring the idea, I suppose.
-
Look at the Player Bases Plugin save format maybe…
I was tried to make act_Save or something like this at MP and it was saved into player’s SP file.So idea is to make MP files even full like SP