RELEASED TimeSpeed (unofficial) 2.0.3

Provides time speed configuration.

Tags:
  1. LasurDragon

    LasurDragon Astral Cartographer

    This is continuation of TimeSpeed Mod by cantorsdust.
    In addition to already present functionality it also:
    • :confirm: adds notifications and visual display of time status
    • :confirm: extends tick length hotkeys functionality for more precise in-game control
    • :confirm: allows you to configure all hotkeys used by the mod
    • :confirm: allows you to customize time for each location separately
    • :cancel: removes ability for machines to work when time is frozen
    Tested with SV 1.11 and SMAPI 0.40.1.1.
    Any suggestion or bug reports are welcome.

    Next update will be for SMAPI 1.9 which will be released together with Stardew Valley 1.2.

    Config format changed between 1.9.5 and 2.0.0. Please replace config and update it according to you preferences if you are updating from version before 2.0.0.

    Mac (thanks miriamgibbs29 for testing) and Linux (not yet tested) builds are attached below.

    Source code.
    Config documentation.

    Game measures time in 10 minute ticks - every few seconds (~7 by default) game clock moves forward by 10 minutes. Mod basically allow player to change how many seconds pass between such ticks.

    Default configuration already makes days two times longer since it sets tick interval to 14 seconds instead of 7. This is specified in DefaultTickLength and TickLengthByLocation.
    DefaultTickLength is used if there is no settings for current location in TickLengthByLocation.

    Code:
    {
      "DefaultTickLength": 28,
      "TickLengthByLocation": {},
      "EnableOnFestivalDays": false,
      "FreezeTimeAt": null,
      "LocationNotify": false,
      "Keys": {
        "FreezeTime": "N",
        "IncreaseTickInterval": "OemPeriod",
        "DecreaseTickInterval": "OemComma",
        "ReloadConfig": "B"
      }
    }

    If you want to have different time flow in different locations you should edit TickLengthByLocation.
    It allows you to specify speed by either location type or location name. If it founds current location type or name in TickLengthByLocation, it will ignore DefaultTickLength and use one specified in TickLengthByLocation.
    Mod knows about two location types - Indoors and Outdoors. Each location belongs to one of these.

    DefaultTickLength will be always ignored in this preset.
    Code:
    {
      "DefaultTickLength": 0,
      "TickLengthByLocation": {
        "Indoors": 28,
        "Outdoors": 14
      },
      "EnableOnFestivalDays": false,
      "FreezeTimeAt": null,
      "LocationNotify": false,
      "Keys": {
        "FreezeTime": "N",
        "IncreaseTickInterval": "OemPeriod",
        "DecreaseTickInterval": "OemComma",
        "ReloadConfig": "B"
      }
    }

    If you want to change time in some specific location specify it's name in TickLengthByLocation. Most location names match file names (without .xnb extension) in \Content\Maps game folder. There are few exceptions so, "UndergroundMine" for example (all Mine and Skull Cavern levels use this name).
    You can easily find current location name via this mod.

    Also 60 seconds in Saloon and 20 everywhere else.
    Code:
    {
      "DefaultTickLength": 20,
      "TickLengthByLocation": {
        "Saloon": 60,
        "UndergroundMine": 30
      },
      "EnableOnFestivalDays": false,
      "FreezeTimeAt": null,
      "LocationNotify": false,
      "Keys": {
        "FreezeTime": "N",
        "IncreaseTickInterval": "OemPeriod",
        "DecreaseTickInterval": "OemComma",
        "ReloadConfig": "B"
      }
    }

    You can also freeze time automatically in all or specific locations by setting corresponding value to null.

    Code:
    {
      "DefaultTickLength": 14,
      "TickLengthByLocation": {
        "Indoors": null
      },
      "EnableOnFestivalDays": false,
      "FreezeTimeAt": null,
      "LocationNotify": false,
      "Keys": {
        "FreezeTime": "N",
        "IncreaseTickInterval": "OemPeriod",
        "DecreaseTickInterval": "OemComma",
        "ReloadConfig": "B"
      }
    }

    • 2.0.0-rc
      • add ability to customize each location separately:
        location can be specified via name or by type (outdoors, indoors)
        you can use this mod to find location name or go to \Contents\Maps
      • add optional notifications of time settings for current location
      • simplified configuration a bit
      • "immersified" notifications
    • 1.9.5
      • fixed time scaling in Skull Cavern
    • 1.9.4
      • added hotkey to reload configuration from disk
    • 1.9.3
      • clock rate should be smooth now
      • added safety measure for tick length controlling
    • 1.9.2
      • added 'ChangeTimeSpeedOnFestivalDays' option
      • changed increase/decrease tick length key behaviour
    • 1.9.1
      • fixed configured keys resetting

    Plans:
    • In-game GUI
    • Sound notifications
    • Config examples/presets
     

      Attached Files:

      Last edited: Mar 6, 2017
    • General Chaos

      General Chaos Pangalactic Porcupine

      Thank you for making a updated version with a keybind and ingame configurable timings.

      Can you add the ability to make the ability to ChangeTimeSpeedOnFestivalDays for true or false? . That the only thing from the original mod yours is missing.
       
      • Vith

        Vith Cosmic Narwhal

        I appreciate you taking the time to update this!

        If you didn't mind, could you also please consider adding a true/false toggle in the config for slowing/speeding up the time as well as the option for the actual time freeze as well? I love how you can alter how time passes, but the other options feel like cheating to me and I don't want to be tempted to use it.

        If not, that's understandable. My OCD can be a problem. :p
         
          Last edited: Oct 18, 2016
        • LasurDragon

          LasurDragon Astral Cartographer

          You talking about disabling hotkeys, right? I think you can just change them to "None" in config.json.
          [​IMG]

          If it won't help, reply here and I will find out why it's not working ;)

          Yeah, seems like I missed it. Will add it in a few days once I have time to do some testing.
           
            Last edited: Oct 18, 2016
            Vith likes this.
          • Vith

            Vith Cosmic Narwhal

            Thanks for the help! I did what you suggested, but unfortunately the config file resets to the original keybinds each time I launch (this happens no matter what custom keys I set for it). All the other settings I configure are saved as I set them.
             
            • LasurDragon

              LasurDragon Astral Cartographer

              Should be fixed now.
               
                Vith likes this.
              • Vith

                Vith Cosmic Narwhal

                It is indeed fixed, thank you!
                 
                • GBDetective

                  GBDetective Void-Bound Voyager

                  What were tick lengths measured in in the old mod? I'd set the old TimeSpeed's config file to:
                  "OutdoorTickLength": 8.0,
                  "IndoorTickLength": 8.0,
                  "MineTickLength": 8.0,
                  But I'm uncertain what that converts to for your version's measurements.

                  Thank you for adopting this mod, btw. :)
                   
                  • Vith

                    Vith Cosmic Narwhal

                    8.0 is equal to 8000 with the new conversion. :up:
                     
                      GBDetective likes this.
                    • jabbic

                      jabbic Big Damn Hero

                      Could you add in a separate time zone for the farm? I would like my farm time to be different then the general "outdoors".
                       
                      • LasurDragon

                        LasurDragon Astral Cartographer

                        I will probably add the ability to specify time speed for each location separately on the weekend.
                         
                          jabbic and Vith like this.
                        • LasurDragon

                          LasurDragon Astral Cartographer

                          Done.
                           
                            Vith likes this.
                          • Algerith

                            Algerith Void-Bound Voyager

                            I'm having trouble with this mod. The time isn't affected, it still moves as fast as vanilla. But when I press the hotkeys of the mod I see the notifications like time is frozen etc. but the time still moves. What do I need to do?
                             
                            • LasurDragon

                              LasurDragon Astral Cartographer

                              Well, I can't reproduce this.
                              Do you have SMAPI 0.40.1.1 and game version 1.11?
                              Do you use default config.json?
                              Maybe you see any errors in SMAPI console?
                               
                              • Algerith

                                Algerith Void-Bound Voyager

                                I have SMAPI 0.40.1.1 and 1.11

                                I've made these changes to the config:
                                "OutdoorTickLength": 30000,
                                "IndoorTickLength": 30000,
                                "MineTickLength": 30000,
                                Rest is default

                                The console keeps spamming this:
                                An exception occured in XNA UpdateTick: System.MissingFieldException: Field not found: 'StardewValley.Game1.content'.
                                at HappyBirthday.Class1.GameEvents_UpdateTick(Object sender, EventArgs e)
                                at System.EventHandler.Invoke(Object sender, EventArgs e)
                                at StardewModdingAPI.Events.GameEvents.InvokeUpdateTick() in z:\Projects\SMAPI\src\StardewModdingAPI\Events\Game.cs:line 80

                                That last bit has me confused since I don't have a drive called "z:"
                                 
                                • General Chaos

                                  General Chaos Pangalactic Porcupine

                                  Just to ask, are you using the CJB Cheats Menu Mod as well? Reason I ask is because though you might not have it set on, it has a built in freeze time functionality. I was getting an error (not sure what it was) which was not letting the two work well with one another.

                                  What I ended up doing was first setting the Cheat menus time freeze button to the same as the one in timespeed, secondly I made sure to turn off freeze time indoors on both mods. I had a issue with the Desert mines (which act as a indoors environment) so time froze, also had a crash when I had a event (one where Gus asks you to get PAM to pay her tab).

                                  When I turned off the freeze time indoors on both I no longer had the event crashes.
                                   
                                  • Algerith

                                    Algerith Void-Bound Voyager

                                    I tried removing one mod at a time to see which one had a conflict.

                                    Seems that http://community.playstarbound.com/threads/happybirthday.122685/ was the culprit. If I remove that the time works like it should with this mod.

                                    I don't really understand why there is a conflict though...

                                    EDIT: I feel stupid, I just had to update the HappyBirthday mod and now there is no conflict.
                                     
                                      Last edited: Oct 20, 2016
                                    • LasurDragon

                                      LasurDragon Astral Cartographer

                                      Not sure what you are trying to achieve, but you can disable any CJB or TimeSpeed hotkey by setting it to "None".
                                      I don't know what would happen if you use freeze functionality from both mods.
                                      Actually I use cheats menu myself but didn't have any problems yet. If you have any crashes while freeze from CJB is disabled, you can report it here and I'll do my best to fix it.
                                       
                                      • LasurDragon

                                        LasurDragon Astral Cartographer

                                        1.9.3
                                        • clock rate should be smooth now
                                        • added safety measure for tick length controlling
                                         
                                          Vith likes this.
                                        • Vith

                                          Vith Cosmic Narwhal

                                          Thanks for the update!

                                          If I may suggest LasurDragon, to upload this mod to the Nexus or the CF mod repository? You might have your reasons why you chose not to, but I'm certain your mod will gain more attention if uploaded to either or both.
                                           

                                          Share This Page