Jump to content
Vlue

Basic Autosave

Recommended Posts

Basic Autosave 1.0
By Vlue


Introduction
Simply put, just saves to the first file every time a map transfer is preformed. Can't get any simpler!

Compatible with Basic Options Menu to give the player the option of disabling the autosave.

Features
- Autosave on map transfer.

Screenshots
Autosave.png

How to Use
Plug and play.

Script
You can get it here: Here!

FAQ
Nada

Credit and Thanks
- By Vlue
- Free to use in any project with credit given

Author's Notes
Overwrites file #1

Edited by Vlue

Share this post


Link to post
Share on other sites

Okay, you must have read my mind or something... But these 3 scripts you posted are ALL the scripts that I've been thinking I needed for my game. You're amazing! Great work Vlue!! Keep up the amazing work! :D Thank you, thank you, THANK YOU!!

 

Edit: Would it be possible to turn the auto-save on/off via script call?

 

Edit#2: A few other questions/suggestions that I was wondering if they are possible. Is there a script call to save manually in the game with a script call? (Like, if there is a certain part of the game that's not a map transfer, but would still be useful to have an auto-save. And would there be a way to check to see if the auto-save is on or off? Because if the player has turned off the auto-save, it would be kind of weird to have it save if they don't want it to if the game is saving it via script call.

Hope that all makes sense! Thanks!

Edited by KevinFrost

Share this post


Link to post
Share on other sites

Okay, you must have read my mind or something... But these 3 scripts you posted are ALL the scripts that I've been thinking I needed for my game. You're amazing! Great work Vlue!! Keep up the amazing work! :D Thank you, thank you, THANK YOU!!

 

Edit: Would it be possible to turn the auto-save on/off via script call?

 

Edit#2: A few other questions/suggestions that I was wondering if they are possible. Is there a script call to save manually in the game with a script call? (Like, if there is a certain part of the game that's not a map transfer, but would still be useful to have an auto-save. And would there be a way to check to see if the auto-save is on or off? Because if the player has turned off the auto-save, it would be kind of weird to have it save if they don't want it to if the game is saving it via script call.

Hope that all makes sense! Thanks!

 

$auto_save = true/false or $game_options.auto_save = true/false, depending on if you have Basic Options Menu installed, will enable/disable autosaving with the script.

If you wanted to save manually you could just do DataManager.save_game(0), and the way to check if autosave is on is using the same variables mentioned before for enabling/disabling.

 

 

Is it possible to make it compatible with Khas awesome light effects?? :P

 

I'm confused, it just saves the game. What does it have to do with Khas Lighting Effects?

 

 

Work great ith Yanfly Save menu but unfortunally the name of "autosave" doesn't show up.

 

If you link me the script I can take a look at it and see what I can do.

Share this post


Link to post
Share on other sites

Try putting this blurb below both scripts:

 

 

class Window_FileList
  def draw_item(index)
    header = DataManager.load_header(index)
    enabled = !header.nil?
    rect = item_rect(index)
    rect.width -= 4
    draw_icon(save_icon?(header), rect.x, rect.y, enabled)
    change_color(normal_color, enabled)
    if index == 0
      text = AUTOSAVE_FILE_NAME
    else
      text = sprintf(YEA::SAVE::SLOT_NAME, (index + 1).group)
    end
    draw_text(rect.x+24, rect.y, rect.width-24, line_height, text)
  end
end

Share this post


Link to post
Share on other sites

this can sound really weird, but I have the same problem of Max56yo, the script simply does not work when I have the Khas Lights script. 
in fact, even if I save the game in the autosave slot, and then change maps, the save (in the autosave slot) is gone o.o

I don't even imagine why this is happening, but in another forum someone also had compatibility issues with Khas Lights and other autosave script. 

can you take a look pls?

Edit: here's a small demo replicating the problem
http://www.mediafire.com/download/uu6289ux8rwcpud/demo.rar

Edited by ricardo.jl.simoes

Share this post


Link to post
Share on other sites

So it does... Super fancy Patch here, goes below both scripts:

 

#PAAATTTCCCH for KHAS and Auto-Save
module DataManager
  def self.save_game_without_rescue(index)
    File.open(make_filename(index), "wb") do |file|
      $game_system.on_before_save
      scene = SceneManager.scene
      scene.dispose_lights if scene.is_a?(Scene_Map)
      Marshal.dump(make_save_header, file)
      Marshal.dump(make_save_contents, file)
      scene.setup_lights if scene.is_a?(Scene_Map)
      @last_savefile_index = index
    end
    return true
  end
end

class Scene_Map
  def dispose_lights; @spriteset.dispose_lights; end
  def setup_lights; @spriteset.setup_lights; end
end

 

Share this post


Link to post
Share on other sites

I really hope I'm not too late to post to this

 

How would I go about calling the save manually while closing automatically

This is how I had my event set up before

76f32c96ff9a88ef862c9466a3f177ab.png

This will open the save menu (allowing the player to save) and then exit on it's own after the save

This worked

 

But when I did this

8c3fe40f96b70194959d9bc63ca739bb.png

It deleted the save file instead of making or overwriting it before it closed (it still closed, it just didn't save)

 

I would really appreciate the help

 

If I'm posting this way after I should be, please tell me 

Share this post


Link to post
Share on other sites

I jump onto the wagon too  :P

 

Sorry if this is a noob question, but where in the Script Editor am I supposed to put this awesome script?

 

Thanks for your hard work: much appreciated  :)

Share this post


Link to post
Share on other sites

I don't want to sound like a bitch, but:

 

[...]

 

Sorry if this is a noob question, but where in the Script Editor am I supposed to put this awesome script?

 

[...]

 

Thanks in advance for any input  :)

Share this post


Link to post
Share on other sites

I don't want to sound like a bitch, but:

 

[...]

 

Sorry if this is a noob question, but where in the Script Editor am I supposed to put this awesome script?

 

[...]

 

Thanks in advance for any input  :)

 

 

First, press F11 to open the script editor, you should get something like this (you may have to scroll down)

f885e14199505d772b2079798b06d234.png

See where it says (Insert here)?

You would replace that with the code

 

Also, Double posting is against forum rules as far as I know, so I would recommend NOT doing that too much in the future

Edited by _Luxen_

Share this post


Link to post
Share on other sites

Hi there,

Just wondering if it's possible in any way to make it so that, instead of autosaving onto slot 1, it autosaves onto slot 13?

(May seem like a random number, but I'm using Yanfly's Save Menu thingy, and having 13 as the maximum slots. Just want the autosave to be somewhere that people won't accidentally save over it).

Sorry of this is something that should be simple, but I'm fairly useless with scripts  D:

Thanks!

Share this post


Link to post
Share on other sites

I've recently gave this a try as my game seems to sometimes drop to the desktop with out warning, but there seems to be something wrong with it.

 

I think it might be working, but the first save file is labeled File 1(instead of autosave), but it is also greyed out, I can not pick it to load from.

 

I am also using Yanfly's Save engine and a lot of other Yanfly's scripts as well.

Share this post


Link to post
Share on other sites

Hmm... then I suspect, that the conditionals return false for some reason. Have you changed anything in settings?

Make sure, that AUTOSAVE_ON_MAP and $auto_save are set to true.

 

I believe the script also checks if another script related to options is installed, so if the issue will still persist for some reason and you don't use the options script (probably made by the same author), then this script could be simplified a little.

 

Other than that I think it all should be working fine... Try again and see if it decides to work. :P 

 

Please quote or @mention me if you'd be replying to me, otherwise I may accidentally overlook your reply. Thank you.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×