Kain Nobel
Member
The Synopsis: I've created a module where you can specifiy what name you want your Save Files to be, the directory they save to (you've gotta create the folder yourself) and the extention of the save file you want to use (since theres a couple, .txt, .rxdata, .sav I've seen used).
Okay, I've pulled my hair out all night testing this, and it finally somewhat works... but here's the code I'm having a problem with. When your save file is less than 9, a 0 is appended to the name, like "Save01" instead of "Save1". Even with the FileTest.exist? method used twice to determine continue_enabled.
Well, I tested it with a "Save11" and "Save01"... with "Save11" it enables continue, but I get rid of Save11 and keep Save01 and all of a sudden it doesn't enable continue like it should. (I've got the same code in other places, that'll disable/enable continue from the menu and it works, but for some reason it doesn't work on Scene_Title).
Okay, I've pulled my hair out all night testing this, and it finally somewhat works... but here's the code I'm having a problem with. When your save file is less than 9, a 0 is appended to the name, like "Save01" instead of "Save1". Even with the FileTest.exist? method used twice to determine continue_enabled.
Well, I tested it with a "Save11" and "Save01"... with "Save11" it enables continue, but I get rid of Save11 and keep Save01 and all of a sudden it doesn't enable continue like it should. (I've got the same code in other places, that'll disable/enable continue from the menu and it works, but for some reason it doesn't work on Scene_Title).
Code:
CMS_GameSaves = 99
CMS_SaveFile_Name = "Save"
CMS_SaveFile_Dir   = "Saves/"
CMS_SaveFile_Ext  = ".rxdata"
class Scene_Title
 #-------------------
 # Main Method
 #-------------------
 def main
  #...Some extra code...
  for in 0..CMS_GameSaves
   # Directory/Name.Ext
   @dir = CMS_SaveFile_Dir
   @name = CMS_SaveFile_Name
   @ext = CMS_SaveFile_Ext
   # Create Filename
   @filename = @dir + @name
   # Determine if Filename exists?
   if FileTest.exist?(@filename + "0#{i+1}" + @ext)
    @contine_enabled = true
   elsif FileTest.exist?(@filename + "#{i+1}" + @ext)
    @continue_enabled = true
   end
  end
  # ...Other 'main' method code we don't need to see.
 end
end