Skip to content

Instantly share code, notes, and snippets.

Created May 27, 2022 13:57
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
How to extend the RPG Maker MZ DataManager to store custom stuff for your plugin.
// Extend DataManager to persist specific changes
const RMMZ_DataManager_makeSaveContents = DataManager.makeSaveContents;
const RMMZ_DataManager_extractSaveContents = DataManager.extractSaveContents;
const RMMZ_DataManager_onLoad = DataManager.onLoad;
DataManager.makeSaveContents = function() {
const contents =;
contents._plugin_store = {};
DataManager.extractSaveContents = function(contents) {, contents); = contents._plugin_store;
DataManager.onLoad = function () {
RMMZ_DataManager_onLoad.apply(this, arguments);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment