Project Zomboid

Project Zomboid

Sleep With Friends v1.3
126 Comments
Cyan_Cabbage 9 Jul @ 12:46pm 
Mod was working fine, i spent days sleeping the desired amount on MP, then out of nowhere it stopped working, all characters would just sleep 20 in-game minutes always. Tried changing the sandbox options and even using the mod that lets you change sandbox options in-game but nothing worked.
SilverVixen 20 Jun @ 5:49am 
alright thank you
Snuggles  [author] 19 Jun @ 8:23pm 
@SilverVixen

"SleepLength" is how many of the set units (Real time minutes or In game hours) you will sleep for if you are fully fatigued.


EXAMPLE 1
RTorIG = 1,
SleepTime = "5.0"

These settings would have you sleep for a full 5 minutes IRL if your character is fully fatigued.


EXAMPLE 2
RTorIG = 2,
SleepTime = "2.0"

These settings would have you sleep for 2 in-game hours if your character is fully fatigued.
SilverVixen 19 Jun @ 3:19pm 
for sleep length is it the multiplier for fatigue recovered? for example higher numbers mean faster sleep?
Snuggles  [author] 11 Jun @ 1:42pm 
@marshmallow_justice Please unsub and resub.

I remember the original .png was corrupted on first upload of v1.3 and I had to open and resave the file in an editor. I find the file and get no issue now when using the workshop version.

Feel free to DM on Steam or Discord if the issue persists. I use the same username on discord and I am in Zomboid server.
marshmallow justice 10 Jun @ 11:22pm 
I got an error opening my Mods after the update regarding the .png

ERROR: General , 1749622679562> ExceptionLogger.logException> Exception thrown java.util.concurrent.ExecutionException: java.io.IOException: Not a valid PNG file at FutureTask.report. Message: D:\SteamLibrary\steamapps\workshop\content\108600\2686624983\mods\SleepWithFriends\icon.png

It seems to be the small px size thumbnail icon missing, as when I click it the sleeping picture of the people shows up on the right side.
Snuggles  [author] 8 Jun @ 7:10pm 
I have re-opened comments just in case issues arise from the mod structure update.
Usage should not have changed at all, just that the mod now works in both Build 41 and 42.
Snuggles  [author] 11 Jan, 2022 @ 12:04pm 
Eyyy thats awesome!
Zantimer 11 Jan, 2022 @ 4:40am 
Circled back to say we've found a modder with ready and about to be published tools fixing the issues with mod versions on dedicated server, rendering modpacks pointless, leading me to announce we won't be robbing your mods off of subscribers! lol
Zantimer 11 Jan, 2022 @ 3:39am 
Thank you, certainly will note that down!
Snuggles  [author] 11 Jan, 2022 @ 3:17am 
To anyone wondering,

Setting "FastForwardMultiplier=" to 1.0 did NOT prevent fast forwarding when all players slept. It did however slow down FFW to double instead of x40. Unfortunate, but better than nothing! Preventing FFW is one of my goals, so it does not end here :)
Zantimer 11 Jan, 2022 @ 3:02am 
@Snuggles, I haven't found a way to contact you otherwise, but would you be alright with your mods included in a server-tailored mod pack? Zero changes, zero hassle for you, full credit, all the stuff, done in a barbaric way due to very, uh, knowledge-able packing process
Snuggles  [author] 9 Jan, 2022 @ 10:24pm 
@Seikaku Unsure what exactly you are trying to say, but it made me realize i JUST saw the setting that would prevent players from fast-forwarding time at all while sleeping.

Im pretty sure one only needs to change "FastForwardMultiplier=40.0" to "FastForwardMultiplier=1.0" in their servers .ini file

I will update the mod description if this turns out true. I will also attempt to make this a checkbox setting with the other mod settings as a fun treat.
SeikakuOtosan 9 Jan, 2022 @ 8:47pm 
normally if not everyone sleeps at the same time, and say only 1 of you go to sleep, then that 1 person will still require the same amount of in game time to reduce their fatigue, which since time is not increased, means they need to sleep 40X longer (IRL time) than what they would if time were accelerated.
Snuggles  [author] 9 Jan, 2022 @ 4:10pm 
@DaWombat "We all sleep at once..." Sleep With Friends makes this unnecessary.
DaWombat 9 Jan, 2022 @ 3:49pm 
I don't understand the need for this mod. I've got basic sleeping enabled in my multiplayer server without the use of any mods. We all sleep at once and time advances normally. What's this one do different?
Snuggles  [author] 9 Jan, 2022 @ 4:06am 
Just wanted to thank everyone for making this mod such a success. I didn't realize so many others were also frustrated with TIS not providing a reasonable way to incorporate fatigue and sleep in multiplayer.

Now, as for the future of SWF, there is more to come! Here are some planned features I am brewing up:

•Furniture quality affects sleep
•Prevent boredom and sadness from changing while sleeping
•Incorporate sleep traits into mod (no more free points)

There are more ideas, but these are the big 3 in my sights at the current moment.
I am going to wait until multiple features are done so I can reduce my addition to the headache of mods updating.
Snuggles  [author] 9 Jan, 2022 @ 3:33am 
@FanTaZy AutoWake wakes players up when they have fully recovered their fatigue. Being the mod does not modify the in-game sleeping mechanics, you will continue to sleep after recovered if the option is not enabled.

My personal dedi, we have this turned off so we can sleep through the entire night still if desired. If you have AutoWake disabled, you will have to move your player (hit any of the WASD keys) to wake-up.
Kim Chaewon 8 Jan, 2022 @ 8:09pm 
Hey i like the mod but can you tell me what's the feature called "Autowake" what does it means please ?
Satuis Aburda 8 Jan, 2022 @ 12:54pm 
I’m liking the mod but concerned about the sleeping traits being made worthless/free points.
Can you put them into the sleep algorithm you have?
HardZ 8 Jan, 2022 @ 11:13am 
nice!!
DadWentForCigs 6 Jan, 2022 @ 3:03am 
Many many thanks for the info! Stay safe and thanks for the mod! :feste:
Snuggles  [author] 6 Jan, 2022 @ 2:39am 
@dadwent SleepLength is how many hours or minutes you want players to sleep. RTorIG determines if SleepLength is referring to Real-Time minutes or In-game hours.

There are no settings you have to match up to your server
DadWentForCigs 5 Jan, 2022 @ 10:48pm 
Sorry to hassle, little confused with default settings description:

"Real-Time minutes (Real-Time minutes = 1, In-Game hours = 2)
2 of above setting"

My servers days are set to one hour, so I should set should SleepLength to 1 because of that right? Or just leave it at two?
pyro557 4 Jan, 2022 @ 8:02pm 
i got this working in my game i had him delete all of the sleep with friends folder and stuff and redownload it just to be safe and it started working my guess is there was a messed up file or it fixed itself either way excellent mod
pyro557 3 Jan, 2022 @ 8:36pm 
we were in rooms adjacent across a hallway from each other in the bar thats in the south of muldraugh the last building on the way out past warehouses
Snuggles  [author] 3 Jan, 2022 @ 8:29pm 
I will try to recreate this problem. I test all SWF updates with 2 clients running off a Test Branch version on the Workshop, so I should be able to easily recreate this if it's Sleep With Friends.

Are you trying to sleep near each other or are you two apart?
pyro557 3 Jan, 2022 @ 8:19pm 
i had both enabled that was the first thing i checked when we realised there was a problem
Snuggles  [author] 3 Jan, 2022 @ 8:12pm 
@pryo You have both SleepAllowed and SleepNeeded enabled? Sounds like you only have SleepNeeded enabled and the game knows you are admin so it allows you anyway.

Sleep With Friends doesnt alter the game's sleep mechanics, so on failure you would sleep as the game is designed, which is 8 hours-ish in game depending on the furniture.
pyro557 3 Jan, 2022 @ 5:28pm 
it could also be a mod conflict
pyro557 3 Jan, 2022 @ 5:22pm 
host co op and just him i dont play with anyone else atm
Snuggles  [author] 3 Jan, 2022 @ 2:56pm 
@pyro is it only the one person? Is it a dedi or host co-op?
pyro557 3 Jan, 2022 @ 2:52pm 
not sure what is causing the issue but when i have this mod enabled on my server it works for me but my friend can no longer sleep it just permanently says you are not tired try again later and his character was max tired. we didnt get any errors the only thing i can think of is its because his endurance was full but he was super tired
Snuggles  [author] 3 Jan, 2022 @ 2:26pm 
@ecaps I'm just glad it's all good now! Guess we'll be forever pondering the problem 🤔 Cheers!
Space 3 Jan, 2022 @ 12:43am 
Oddly whatever was going on resolved with the last update - Everything is fine. Sorry I couldn't find out what was causing it. Anyway... this mod is fantastic and honestly aught to be a vanilla feature.
洞天子明 2 Jan, 2022 @ 8:20pm 
Thanks, it is real good.
Snuggles  [author] 2 Jan, 2022 @ 7:39pm 
@Nilanth No, it currently is not affected by sleep traits. I will add this on my planned feature list.
Nilanth 2 Jan, 2022 @ 5:19pm 
Do the sleeping traits have any effect on this mods sleep durations? I feel like they might not as it seems additive to the stats and I see no obvious trait checking on the github but feel it still should have some degree of effect or a setting for it.
Djackz 2 Jan, 2022 @ 1:25pm 
Thanks Snuggles! :spiffo:
Richard Mc Nutbuster 2 Jan, 2022 @ 10:16am 
fair enuff
Snuggles  [author] 2 Jan, 2022 @ 9:51am 
I made this mod because Project Zomboid has a much lighter difficulty without fatigue and the need to sleep.

Many of us have been playing the Build 41 IWBUMS (aka beta branch) for 2 years leading up to the release of multiplayer and b41 on the main branch. The singleplayer and splitscreen co-op has sleeping and fatigue, and was an important part of the gameplay cycle.
Richard Mc Nutbuster 2 Jan, 2022 @ 9:49am 
oh, thats a thing you turn on seperately, im just not gonna tell my friend LOL
Snuggles  [author] 2 Jan, 2022 @ 9:47am 
@alastor

Make sure you have players able to sleep and required to sleep enabled in your server options.
Richard Mc Nutbuster 2 Jan, 2022 @ 9:31am 
so, i cant even sleep, and sleep doesnt seem required, what is this mod for?
kutodoso 2 Jan, 2022 @ 8:21am 
i ran into a problem, i dont have any friends to play with. solution?
Snuggles  [author] 1 Jan, 2022 @ 2:34pm 
@octanegang v1.2.1 does what you've asked.
Snuggles  [author] 31 Dec, 2021 @ 5:15am 
Thank you I'd love any info I can get. Every report of an issue (sans when I forgot to re-add what should be in the vars) has been very different. That isn't to say I don't wonder what possible conflicts I could be missing by only running vanilla+/QOL mods on my dedi.
Space 31 Dec, 2021 @ 4:21am 
Answer is yes to all of the above, I've checked and checked again.
Going to go through mod list later (Can't imagine it being a conflict, but hey)
Going to test it on a fresh server profile as well.

I do not doubt for a second that it's something weird on my end. I know the mod works and I know it works in this exact mod list.

I'll let you know if I find anything worth sharing!
Snuggles  [author] 31 Dec, 2021 @ 4:05am 
A quick checklist:
Mod is enabled from "MODS" in main menu.
Mod is listed in both Workshop and Mod settings when in "HOST"
Server settings both allow player sleep and players need sleep.

That should be what you need to do if just using "HOST."

You should not need to manually add the vars if you are creating and editing server settings from the HOST menu
Space 31 Dec, 2021 @ 4:00am 
Hosting locally at the moment, currently not a dedicated server. Oddly when I admin up in game, the setting show under time - But they don't show from main menu and the sleep isn't working.