![[CGMZ] Patch for RPG Maker MZ](https://img.itch.zone/aW1nLzIwMTY2MTcyLnBuZw==/original/lWFdGr.png)
[CGMZ] Patch for RPG Maker MZ
A downloadable plugin
Hi all, introducing [CGMZ] Patch!
This plugin allows you to patch save data when a saved game is loaded. This can help if your update changes database, switch or variable objects around, plugin data changes, or anything really. It aims to provide easy automatic parameters for certain things while also providing a custom JS parameter for third party plugin data.
The Problem
When you are actively developing your game and you already have players, such as a demo version that is being updated as your development proceeds, sometimes you may make changes that cause old save files to no longer work. When loading such a save file the game may behave weirdly due to having switches and variables in states that would now be impossible, or it may even crash when loading the old save if data was removed but still exists in your save game.
[CGMZ] Patch Solution
What if, instead of just telling your players to restart and abandon their save files from before the update, you as the developer could patch any save data on load so that they can keep their save files? With this plugin, you can do exactly that! Of course, it is a bit of an advanced plugin because you will need to understand what changes need to be made to save files to make them up to date with the current version of your game.
Example
As one example of how you may use this plugin, lets say you have a plugin that adds custom vehicle data to the vehicles array which is checked when the game is loaded to refresh the vehicles. If you decide to uninstall this plugin from your game, that custom vehicle data will still be there in your saved game's data although it will not be able to be read anymore because the custom vehicle plugin no longer exists in your game.
This could cause a crash when trying to load a save game from before the plugin was removed, for example:
Normally in this scenario you would need to tell your players to just start a new game. However, with [CGMZ] Patch you can create a patch that removes this now unused data from their save files, allowing the save file to load successfully:
Of course, the possibilities are almost endless. You should be able to patch just about anything, whether it be removing old unused data from saved games, adding new data that may be missing from saved games, or modifying existing data to add new parameters.
No Code Patching
This plugin aims to make creating patches for saved data as easy as possible. For this, there are some built-in patch commands to clear out any previously used variables or switches. You can also turn a switch ON in a patch. For example, if you previously used to set a variable to some number but now that variable is no longer used (or used for something different), you can reset it to 0 in your saved games with this plugin.
JavaScript Patching
Beyond the easy no-code patching for switches and variables, you can also run custom JavaScript code in your patches. This allows you to fix any save data, provided you know the JavaScript to do so and the state your save data is in on your saved game. You could even fix third party plugin save data with this.
Roadmap
The functionality that already exists should work flawlessly in your game (Casper Gaming does not use alpha/beta as an excuse for bugs). However, some features are not yet in this version of the plugin. Below are planned features to be added through updates during the Alpha and Beta process, in no particular order:
- Option to manage player items, weapons, armors through plugin params
- Debug plugin commands
- Conditions on switches or variables
- Option to change player location
Do you have any ideas you'd like to see added to the plugin not already listed above? Let me know in the comments or in my Discord's #suggestion channel! I appreciate all suggestions I get and add them all to my to-do list.
PLEASE READ BEFORE PURCHASING:
Please be aware that you can access this as well as all of my other Alpha plugins for $5 on my Patreon: https://www.patreon.com/CasperGamingRPGM
This is posted to Itch.io since some people only use Itch and are not aware my Patreon and all of my beta/alpha plugins exist, or want to have everything in one convenient location (itch.io), or do not want to do a monthly subscription.
Casper Gaming's Beta/Alpha plugins are treated as an "early access" and will eventually be free for everyone once they are fully released, though this process can take months/years. By purchasing in beta/alpha, you are able to provide early feedback/suggestions which are more likely to make it into the final fully released plugin.
Requirements and Terms
This plugin is for RPG Maker MZ only. The code is not obfuscated.
Please see terms of use here: Terms of Use
Requires CGMZ Core plugin: CGMZ Core
Happy RPG Making!
Published | 2 days ago |
Status | In development |
Category | Tool |
Rating | Rated 5.0 out of 5 stars (1 total ratings) |
Author | Casper Gaming |
Made with | RPG Maker |
Tags | RPG Maker |
Average session | A few seconds |
Languages | English |
Inputs | Keyboard, Mouse, Xbox controller, Gamepad (any), Touchscreen, Playstation controller |
Links | Homepage, Discord, Patreon, YouTube |
Purchase
In order to download this plugin you must purchase it at or above the minimum price of $5 USD. You will get access to the following files:
Comments
Log in with itch.io to leave a comment.
I've thought about implementing this feature by having the game create new save data and then using an extend-like feature to copy all of the previously saved values on top of it.
This would work (I think..) in the most common case where the user adds a plugin to their game in an update. I don't think it works in the case demonstrated above where the user removes a plugin but that occurs much less frequently.
I've never actually needed to do this though because I can just edit my plugins to be backwards compatible. Feel free to use the idea if it helps you; a lot of people would benefit from saves that "just work".
Hi, thanks for the feedback. I think many plugin devs add new plugin data to saved games if they detect their plugin is new, as it is not too hard to code that up. But if a plugin doesn't, it should be fairly easy to make a patch using this plugin, since this plugin handles basically all of that process except for calling whatever initialize functions may be needed. Though, I will look more into the link you provided and see if maybe I can make it even more automated than it currently is.
The main difficulty with plugin data in my experience comes when plugin data is removed or especially modified. For example, someone could change some part of saved quest data in a quest plugin and that would be hard to automatically handle. If you knew the correct script calls to make, you could patch that situation with this plugin.
I also wanted to give people ways to patch default game data, such as switches or variables. For example if someone changes what a switch/variable is used for they could patch that with this plugin.
This is not really a fully automatic solution as the dev still needs to tell it what data needs to be patched, but it makes it a lot easier than starting from scratch as it handles version tracking, hooking into onload functions, etc. This is definitely for the developer who is willing to put in a bit of extra work to make sure their players don't need to abandon old saves, and it aims to make the process easier for them.
I plan to monitor what people struggle with patching most frequently and based on those trends creating better processes/documentation around those areas in future updates of this plugin. So definitely if anyone is a user of this plugin and has trouble patching something, please reach out to me for support 😁
Wow, I've been wanting a plugin like this my whole life! XD Instant buy for me. Thank you so much for creating it!
I am glad you like it 😁