In Ruby and the DataManager, there's a function called make_file_name, however I find it not present in MV. What is the JS equivalent of:
File.exist?(DataManager.make_filename(0))
Thank you.
Milena, I found a way to do something about this... But It will take to change come lines in "rpg_managers.js"
I don't know if it was exactly what you wanted, but worked for me:
Changed 'rpg_managers.js" lines 663 ... 687
StorageManager.localFilePath = function(savefileId) { var name; if (savefileId < 0) { name = 'config.rpgsave'; } else if (savefileId === 0) { name = 'global.rpgsave'; } else if (savefileId > 0) { name = 'file%1.rpgsave'.format(savefileId); } else { name = '%1'.format(savefileId); } return this.localFileDirectoryPath() + name;};StorageManager.webStorageKey = function(savefileId) { if (savefileId < 0) { return 'RPG Config'; } else if (savefileId === 0) { return 'RPG Global'; } else if (savefileId > 0) { return 'RPG File%1'.format(savefileId); } else { return '%1'.format(savefileId); }};Now to create a save file that isn't named like "fileID.rpgsave" you will just use this script call:
StorageManager.save('nameofyourfile.whateveryouwant')To check if this file or any other file exists in the save folder (well, the folder can be changed with some more work on the code, but I don't see a reason to do that...)
StorageManager.localFileExists('name of the file that you want to find');If you want to load it as a normal save file or delete it (cause this file will be just a save file with another name and extension...)
StorageManager.load('nameofyourfile.whateveryouwant')StorageManager.remove('nameofyourfile.whateveryouwant')Why do I use "StoreManager"?
Cause this way the files that I create will not be registered in global.rpgsave, and a lot of bugs will be skipped.
If you want to make a save file that can be found in global.rpgsave registers, you would like to use the DataManager save way. I think the codes I said before will work, but I have not tested it... yet...
I would like to make a snippet with some kind of "alias" that make it needless to change the core scripts ):
But I'm not that good yet, so if someone can do and post it here, would be nice.
Did I help? haha
Good luck.