tModLoader

tModLoader

Not enough ratings
Sleep Time Speed Adjustment [1.4.3.6]
   
Award
Favorite
Favorited
Unfavorite
Mod Features: Quality Of Life
Mod Side: Both
File Size
Posted
Updated
16.603 KB
21 Feb, 2023 @ 10:20am
21 Feb, 2023 @ 12:57pm
3 Change Notes ( view )

Subscribe to download
Sleep Time Speed Adjustment [1.4.3.6]

Description
* Note for 1.4.4: Martipops uploaded an updated version for 1.4.4 - If you're looking for that then you can find it at this link: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3014137690

This mod allows you to set the multiplier for how fast time passes while you sleep.
The number you set in the config is how many minutes will pass for each real life second that you are sleeping.

Build for tModLoader on Terraria version 1.4.3.6

Server Info:
I have made it so the mod rejects any changes that clients attempt to make in-game while playing in a server (multiplayer) environment.
It's not very elegant in terms of flexibility but I wanted to be sure that players couldn't change the config whenever they wanted.
For now at least, changes to the sleeping speed on a server will need to be made in the config file manually and the server started again.
This does not affect Single Player worlds however, so you can still freely change the config in-game if you're playing Single Player.
11 Comments
Boop 6 Jun, 2023 @ 4:25pm 
Got it working, thanks!
Aberranthian  [author] 6 Jun, 2023 @ 3:42pm 
Oh okay. The configs for your mods generally can be found at: `Documents\My Games\Terraria\tModLoader\ModConfigs`. In there you should have a "SleepTimeSpeedAdjustment_Config.json" file. If not, create one yourself (make sure it's a .json file) and place the following into the file, then save it. Be sure to include the curly braces as well. The 5 is the default setting. A value of 1 means game time would pass at the same rate as a real life second for example.

{
"SleepTimeMultiplier": 5
}
Boop 6 Jun, 2023 @ 11:50am 
firstly, thanks for the quick response. I'm okay with that, but I don't know which config file to edit and if it's the serverconfig.txt file, I don't know the what command to add to adjust the settings. If it's a different config file, could you tell me the general directory path to it please?
Aberranthian  [author] 6 Jun, 2023 @ 3:31am 
@Boop: If you're playing in a server environment then I don't have a built-in way to adjust the config live. I never got around to adding that in so you would need to shut the world down and adjust the config itself, then start the world back up. If it's a single player environment you can change the setting in your escape menu in-game.
Boop 6 Jun, 2023 @ 2:24am 
What is the serverconfig command to change the sleep time?
Ralts 1 May, 2023 @ 3:00pm 
thank you. i will try testing around, i am using a variety of mods, the first that comes to mind that would affect things might be the enhanced lighting mod
Aberranthian  [author] 21 Apr, 2023 @ 4:00am 
@鳳凰院凶真 : I just tested this mod by itself with a config of '30' as well as the max value of '100'. Each test resulted in a smooth 60 fps in my game. I'm thinking it might be that you have mods which are trying to do too much every update which may be affecting your fps. The only suggestion I have is to lower your time passage in the sleep config to smooth it out, or try to narrow down which mods might be trying to do too much every update.

I can't say for certain if the above reason is why you are lagging, but it's the only logical thing I could come up with. What I would do to test is to make a new world and only activate the sleep mod and see if it still lags. If it doesn't you can add in small batches of mods at a time to keep testing that new world to see if you can figure out when it starts lagging. If by the end you still aren't lagging it might be something to do with your old world specifically.

Good luck!

TModLoader version I tested with: v2022.9.47.47 (1.4.3.6)
Ralts 15 Apr, 2023 @ 2:22am 
when i sleep it lags a lot is that supposed to happen?
filizthegreat 18 Mar, 2023 @ 4:12am 
Cool, thank you.
Aberranthian  [author] 18 Mar, 2023 @ 3:46am 
@filizthegreat : The method affects all timerates equally. Day Rate, World Tiles Update Rate, and World Events Update Rate. I tried to stick as close as possible to the way vanilla sleep is handled, just with custom speeds.