RELEASED [SMAPI]StardewValley Auto Backup Mod

Discussion in 'Mods' started by zipy199522, Mar 29, 2016.

  1. zipy199522

    zipy199522 Scruffy Nerf-Herder

    Good evening everyone, I'd like to introduce a utility that I decided was necessary while working with lots of modding and experimentation while playing Stardew Valley. I realize that there is another back-up tool at the time, but I decided to make this one just in-case someone wanted this style of functionality.

    -Updated to back up upon launch and upon sleeping.

    -Now supports x# of save files (28 by default) for Nightly backups and pre-launch backups (28 for each category). This can be changed in AutoBackup_data.txt.

    This is the Stardew_Save_Backup mod which automatically takes your save folder and zips it into %appdata%/StardewValley/Backed_Up_Saves for later retrieval upon launching SMAPI, and upon sleeping. This is especially useful if you are modding/using mods and don't want your characters to be messed up, or if your game happens to crash form some odd reason, or you lose your save file!

    The back-up happens every time you load up SMAPI so your files are zipped up nice and safe before anything can touch them. Also works when you go to bed at night, and each category has it's own folder for organization.

    You can also keep as many back-ups as you desire, and are only limited by the hard drive space on your computer! (Editable by AutoBackup_data.txt)

    If you ever want to get back to your old save files, simply open up the desired .zip folder with any archival tool such as windows file manager or .7zip and you can now access your old save files!

    I'm open to improvements for this mod as of writing this. If so desired I will research adding functionality for when your character goes to bed that it will back up your save files, or doing a backup after x amount of days that have passed in game.

    Anyway have fun!


    Simply put the contents of the folder inside of Stardew Valley/Mods and load up SMAPI.

    All of the backed up saves are stored in %appdata%/StardewValley/Backed_Up_Saves

    Get it here (source included):
      Last edited: Mar 31, 2016
    • Oranisagu

      Oranisagu Astral Cartographer

      wouldn't it make more sense to backup after a save has been made? i.e. every DayOfMonthChanged event? seeing as a play session can last hours and span multiple ingame days, you'll lose everything back to the point when you started the game if something really goes awry.

      I do however like the idea of additionally creating a backup before the first save occurs, especially for content mods changing the layout of the farm or greenhouse and such.

      how do you handle maintenance and cleanup? after a while this could lead to quite a bit of slowdown (windows does not handle many files/folders in a directory too well)
      • zipy199522

        zipy199522 Scruffy Nerf-Herder

        Yea the backup after the save is a good idea, I'll make sure to add that in in the next update (which ill be coming in a day or so.) That way you have an initial backup, and continuous backups as well.

        I wasn't aware of that issue with windows actually! I'll keep this in mind and probably have it in the future config file where you can chose how many copies to keep, and when you reach that number it'll delete the oldest one and create a new one, and/or have an iterator keep track of the number of save files that exist. Thanks for the feedback, and I'll update this as soon as I get the chance. =)
        • zipy199522

          zipy199522 Scruffy Nerf-Herder

          Hey, just wanted to let you know that I updated the Stardew_Auto_Backup mod so that it back ups saves upon launch, and upon nightly saving. It also has a config file that lets you limit how many backups you wish to keep to prevent file clutter. It will automatically delete the oldest save file after your specified limit, so if I had 14 backups and my limit was 13, it would delete the oldest backup of the batch of 14, so no need to worry about your most recent information being deleted!

          Get it on my github! The link is in the first post!
          • Oranisagu

            Oranisagu Astral Cartographer

            nice! I'll definitely give it a try.
            EDIT: I noticed you didn't use the SMAPI logger - I'd recommend using Log.Info to log stuff instead of Console.WriteLine, since it's already there and they save the output as well as displaying it on the console.

            since I'm modding myself and constantly start/stop the game and overwrite my test savefiles to reset them I wonder if it won't cause any problems (if it does, I'll post again)
              Last edited: Mar 31, 2016
            • zipy199522

              zipy199522 Scruffy Nerf-Herder

              Ohh wow, I wasn't aware of the feature! I'll make sure I do that in the future! When I have a moment I'll update the functionality to do that as well!
              • Judhas

                Judhas Intergalactic Tourist

                Hi I'm new here. I hope I'm in the right place. I wrote this earlier in another thread:

                How about a manual load and save option that's usable in the house? Like a diary on a nightstand next to the bed or something, with several empty slots for save games.

                A quit-to-main-menu button would be good too.

                Exiting the game and reloading every time something goes wrong is really annoying at times.

                Just got the game today, it's lovely. Hope I'm not embarrassing myself by asking for something that already exists. =)

                Thank you
                • zipy199522

                  zipy199522 Scruffy Nerf-Herder

                  Hey there! Can't say this is completely the correct place for this, but I'll answer anyways. =)
                  Adding in map object functionality is something that is a bit....trickier. I'm not sure any of the modders have been able to successfully add in new intractable objects due to the fact that a lot of that stuff is hard coded into the game, meaning we can't touch it sadly. Wither or not we would be able to add in new furniture in the future is still to be seen.

                  As for a quit to main menu, I feel like that would be a bit more possible. I want to look into making more menus myself, but have had some unfortunate luck with my laptop charger breaking, and being busy with another wave of university tests.
                  If anything comes across my radar in terms of this stuff I'll do my best to try and notify the community.

                  Hopefully you continue to enjoy the game. =)
                  • Pathoschild

                    Pathoschild Oxygen Tank

                    Save Backup 1.3 is now available!

                    Release notes:
                    • Updated for SMAPI 2.0 (still compatible with SMAPI 1.15).
                    • Switched to standard JSON config file.
                    • Internal refactoring.
                    • Pathoschild

                      Pathoschild Oxygen Tank

                    Share This Page