RELEASED *Thread Moved, please delete*

Discussion in 'Mods' started by zipy199522, Apr 23, 2016.

  1. zipy199522

    zipy199522 Pangalactic Porcupine

    Good afternoon everyone, and today I'd like to announce my biggest project yet, the Save_Anywhere mod!

    Now before you get super excited let me go over the basics of what this mod does.

    Normally when you want to save you have to go to bed and go to the next day, which is typically ok. However, sometimes you want to save where you are and come back later to resume playing. What this mod does (at the time of writing) can be summarized like this.

    1.Save the player's save file like going to bed would.
    -Things such as tiles watered, stamina, health, etc are preserved. Note that not everything that is
    normally saved is preserved.

    2. Warp the player upon loading the game to the position they were when they saved. (Optional in config)
    3. Calculate shipping for the player upon saving (because items shipped aren't saved to a save file)
    4.Recalculate NPC's path finding to be as accurate as possible. *2.
    5. Simulate game time up until when the character loaded. *3 (Optional in config)
    6. Generated "save_anywhere saves" are deleted upon going to bed to prevent the character from being warped unnecessarily. One is always generated/updated when you save.
    7. Warps the Horse back into position.

    Now the asterisks are for the following.

    *1. There is an issue where if you happen to resize/move/alter the game's window while the game is starting up/loading, then the player will not properly warp back to their original location. If this happens, reload the game and don't alter the game window/screen.

    *2. I discovered when you save the game and reload it, that NPCs get randomly warped around the world which caused a massive problem. When the mod loads it will calculate the NPC's original positions and put them back into their staring positions so it might take just a few seconds before the game loads all the way.

    *3. I chose to rapidly simulate in game time so that NPCs would be able to properly path find back to their save-game positions. For every 2 real life seconds, 10 in game minutes will pass and NPCs will move considerably faster to make sure that they move back to their save-game positions. This will last until the game-time is updated to the time when the game was saved.

    Now in order to save the mod, you just need to press a key while playing the game. "k" is the default key, but you can change this in the config file.

    That pretty much sums it up to this point. I'm going to take a nap since this took me roughly 15+ hours to figure out.

    If anyone finds any issues while using this mod please post your message down below and I'll see if I can figure it out as this mod works as is, as I haven't tested the full breadth of what needs to be saved.

    Thanks and have fun. =)

    *Also please back up your save files just in case something goes wrong. Thanks!

    -Alpha_Omegasis

    Min Requirements:
    SMAPI 0.40
    Stardew Valley 1.07

    Link:
    Get it here!

    Know Bugs:
    -Can't save in the Community Center or the Sewer. Some of the objects/characters in these locations aren't serializable to the save function. I disabled saving in these locations to prevent the game from crashing outright.
     
      Last edited: Apr 25, 2016
    • Acerbicon

      Acerbicon Pangalactic Porcupine

      I probably won't use this just yet, but kudos! Congratulations on figuring it all out and thanks for releasing this!
       
        Yoru Hana likes this.
      • kno2231

        kno2231 Void-Bound Voyager

        Man,you did a good job!
        Thank you so much!
        I need this mod so much!!

        But,i think i find some problems on this mod.

        1.Some npcs may disappear.
        I had talked to Evelyn and pressed "k".After saved and loaded the gamesave,i couldn't find her.
        But i could find her on the next day.

        2.The horse was back in the stable.

        -----------------------------------------------------------------------------------------------

        3.This is complicated.My english is so poor.I don't know how to express it.
        But i try it.

        After i pressed "k" and i slept,i S/L the gamesave.
        Then,the time went fast until 9:00am and the player was at the place where i pressed "k"
        If i go to sleep and s/l the gamesave once again,the time will go fast until 9:00am everytime.

        Only 3 way to fix this.

        Opened "Player_Save_Info_playername.txt" and changed "Player Current Game Time" to 600.
        Delete "NPC_Original_Save_Info_.txt","NPC_Save_Info_.txt" and "Player_Save_Info_playername.txt".
        Reinstall this mod.

        But if you press "K",it will happen again.



        Whatever,i think this mod help me a lot.Thank you!
         
        • zipy199522

          zipy199522 Pangalactic Porcupine

          Ohh man I didn't even think about testing the horse! I'll see what I can figure out about that when I get a chance.

          Hmmm unless I'm simulating game time too quickly Evelyn should be back to where she was originally. I'll do some more testing.

          Ok, I think I know why the game time is going so quickly all of the time. I'll patch it up tomorrow when I get home. I'm glad that you like my mod though!
           
            kno2231 likes this.
          • zipy199522

            zipy199522 Pangalactic Porcupine

            Hey everyone, just wanted to let you know that I pushed a new update. This is the gist of it.

            -Fixed glitch regarding game time constantly being simulated on new days. Also fixed the glitch where I accidentally deleted the config file and not the custom save on a new day.

            -Updated NPC's to move a little bit slower so that they don't fly through walls.

            -Slowed down game time simulation to run every 3.5 seconds, which is 4x the normal game speed. (Configurable in the config file.)

            -Known Issues.
            -The horse does not warp to the character when the farmer is warped. I'll need to figure this out still.

            Otherwise, all seems to be good for the moment! Go and grab the new update at the download link. Also make sure to replace the config file with the newer version of it to ensure that the game will run!
             
              Norfuer, kno2231 and Acerbicon like this.
            • daggyr

              daggyr Void-Bound Voyager

              Can you make an option that disables the warp-back-to-previous-position-and-simulate-time thing?
              I don't mind walking back if it means that there would be no path-find issues with the npcs
               
              • zipy199522

                zipy199522 Pangalactic Porcupine

                Hey everyone, I've been working crazy hard this afternoon and I just pushed up an update that fixed some more minor bugs I ran across, now your horse should be warped to it's original position properly, temporary save information is deleted nightly (for the player and the horse), and you can now chose wither or not you want to simulate game time and if you want to be warped when loading your game. (Both settings can be found in the new config file and are enabled by default).
                Go grab the update and make sure you update your config file as always!
                If you find any other issues make sure to post them here and I'll see what I can do!

                *Edit at 6:42 PST on 4/24/16

                Found yet another bug where the game would crash when loading with the mod. This was my fault for forgetting to test something. Sorry everyone, but it's patched now,
                 
                  Last edited: Apr 25, 2016
                  bulbaswat, Norfuer and kno2231 like this.
                • kno2231

                  kno2231 Void-Bound Voyager

                  HI,i fonud something.
                  When i went to the sewer and saved the game,the game crashed.
                  Even though i left the sewer and saved,it still crashed.
                   
                  • zipy199522

                    zipy199522 Pangalactic Porcupine

                    So I looked into the game's code and sadly there is a solution to this but it defeats the purpose of this mod a bit.

                    Just patched up the mod where you would normally crash when saving in the Sewer or the Community Center. Unfortunately the critters in these locations aren't serializable in the native save function and they crash the game. Nothing I can do on my end to patch around this, trust me I tried. If you try to save in these locations I just throw an error message to the log.

                    As of right now this is more like the Save (Almost) Anywhere mod. Sorry for the inconvenience this causes everyone, but I hope you continue to use this mod. =)
                     
                      kno2231 likes this.

                    Share This Page