The default game save is: Game's Name/savexx.rvdata2. I want to change the save location to: Game's Name/Save/savexx.rvdata2. So, i've changed this part in game's script: DataManager
#-------------------------------------------------------------------------- # * Determine Existence of Save File #-------------------------------------------------------------------------- def self.save_file_exists? !Dir.glob('Save*.rvdata2').empty? end #-------------------------------------------------------------------------- # * Maximum Number of Save Files #-------------------------------------------------------------------------- def self.savefile_max return 16 end #-------------------------------------------------------------------------- # * Create Filename # index : File Index #-------------------------------------------------------------------------- def self.make_filename(index) sprintf("Save%02d.rvdata2", index + 1) endTo this:
#-------------------------------------------------------------------------- # * Determine Existence of Save File #-------------------------------------------------------------------------- def self.save_file_exists? !Dir.glob('Save/Save*.rvdata2').empty? end #-------------------------------------------------------------------------- # * Maximum Number of Save Files #-------------------------------------------------------------------------- def self.savefile_max return 16 end #-------------------------------------------------------------------------- # * Create Filename # index : File Index #-------------------------------------------------------------------------- def self.make_filename(index) sprintf("Save/Save%02d.rvdata2", index + 1) endAnd, it's work, the save will be located in Save folder instead of right in the game's folder. But, the problem is, i've to create a save folder before, so the game will be saved in that save folder. If there isn't any save folder, the game won't be saved. All i want is, the game will check either there is a game folder or not and if not, create one and save in that.
Game's Save File Location
● ARCHIVED · READ-ONLY
-
-
FOLDER_NAME = "NAME"Dir.mkdir(FOLDER_NAME) unless Dir.exist?(FOLDER_NAME)
Not at my comp right now so this may not be 100% accurate. Its something like that though. -
Oh, Dekita :DFOLDER_NAME = "NAME"Dir.mkdir(FOLDER_NAME) unless Dir.exist?(FOLDER_NAME)Not at my comp right now so this may not be 100% accurate. Its something like that though.
Where should i put that line? -
probably best to put it into the module and have it run as soon as the game runs.
-
Oh, it's work. Thank you :Dprobably best to put it into the module and have it run as soon as the game runs.
You know, you like a hero appeared everytime i need LOL :D -
ahh good, it worked.
I feared that the syntax may have been
Dir.mk_dir(FOLDER_NAME)(with an underscore ' _ ')
Havent used the Dir class since I done my own save data script :p -
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.