- Jul 3, 2019
- 7
- 3
Found a solution for the save menu complaining about some image path.
1. In 'www\js' open the rpg_manager.js with a text editor.
2. CTRL+F find StorageManager.localFileDirectoryPath
3. change this:
StorageManager.localFileDirectoryPath = function() {
var path = window.location.pathname.replace(/(\/www|)\/[^\/]*$/, '/save/');
if (path.match(/^\/([A-Z]\/)) {
path = path.slice(1);
}
return decodeURIComponent(path);
};
to this:
StorageManager.localFileDirectoryPath = function() {
var path = require('path');
var base = path.dirname(process.mainModule.filename);
return path.join(base, 'save/');
};
And no I don't know why it works. I just copied it from an another RPGM game and it worked for me.
1. In 'www\js' open the rpg_manager.js with a text editor.
2. CTRL+F find StorageManager.localFileDirectoryPath
3. change this:
StorageManager.localFileDirectoryPath = function() {
var path = window.location.pathname.replace(/(\/www|)\/[^\/]*$/, '/save/');
if (path.match(/^\/([A-Z]\/)) {
path = path.slice(1);
}
return decodeURIComponent(path);
};
to this:
StorageManager.localFileDirectoryPath = function() {
var path = require('path');
var base = path.dirname(process.mainModule.filename);
return path.join(base, 'save/');
};
And no I don't know why it works. I just copied it from an another RPGM game and it worked for me.