About this mod
Slow down, speed up, pause, reverse time, and stay up til 3AM or later! Completely customize and control game time scale using customizable in-game hotkeys for inc/dec time, pausing, and reverse. Time now pauses in crafting stations and chests! Can also now display time in 24-hour format.
- Permissions and credits
Please join me on Discord if you have mod issues or ideas:
devopsdinosaur's Discord Server
If you don't use Discord please PM or email. If you have mod issues then you
can submit them directly through GitHub here:
devopsdinosaur/sunhaven-mods bugs/ideas
I cannot guarantee I will see Posts/Bugs on all of my mods, so Discord/GitHub
are much better ways to reach me.
Thanks!
dd
*************************************************************************************
Public Service Announcement:
It's been hard to find the time to create new mods and support the ones I've made. If you like my mods, please consider a small tip (any amount) on Ko-fi to help me convince my wife that this modding stuff is worth my time =) Just scan the QR code below with your phone or click it to get started. Thanks a ton!
Description:
NOTE: There are still multiple reports of instant crafting occurring when using this mod. If you are experiencing this issue please contact me on Discord (either my server or the official Sun Haven one under the #game-mods channel).
v0.0.11 - Fixed a glitch causing gold/orbs/tickets to not refresh correctly.
v0.0.10 - Now working with game version 1.4. Added reverse time hotkey toggle (default Ctrl + Home).
v0.0.9 - Fixed a bug causing "Use Time Scale" config option to not work; and mod now disables cheatTimeScale built-in hotkeys to prevent glitches (special thanks to fellow modder MorthyJD for the heads-up on this issue)
v0.0.8 - Fixed a glitch causing massive exp gain with exp per hours perks. Also removed instant craft issues caused by disabled time scaling.
v0.0.7 - Fixed a divide by zero error if time scale was zero when interacting with craft table. Note that craft times will still display as something like "0 min" if time scale is zero but will actually be infinite craft time.
v0.0.6 - Can now adjust bedtime up to 5 AM using config option (sounds and house window lights are a still a little wacky after midnight, but it works!)
v0.0.5 - Crafting times should now exactly match time scale factor and are displayed in real time in crafting tables (can be toggled in config file to display as sim time instead [see config section below]). Also reworked some code to improve performance in multiplayer (still may need some fixes).
Want to slow down the game a little more, or maybe speed up the time til that hot date? Now you can! Completely customize and control game time scale using customizable in-game hotkeys for inc/dec time and pausing. Time now pauses in crafting stations and chests! Can also now display time in 24-hour format.
Time scale is represented by the number of game minutes per real-time seconds. The default time scale is 0.25f, meaning one game minute passes every four real-time seconds. You then use the hotkeys described below to increase (Ctrl [+]) or decrease (Ctrl [-]) this scale or use the time toggle (pause) hotkey (Ctrl [0]) to stop time.
Note on craft times: The game calculates the amount of real time required to craft an item when it is queued and creates a timer that does not get affected by changing the time scale (in my mod or in the Settings window if not using mod). This means you must re-queue items if you change the time scale and want them to craft faster (or you can use the crafting speed mod).
Translation mod users: There is a config option, Weekdays, to allow you to set the weekday strings to your language. This is required because the mod stomps the strings in the translated assembly. Sorry, no way around it =(
Default keys are:
- Ctrl [+] - Increase time scale by one tick
- Ctrl [-] - Decrease time scale by one tick
- Ctrl [0] - Pause time
Disclaimer: I generally test these mods as much as I can before releasing, but I won't always catch all the problems. Please let me know if you hit issues, notice something just isn't working as expected, or just think something could be improved. See my contact info below. Thanks for the help!
Config Options:
- Enabled - Set to false to disable this mod.
- Hotkey Modifier - Comma-separated list of Unity Keycodes used as the special modifier key (i.e. ctrl,alt,command) one of which is required to be down for hotkeys to work. Set to '' (blank string) to not require a special key (not recommended). See this link for valid Unity KeyCode strings (https://docs.unity3d.com/ScriptReference/KeyCode.html)
- Time Start / Stop Hotkey - Comma-separated list of Unity Keycodes, any of which will toggle the passage of time. See this link for valid Unity KeyCode strings (https://docs.unity3d.com/ScriptReference/KeyCode.html)
- Time Scale Increment Hotkey - Comma-separated list of Unity Keycodes, any of which will increase the time scale. See this link for valid Unity KeyCode strings (https://docs.unity3d.com/ScriptReference/KeyCode.html)
- Time Scale Decrement Hotkey - Comma-separated list of Unity Keycodes, any of which will decrease the time scale. See this link for valid Unity KeyCode strings (https://docs.unity3d.com/ScriptReference/KeyCode.html)
- Time Reverse Toggle Hotkey - Comma-separated list of Unity Keycodes, any of which will toggle reverse/forward time change. See this link for valid Unity KeyCode strings (https://docs.unity3d.com/ScriptReference/KeyCode.html)
- Initial Time Scale - Initial time scale (float, the default time scale equaling the number of game minutes that elapse per real-time second)
- Time Scale Delta (Tick) - Change in time scale with each up/down hotkey tick (float).
- 24-hour Time Format - If true then display time in 24-hour format, if false then display as game default AM/PM.
- Display Time Scale - If true then the game time display will show a '[XX m/s]' time factor postfix representing the current game speed in gametime minutes per realtime seconds. This value is calculated every real-time second based on simulation time vs real time, so it will show that, for example, the clock pauses when the UI is displayed. Some people might want the option to hide this, so it's here.
- Use Time Scale - Setting this option to false will disable the primary function of this mod, disabling the time scaling and using the usual simulation clock. It is here for users desiring only to use the Pause in Chests / Crafting functionality and should always be true otherwise. Note that the time scale will still be displayed on the clock and will represent the Day Speed setting in the game options.
- Pause in Chests / Crafting - This should always be true unless you want time to continue when opening chests and crafting tables.
Realtime Craft Times - If true then craft times will be displayed as real-time representing the current time scale. If false then it will display the game default of simulation time.(Removed because it was glitchy and not useful enough to keep)- End of Day Hour - This is the hour representing the end of the day (int, must be between 1 and 5; if set to 0 then the late-night functionality will be disabled)
- Weekdays - The days of the week printed on time label; for language localization (comma-separated list of days)
In-game Controls
None
Conflicts:
None that I'm aware of; let me know if so. I have not tested anything in multiplayer.
Installation:
1. Install BepInEx
2. Download and extract this mod.
3. Copy the extracted file(s) to your <sunhaven-install>/BepInEx/plugins directory.
4. Run the game. Enjoy!
Source Code and Issues:
All my Sun Haven mods are on GitHub here: https://github.com/devopsdinosaur/sunhaven-mods I try to keep them as specific and simple as possible. Any issues or requests, just PM me here, on github, or email devopsdinosaur __a_t__ gmail.com.