Casper Gaming Developer Corner
Casper Gaming Developer Corner

Documentation

Back to Plugin


Quick InfoVersion: Alpha R2
Made for RPG Maker MZ 1.9.0

Set UpTo get started patching save data, set up your first list item in the plugin parameter in the mandatory setup category. This will be the first patch action applied to a save game that has been saved before this plugin was added to the game. If you create additional list items, those will also be run after a save game is loaded.

This plugin automatically tracks the last patch data applied to a saved game, so if your player starts an old save and you have 3 patches, it will apply them all in order from patch 1, to patch 2, to patch 3. If your player has a save with patch 2 data already applied, it would only run the patch 3 data.

New games begin assuming all existing patches are already applied. For example, if you had 3 patches in the parameter and start a new game, the plugin will assume the new game is on patch 3 without applying any of those 3 patches. If you then save the new game and add a 4th patch, loading that save would run the 4th patch.

Order of OperationsThis plugin first applies any Delete patch commands, then any Modify patch commands, and finally any Create patch commands.

Please be aware of the order in which things run when creating a patch to apply.

Patches for CGMZIn rare cases, [CGMZ] plugins may cause saved games to no longer work. Below are some useful snippets and when you would use them for [CGMZ] plugins. More snippets may be created as necessary:

[CGMZ] Custom Vehicles - This plugin adds custom vehicle data to the standard vehicle array in save data. When removing Custom Vehicles, that data will still exist but there will be no custom vehicle class anymore so the game may crash if a saved game is loaded after removing this plugin. To fix this, please use the following JS in a Delete patch parameter:
$gameMap._vehicles.splice(3, Infinity);
This will remove any custom vehicle data from your saved game.

Plugin CommandsThis plugin includes the following plugin commands:

Get Patch Version - Gets the save file's current patch version into a game variable.

Set Patch Version - Sets the patch version, allowing you to trigger patches again for debug purposes.

Saved GamesThis plugin is fully compatible with saved games. This means you can:

✓ Add this plugin to a saved game and it will work as expected.
✓ Change any plugin params and changes will be reflected in saved games.
✓ Remove the plugin with no issue to save data.

Filename

The filename for this plugin MUST remain CGMZ_Patch.js. This is what it comes as when downloaded. The filename is used to load parameters and execute plugin commands. If you change it, things will begin behaving incorrectly and your game will probably crash. Please do not rename the js file.


Known Issues

This plugin currently has no known issues that need to be fixed. If you believe you have encountered a bug, please report it to Casper Gaming.


Compatibility

This plugin currently has no known compatibility issues with other RMMZ plugins. If you believe you have encountered a conflict, please report it to Casper Gaming.


Version HistoryVersion AlphaR2
  • Added Get Patch Version plugin command
  • Added Set Patch Version plugin command

Back to Plugin