RELEASED [Storm] and [SMAPI] FreezeInside Mod--Freeze Time While Indoors Like Harvest Moon!

Discussion in 'Cheats' started by cantorsdust, Mar 3, 2016.

  1. cantorsdust

    cantorsdust Existential Complex

    THIS MOD IS DISCONTINUED. YOU CAN FIND ITS FULL FUNCTIONALITY AT:
    http://community.playstarbound.com/...imespeed-mod-configurable-day-lengths.107876/


    The OP shall be preserved for posterity / those who are still interested in the SMAPI version.








    Current Version: 1.4.4.1 for Storm and 1.3.2 for SMAPI. Storm version NOW RECOMMENDED.


    Freezes the time while inside, like Harvest Moon does.

    Please note that as of version 1.4, this game comes with a Config.json file with two options:

    1. FreezeTimeInMines, which defaults to false. If set to true, the time in the Mines (both of them) and the Farm Cave should freeze in addition to just the buildings.
    2. LetMachinesRunWhileTimeFrozen, which defaults to true. If set to true, machines continue to run while you are inside and time is frozen. Some consider this "cheaty". Setting it to false will prevent machines from running while you are inside.

    Version 1.3.2 just has the FreezeTimeInMines option.

    Version 1.3.2 is likely the last version update for SMAPI. Further updates will be on Storm.

    PLEASE NOTE! PLEASE NOTE! Version 1.4+ requires Storm. The Storm versions are NOW RECOMMENDED. I will be continuing development on the Storm versions only at this time.

    Storm

    PLEASE NOTE! PLEASE NOTE! Requires SMAPI and TrainerMod.dll to be installed! SMAPI 0.37 for versions 1.3 and 1.3.1, SMAPI 0.35 or 0.36 for version 1.2.

    SMAPI (TrainerMod included in download.)

    Installation video, courtesy of ided:



    Installation for Storm (1.4+)

    There is one folder in this .zip containing three files, FreezeInside.dll, Config.json, and manifest.json. This folder may ONLY be placed in %appdata%\StardewValley\Mods.

    Thus, the total path for the three files required for this mod to function are:
    %appdata%\StardewValley\Mods\TimeSpeed\FreezeInside.dll

    %appdata%\StardewValley\Mods\TimeSpeed\Config.json.

    %appdata%\StardewValley\Mods\TimeSpeed\manifest.json.


    REQUIRES Storm to be installed!
    https://gitlab.com/Demmonic/Storm

    Installation for SMAPI (1.3.2)

    Place DLL and INI in %appdata%\Stardew Valley\Mods.

    Thus, the total path for both of the two files required for this mod to function are:
    %appdata%\StardewValley\Mods\FreezeInside.dll

    AND

    %appdata%\StardewValley\Mods\FreezeInsideConfig.ini.



    By cantorsdust with credit to Karyme for the idea and r3dteam for technical help. Thanks to Zoryn for the very rapid SMAPI help.

    Download from releases.

    Source code at github.
     

      Attached Files:

      Last edited: Mar 15, 2016
    • Teien

      Teien Subatomic Cosmonaut

      How does this affect the daily rutines? Everything seems fine?
       
      • cantorsdust

        cantorsdust Existential Complex

        I'm really not testing for balance--I'll leave that to each user to decide what's fair. One potential issue is that the mines are considered inside. I might release a separate version that doesn't freeze time in the mines for balance's sake.
         
        • Teien

          Teien Subatomic Cosmonaut

          That might be a good idea, otherwise the mines would get a bit "op" in a way. I like this idea though, I almost fainted while decorating my house last night. But I still would't want the time in the mines to stop. Great job though, the modding progression seems to be growing fast, I can't wait to see what you guys manage to do next :)
           
          • SpaceKGreen

            SpaceKGreen Existential Complex

            Main question I'd have is, does this pause working machines? Like, if you put a cherry in a keg, went inside your house, and waited a long time in RL, would you come back out and find a finished cherry wine? Heck, could you do it with a keg that's inside your house? If so, then this might be a bit OP. :p
             
            • cantorsdust

              cantorsdust Existential Complex

              I believe it would pause working machines. Haven't specifically tested that, but I have heard people complain that Stardew Injector's slow time option makes machines slower, so I suspect this would freeze it altogether while inside.
               
              • Zoryn4163

                Zoryn4163 Big Damn Hero

                Added API calls.
                 
                  cantorsdust and Drogean like this.
                • cantorsdust

                  cantorsdust Existential Complex

                  Okay, updated mod to 1.1. Will now reset time properly upon sleeping and has configurable INI for whether the mines and the caves count as inside. By default, they do not, just like Harvest Moon.
                   
                  • Eagle1337

                    Eagle1337 Void-Bound Voyager

                    [23:37:14] Failed to load mod 'E:\Steam\steamapps\common\Stardew Valley\Mods\FreezeInside.dll'. Exception details:
                    System.IO.FileNotFoundException: Could not find file 'E:\Steam\steamapps\common\Stardew Valley\FreezeInsideConfig.ini'.
                    File name: 'E:\Steam\steamapps\common\Stardew Valley\FreezeInsideConfig.ini'
                    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
                    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
                    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
                    at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
                    at System.IO.StreamReader..ctor(String path)
                    at System.IO.File.OpenText(String path)
                    at FreezeInsideMod.FreezeInside.runConfig()
                    at FreezeInsideMod.FreezeInside.Entry()
                    at StardewModdingAPI.Program.LoadMods()
                    I get this as an error.
                     
                    • cantorsdust

                      cantorsdust Existential Complex

                      You need to have FreezeInsideConfig.ini with the dll. I put in a try-catch exception to search for it both in %appdata%\StardewValley\Mods and the Stardew Valley main folder.

                      edit: I'm just going to make a second catch that just ignores it completely if it can't find it. Easier for everyone.

                      edit v1.1.1 released. If INI is not found, will default to FreezeTimeInMines false, but otherwise function without erroring.
                       
                        Last edited: Mar 3, 2016
                      • Eagle1337

                        Eagle1337 Void-Bound Voyager

                        [​IMG]
                        or did I screw something up?
                         
                        • cantorsdust

                          cantorsdust Existential Complex

                          No, you caught a bug and I was wrong. Quick update momentarily. For now, install it to %appdata%\StardewValley\Mods to get around that or wait 5 minutes.

                          edit: Okay updated to 1.1.2 to fix bug.
                           
                          • MSigma

                            MSigma Void-Bound Voyager

                            Honestly, proper practice would be to generate a default INI file if none is found.
                             
                            • Yusuke Urameshi

                              Yusuke Urameshi Space Kumquat

                              Is it possible to make it so machines continue to work as normal with time frozen? Or is that outside the realm of possibility?
                               
                              • MSigma

                                MSigma Void-Bound Voyager

                                Things like that are probably unlikely for now, until we get a more robust modding API.
                                 
                                • Yusuke Urameshi

                                  Yusuke Urameshi Space Kumquat

                                  Hmm, ok. Thanks for the info.
                                   
                                  • cantorsdust

                                    cantorsdust Existential Complex

                                    Thanks for the idea! I actually changed the method by which this mod works. Now it's called every time the clock updates, and just sets the clock back 10 minutes. But your machines all get the tick to update, so they should keep working while time is frozen.

                                    v1.2 out on my github.

                                    v1.2 now creates an ini for you if you don't have one, for anyone who forgot to install that file. Thanks for the advice!
                                     
                                      Yusuke Urameshi likes this.
                                    • DatYandereGirl

                                      DatYandereGirl Big Damn Hero

                                      Thanks for this!
                                       
                                      • snaid1

                                        snaid1 Scruffy Nerf-Herder

                                        I'm having some issues getting it to work. it doesn't seem to be having any effect.
                                        I'm also getting this error when I start the game:

                                        System.TypeLoadException: Could not load type 'IntChanged' from assembly 'StardewModdingAPI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
                                        at FreezeInsideMod.FreezeInside.Entry()
                                        at StardewModdingAPI.Program.LoadMods()

                                        not sure what I'm doing wrong, I just tried it with these and trainermod.dll as the only mods in the folder so there shouldn't be any conflicts.
                                         
                                        • cantorsdust

                                          cantorsdust Existential Complex

                                          What version of SMAPI are you using? The mod requires 0.3.5+, but the very newest version of SMAPI in the source code changes the arguments of the event handlers, so that could be it too.
                                           

                                          Share This Page