Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Autosaving

Status
Not open for further replies.
Count_Strangle;138417 said:
Just a quick question. Is it possible for games made with RMXP to autosave? If it is, does anyone know how to do it?

Yup, with scripting. There's a few autosave scripts already done.

If you have specific areas you only want the game able to be saved at or know more about what you're looking for, we might be able to point you to the right one. :)
 
I did this real quick. Let me know if there are any mistakes.

Code:
class Scene_Map
  Autosave_Frame_Count = 200
  Autosave_File_Index = 3
  alias seph_autosave_scnmap_update update
  def update
     if Graphics.frame_count % Autosave_Frame_Count == 0
       save = Scene_Save.new
       save.on_decision(Scene_File.new.make_filename(Autosave_File_Index))
       save = nil
    end
  end
end

That's pretty basic, so feel free to modify it or something.
 
Fixed Seph's code. He forgot to call the original update :P
Code:
class Scene_Map
  Autosave_Frame_Count = 200
  Autosave_File_Index = 3
  alias seph_autosave_scnmap_update update
  def update
     seph_autosave_scnmap_update
     if Graphics.frame_count % Autosave_Frame_Count == 0
       save = Scene_Save.new
       save.on_decision(Scene_File.new.make_filename(Autosave_File_Index))
       save = nil
    end
  end
end
 
Status
Not open for further replies.

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top