Making Filenames in JS

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.
This will check if savefile with ID exists:

DataManager.isThisGameFile(ID);Look at the DataManager and StorageManager classes in the rpg_managers.js file, to see how it works.
Hi, I have a similar problem... I used to use "File.exist?" command on the Rmvxa plus other commands to create and check third files that I used to know if the player have done certain thing on the game before even without a save game file. A kind of global save file that gave me information about what and when were the first time the player oppened the game, etc... Without, for it, needing to makr a save game.... Cause if I use a normal save game, I could load it and use switchs...  And I don't want to do this cause I have some plugins that check the normal save files to know if the player normally saved before....

How can I do it in RMMV?
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.

Original thread: https://forums.rpgmakerweb.com/threads/making-filenames-in-js.48996/