Today I was doing some testing for my game, and I encountered a bug. The save file won't save any of the player's data. I am not using any alt save system plugin, and I am confused about this. I included my list of plugins and a screenshot.
Deployed Game Save Files
RPG Maker MV SupportThe big possibility I can think of is the engine (particularly older versions) can have issues with folder names that have spaces in them.
What version of MV are you using, and does your project have a space in the folder name?
What version of MV are you using, and does your project have a space in the folder name?
@Restart I am using the latest version of rpg maker mv on steam. My folder does not have spaces but it does contain underscores.
When you try to save, does it give a buzzer sound as if there's been an error? There is one plugin I know of that attaches sprites to events, and they can't be saved. Just don't remember what it was.
@Shaz yes!
What are the plugins at the bottom, that aren't shown in your screenshot?
When you get the buzzer sound, hit F8 to open developer tools (if that doesn't do it, try F12 instead). go to the Console tab and see if there are any error messages.
Also, is this when doing a play test, or when playing the deployed game? If when play testing, where is your project? If deployed, where have you deployed to? Needing the folder path from C:\ and onwards. If your project or deployed game are in Program Files and that's where it's trying to save, move them out of there just into c:\ into a folder that is not "owned" by Windows.
When you get the buzzer sound, hit F8 to open developer tools (if that doesn't do it, try F12 instead). go to the Console tab and see if there are any error messages.
Also, is this when doing a play test, or when playing the deployed game? If when play testing, where is your project? If deployed, where have you deployed to? Needing the folder path from C:\ and onwards. If your project or deployed game are in Program Files and that's where it's trying to save, move them out of there just into c:\ into a folder that is not "owned" by Windows.
The last plugin is the YEP_SkillCore.
When I go to console mode, I do not see any errors. This occurs when I deploy the game. I deploy the game and turn it into a single exe file in my desktop folder.
When I go to console mode, I do not see any errors. This occurs when I deploy the game. I deploy the game and turn it into a single exe file in my desktop folder.
that is the problem, because most of the wrapper programs that do this block any future access into the exefile, where the folder for the savefiles now resides.
sorry, it has been too long that this problem came up - but if I remember correctly there are two possible solutions, I just don't know which one works with your wrapper.
the first one was a problem with some wrappers that had a problem with empty folders. In that case you need to create a savefolder and place a single savefile in it before putting everything into the exe.
the second solution would always work, but require more configuration: you need to add a plugin for redirecting the savefile into your game, and then configure it for a folder that is always on every computer, like the userfolder of windows. Then the game will no longer attempt to save into the exe and work correctly.
Helo!
As I understand the idea of @Andar, try to test using the following directories, create a JS file in the Plugins folder and put one of these, remember to activate it in the manager.
This will change the default save folder:
Current directory where Game.exe is located:
"{UserCurrent}\Documents" (for example
"{UserCurrent}\Documents\{TitleGame}"(for example
Edit:
Instead of
As I understand the idea of @Andar, try to test using the following directories, create a JS file in the Plugins folder and put one of these, remember to activate it in the manager.
This will change the default save folder:
Current directory where Game.exe is located:
JavaScript:
StorageManager.localFileDirectoryPath = function() {
var path = require('path');
var base = path.dirname(process.mainModule.filename);
return path.join(base, '/');
};
"{UserCurrent}\Documents" (for example
C:\Users\Dev001\Documents\):
JavaScript:
StorageManager.localFileDirectoryPath = function() {
return process.env.USER_MYDOCS+'/';
};
"{UserCurrent}\Documents\{TitleGame}"(for example
C:\Users\Dev001\Documents\MY Rpg Game):
JavaScript:
StorageManager.localFileDirectoryPath = function() {
var dir = process.env.USER_MYDOCS+'/'+document.title;
var fs = require('fs');
/*This part is not necessary, but I believe it is more accurate to create the directory before trying to save the file.*/
if(!fs.existsSync(dir)){
fs.mkdirSync(dir);
}
return dir+'/';
};
Edit:
Instead of
document.title, I tried to use $dataSystem.gameTitle, but the console returned an error, despite recording and working.Sorry for the late response, but I have been busy these last couple of months. I have tried the listed solutions, but none of this work in my game. I tried playing with it today, but still no luck.
I have tried:
- Using the SavesInLocalData.js plugin
- Adding a save file before and after the wrapping process
- Changing where I wrap and playing with names
- Wrapping it then placing it inside a www/save file
(it worked briefly but then gave me other errors)
-Reviewed the wrap instructions
-Change package name
I'm completely out of ideas now.
I have tried:
- Using the SavesInLocalData.js plugin
- Adding a save file before and after the wrapping process
- Changing where I wrap and playing with names
- Wrapping it then placing it inside a www/save file
(it worked briefly but then gave me other errors)
-Reviewed the wrap instructions
-Change package name
I'm completely out of ideas now.
I did the tests and it works normally on a new project, but I haven't tested it with all those Plugins you installed.
It's probably some conflict with YEP_SaveCore, although it's a custom layout plugin, but still I've never studied its code.
Next month maybe I'll be able to go back home and try to parse the code.
It's probably some conflict with YEP_SaveCore, although it's a custom layout plugin, but still I've never studied its code.
Next month maybe I'll be able to go back home and try to parse the code.
That's really unfortunate since I like the YEP Save Core. If I had to choose, then I refer a working game then a better layout.
Original thread: https://forums.rpgmakerweb.com/threads/deployed-game-save-files.138382/