REQUEST [Request] Save anywhere, anytime

Discussion in 'Mods' started by krookodilehunter, Mar 8, 2016.

  1. krookodilehunter

    krookodilehunter Scruffy Nerf-Herder

    I don't know if this can be done right now, but I would love it if I could save anytime I wanted/needed to. Having to run back to my house and end the day is very frustrating if I have to turn off my computer really quickly. :(
     
      kno2231, Grant Rogers, Pimmy and 2 others like this.
    • carnage157

      carnage157 Pangalactic Porcupine

      For me I'd probably like a save on exit.
      I don't like to leave my computer on and waste electricity, and I also don't like having to redo the entire day if I do have to exit in the middle of the day.
       
        kno2231, Pimmy, PsychOut and 5 others like this.
      • bruvinito

        bruvinito Void-Bound Voyager

        Great request! I need it too.
         
          kno2231, Grant Rogers and Pimmy like this.
        • Phantomhive

          Phantomhive Orbital Explorer

          This is exactly why I can't play much, I know I don't have time to play a whole day to save so I just don't bother but if something like that is added to the game I would be able to play it more often!
           
            kno2231 likes this.
          • Svered

            Svered Astral Cartographer

            I would try and do this with the Storm API since it'd be pretty easy to pretty easy to hook into the quitting events, but I don't see anything that would allow me to hook into the saving mechanism (yet). I'll keep looking and if I see something promising I'll update.
             
            • keyten

              keyten Cosmic Narwhal

              Maybe you can just allow player to go to sleep in any place with some hotkey? This will work like save. PLayer will wake up in home anyway. Or (which I like more) you could add totem to warp home. Player will be able to sleep anywhere.
              Or I can add beds in every location.
               
              • Svered

                Svered Astral Cartographer

                Things are getting places:
                [​IMG]
                 
                • carnage157

                  carnage157 Pangalactic Porcupine

                  Will the loaded game place us where we saved? Or does it advance to the next day like sleeping does?
                   
                  • Svered

                    Svered Astral Cartographer

                    Looking at the function and the SaveGame structure it looks like it might require a little editing to save time of day and stuff and load to that time.
                    Thankfully it looks like the save games are just stored as XML files, so I could see potentially being able to overwrite the required methods.
                    I think player position might be retrievable from the player object if it's not changed on saving, but for the time I'm not sure what to do since it doesn't seem like time is a property of any of the objects being saved and as of yet I haven't figured out where exactly it sets it to the next day on load. I'll try and look at this more soon.
                     
                      Last edited: Mar 10, 2016
                    • nickelcurry

                      nickelcurry Subatomic Cosmonaut

                      This. A warp home would be great, especially when I'm mining in to the wee hours and have to try to run back before he collapses..
                       
                      • darkallnight

                        darkallnight Void-Bound Voyager

                        nickelcurry likes this.
                      • nickelcurry

                        nickelcurry Subatomic Cosmonaut

                        Oh wow, I didn't look at that one! Thanks for pointing it out, that looks way helpful :D
                         
                          darkallnight likes this.
                        • Snaitf

                          Snaitf Poptop Tamer

                          @Svered :

                          This will allow you to save the game:

                          Code:
                          Game1.activeClickableMenu = new StardewValley.Menus.SaveGameMenu();
                          I've tested binding that to a key and it works. But, when you load the game back up, you wake up in your bed at 6:00am on the same day. Everything you've done up until then is still saved, but the day restarts on load. So, to save your location and time will require some extra work. Hope this helps.
                           
                            Hammurabi likes this.
                          • Svered

                            Svered Astral Cartographer

                            @Snaitf Yeah the SaveGame.Load() function resets the player's position to their bed, but there's nothing saying that their last location wouldn't be saved beforehand. Any chance you could upload and share your save file with me so I can investigate that? Also you could bind StardewValley.SaveGame.Save() to a key and I think that would let you save as well.
                            The Time Change is in Game1.newDayAfterFade() I think, but I can't find where loading a save calls that.
                             
                              Last edited: Mar 10, 2016
                            • keyten

                              keyten Cosmic Narwhal

                              Changing wake up location would be extremly nice. I will finally be able to place beds anywhere I want.
                               
                              • xcedra

                                xcedra Master Chief

                                how do you enter this code into the game? do you have to install a cheat code mod first?
                                 
                                • hihi427

                                  hihi427 Tentacle Wrangler

                                  maybe the logic of "Save anywhere, anytime" mod is simple
                                  1. record player's coordinate and time info
                                  2. force to sleep
                                  3. warp to the previous location (dont have to change the wake up point just auto warp to the recorded position will work as well )
                                  4. change the time. As #13 said date will mentain the same
                                   
                                    Last edited: Mar 10, 2016
                                  • keyten

                                    keyten Cosmic Narwhal

                                    I don't think this will work. The day will pass anyway, plants will grow, animals will produce something etc. I bet developer would include normal save in game if that were so easy.
                                     
                                    • hihi427

                                      hihi427 Tentacle Wrangler

                                      I don't think "Game1.activeClickableMenu = new StardewValley.Menus.SaveGameMenu(); " will make plants grow beause you will wake up on the same day. (need a test)
                                      As long as we stay away from "Game1.newDayAfterFade()" it should be fine.

                                      In addition, hour based process(e.g.Cheese Press) will not affect by the directly time change which I already tried several times by using Cheat Engine.

                                      My point is we dont have to find the way changing wake up location, just wake up at the bed and press one key to warp.
                                      Saving : press save key →location and time info into .ini .json or whatever file→Game1.activeClickableMenu = new StardewValley.Menus.SaveGameMenu();→game be saved →exit the game)
                                      Loading : Normally load the game→press load key→read location and time data→ change the time →warp to the destination
                                       
                                        Last edited: Mar 10, 2016
                                        keyten likes this.
                                      • keyten

                                        keyten Cosmic Narwhal

                                        Yeah, makes sense.
                                         

                                        Share This Page