RPG Maker MZ Plugin: Import Prequel Saves
A downloadable asset pack
If you like this plugin, you can buy me a Ko-Fi! You can also find all the pay plugins for a cheaper subscription!
Planning on doing one or more sequels to your game?
Do you have two different games that you want to link?
This plugin will allow your players to copy an old savegame in a directory of your choice, the plugin will read them and will give you the informations you need: Switches, Variables, Actors, Equipments, Time played and more!
Key Features:
- Automatically checks the folder you want for any rmmz savegame
- Allow the player to pick the savegame he wants to import
- (Optional) Set some requisites for the savegame to be elegible! You don't want players to mess with you and load saves from different games? Maybe if you sneakly set that variable n° 18 to 755 as proof that the save file is from your prequel they won't mess with you!
- Personalize how the file selection is shown
- Automatic Language Detection: As a bonus, this plugin will work as a test for a feature I intend to add in every WinterDream plugin. You can (optionally) create a translation pack for up to 183 different languages. The plugin will automatically check the language on the player machine and choose the most fitting translation. If absent, it will stick to the default.
More Key Featurs (That will come in the future):
- After the player picked the save file you can create a recap based on the read data!
IMPORTANT NOTE: This plugin is guaranteed to work on local machine with .rmmzsave files. Recovering old saves from Web Distribution games might be tricky as they don't use those files, I'll work on a solution
Version, bugs and further development
VERSION 1.0:
- Initial release
VERSION 1.0.1:
- Modified default value for arguments in "Get informations from old save" from empty (will trigger an error) to an empty array (works ok)
Future release will aim to: Add a customizable recap page after the player choose the old save file
Terms of use
Please refer to the Terms of Use. By using this plugin you accept WinterDream terms
Status | Released |
Category | Assets |
Rating | Rated 5.0 out of 5 stars (2 total ratings) |
Author | WinterDream Games Creator |
Download
Click download now to get access to the following files:
Development log
- A little hotfix!Aug 03, 2024
- Version 1.0 of Prequel Save Importer is here!Jul 09, 2024
- Coming soon, very soon!Jul 06, 2024
Comments
Log in with itch.io to leave a comment.
Okay, so, I added it to my project and in the plugin manager.
Created "oldsaves" folder and put a bunch of .rmmzsave files in it.
I put all three plugin commands in an event, but nothing happens. I disabled all other plugins, nothing happens, why could this be?
Thanks
So nothing at all happens? There is no selection window coming up but there isn't also an error?
That sound like RPG Maker not registering the command at all, is the plugin ON, the plugin file name hasn't been changed?
Exactly, the plugin is ON, i didn't change the name, and I disabled all the other plugins. I'm not using the latest MZ build (I'm on 1.7.0), would that be an issue?
Otherwise no idea. I'll try on a fresh project.
That's weird, version 1.7.0 shouldn't be the problem 😨
Can you send me a pic of the event and a pic of the plugin parameters?
Of course, where do I send it?
You can send it to my mail ( winterdreamgamecreator@gmail.com ) or on Discord ( winthorp ) 🙂
Very interesting. Does it only read or does it copy the data? I mean, can it check if switch X was on, and just tell me if so, then I can decide what to do with switch X in the new game?
Or does it find switch X is on and then automatically sets it as on in the new game?
Thanks
It copies and read, you instruct the plugin what to search and what to do with the results. Like you said, if old save had switch X on you can decide to turn new game switch Y on.
It can do it with switch, self switch, variables, heroes data and general game system informations
https://github.com/BossRpg/MVMZ-Advanced_ChangeSaveLocation/blob/main/Advanced_C...
It is best to use it with this plug-in, so that you can solve the problem of publishing games on Steam, but I have not tested whether your plug-in supports "%USERPROFILE%/Saved Games/" + $dataSystem.gameTitle + "/save/"
It doesn't as the directory is a string, not an eval, so it won't catch + and $dataSystem
But adding a "pro" option to use the evaluation could be something to add in the ToDo list! ☺️
So, without the +$dataSystem part, it should work? I actually mainly want to know if I can read "My Documents"
If you mean by using environmental variables like %USERPROFILE%, no, not in v1.0
I'll work on adding the possibility!
Right now the plugin can either read a normal string path (ex: "C:\Mygame\") or he can detect his installation directory and from from there (option autodetect + data/ will result in a string heading toward the data folder of the game)
The following reference code is from a website that is not allowed to be linked by itch. You can directly refer to the code
'use strict';
/*
====================================================================================================================
RoamingSavePath.js
License: DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Usage: add this lines to your plugins.js:
{"name":"RoamingSavePath","status":true,"description":"Save directory to game save dir instead of www","parameters":{}}
====================================================================================================================
*/
(function () {
if (!StorageManager.isLocalMode() || typeof process === 'undefined' || !process.env || !process.platform) return;
const fs = require('fs');
const path = require('path');
var globalSavePath = null;
const initPlugin = function () {
const defaultDir = process.env.APPDATA ?
"%USERPROFILE%/Saved Games/" + $dataSystem.gameTitle + "/save/" :
(process.platform == "darwin" ? "%HOME%/Library/Preferences/" : "%HOME%/.local/share/");
const params = PluginManager.parameters('RoamingSavePath');
var savePath = ((params['Save Directory'] || defaultDir).trim().replace(/^[/\\\.]+|[/\\\.]+$/g, '') + path.sep).replace(/[/\\]/g, path.sep);
for (var e in process.env) {
savePath = savePath.replace('%' + e + '%', process.env[e]);
}
globalSavePath = savePath;
}
const validateDirTree = function (targetDir) {
if (fs.existsSync(targetDir)) return true;
const parts = targetDir.split(path.sep);
var currentPath = parts[0];
for (var i = 1; i < parts.length; i++) {
if (!parts[i]) continue;
currentPath += path.sep + parts[i];
if (!fs.existsSync(currentPath)) {
try {
fs.mkdirSync(currentPath);
} catch (e) {
return false;
}
}
}
return true;
}
const oldDMOL = DataManager.onLoad;
DataManager.onLoad = function(object) {
oldDMOL.apply(this, arguments);
if (object === $dataSystem)
initPlugin();
}
StorageManager.localFileDirectoryPath = function() {
return globalSavePath;
};
const oldSTLF = StorageManager.saveToLocalFile;
StorageManager.saveToLocalFile = function() {
//if (!fs.existsSync(globalSavePath))
//fs.mkdirSync(globalSavePath, { recursive: true }); // needs newer nwjs sometimes
if (validateDirTree(globalSavePath))
oldSTLF.apply(this, arguments);
}
})();
I like this. I don't think there's ever been a system made that does this, for any other iteration of RM, not even VX Ace.
Yes, searching for this option leads to a lot of questions and a very few answers, guess this will be a useful one 😁