[DYNRPG] CMS TOOLS: SAVE CLEANUP

Fixes a bug by removing "SaveXX.dyn" files

As of DynRPG 0.20, this plugin is depreciated, since it was designed to fix a bug in an earlier version.
Get 0.20 here: http://share.cherrytree.at/showfile-12494/dynrpg.rar

========================================================================
CMS Tools: Save Cleanup v1.0
For RPG Maker 2003 with DynRPG v0.13 + 0.14
By PepsiOtaku
========================================================================

This plugin fixed a minor bug caused by DynRPG. If you save a game while using DynRPG, and then install a new plugin, and load your save again, it will just show a black screen and hang. To get around this, I made a plugin that deletes all of the "Save##.dyn" files upon
quitting the game.

ONLY use this plugin if you don't have any other plugins that use the "Save##.dyn" files. To my knowledge, there isn't a plugin that uses them yet.

I coded this really sloppily, so it only technically deletes Save01-Save99. If you use Save #'s higher than that (don't know why you would need to...) then you'll need to alter the source.



Installation

To install the plugin, make sure that you have patched your project with cherry's DynRPG patch which can be found here: http://cherrytree.at/dynrpg

1. Copy the "save_cleanup.dll"into the DynPlugins folder of your own project.


Instructions
Save the game, and while the game is still open, observe that a "Save##.dyn" file was created by DynRPG. Now, quit the game, and observe that it has been deleted, but the "Save##.lsd" file (which is your actual save) remains intact.

Details

  • 92.6 KB
  • 106
  • 07/20/2021 12:51 PM

Actions

Posts

Pages: 1
I'd like to add that the Text Plugin makes use of the .dyn savefiles, and the DynVarStorage Plugin seems to be using them as well. I believe there were a few others as well, though I don't recall which.

So if anyone is using the text plugin to make your own custom menus where you can save, deleting the dyn savefile, will erase all the text in the menu upon trying to load the game again.
author=Kazesui
I'd like to add that the Text Plugin makes use of the .dyn savefiles, and the DynVarStorage Plugin seems to be using them as well. I believe there were a few others as well, though I don't recall which.

So if anyone is using the text plugin to make your own custom menus where you can save, deleting the dyn savefile, will erase all the text in the menu upon trying to load the game again.


Ah, thanks for the fyi. This plugin only removes them after you've quit the game, so it would only really affect things if you are using them for data between sessions (like high scores or something). How exactly does the Text plugin use them? I use it for a lot of things, and haven't had any issues combining this plugin with that one.
The images containing the text drawn on screen is normally stored "in the plugin" itself while running, and thus any data which is therein is then lost as soon as you close the game.
So what the text plugin does is that it upon saving the game stores any text object given in the plugin into the savefile, so that these will reappear while loading the game.

Of course, this only affects you if you actually ever have any text object shown on the screen while trying to save the game. If not, then you won't notice any difference
so it just does something automatically that you can do easily yourself? haha that's cool. i guess this is good if you're forgetful or lazy.

kudos on working with dynrpg, btw. keep on making plugins!
It doesn't work with KazString. The storage actually gets stored directly inside save.dyn files, because it's actual file storage inside it.

I tested this with a chest that I was running with this storage, to check the number. It consistently wiped out the number, and I wound up with two or three copies of the item over as many tests.

If a plugin stores C++ variables, rather than RPG variables, this is usually the case. Alot of stuff is fine, because it stores them only to use them immediately. Like running a process, would be fine, but not making global variables usually.
author=bulmabriefs144
If a plugin stores C++ variables, rather than RPG variables, this is usually the case. Alot of stuff is fine, because it stores them only to use them immediately. Like running a process, would be fine, but not making global variables usually.


You seem to be confusing things. If the most recent upload of KazString is up to date, then it does not store anything into the .dynfiles. You would typically have to use the onSave callback to make use of those files (your own dynstore.txt is not a .dyn file, just to be sure that's clear).

It sounds to me like you believe global variables get stored into those files automatically. They don't. No variable gets stored into a file without explicitely being told to do so, as it would be horribly inefficient to store temporary data like that in a file every time you change them.

Most likely, the errors you think comes from removing the .dyn files comes from something else completely.
This plugin is not a very good idea I am afraid because the point of the *.dyn files is to save data across sessions! It's as if you would write a plugin which removes all the *.lsd files... doesn't sound very nice.

The RPG Maker stores its data in the lsd files. They have a structure which is made to hold all the data the RPG Maker needs. But plugins may need more than that so plugins can call savePluginData inside the onSaveGame callback to store their own data inside the new dyn files and they automatically get their data back as parameter of the onLoadGame callback.
Right but the point of the plugin is to fix this:
If you save a game while using DynRPG, and then install a new plugin, and load your save again, it will just show a black screen and hang.


I know it's not a good idea to use, but it works fine if you don't need to save any plugin data.
Right... but not everybody knows if some plugin uses dyn-files or not!
Pages: 1