Project Zomboid

Project Zomboid

640 ratings
Comfy Sleeping [B41 & B42]
6
3
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
810.540 KB
3 Jul, 2023 @ 6:48pm
14 Jul @ 4:36pm
32 Change Notes ( view )

Subscribe to download
Comfy Sleeping [B41 & B42]

Description
Check out my other mod, Proper Vehicle Injuries!


Purpose & How It Works
This mod was created from an idea I saw on Reddit (thanks to user Garrett-Wilhelm) in the Zomboid subreddit. It seemed like an interesting and immersive way to add some depth to Zomboid, so here we are!

Comfy Sleeping adds a comfort mechanic to sleeping, where what your character wears, how they feel, and how dirty/bloody they are contribute to sleep quality. If your characters comfort is high (light/cloth clothing, clean, backpack unequipped), you will get a great nights rest and wake up faster than normal. However, the lower your characters comfort (big bulky clothing, dirty, wearing backpack, hungry, over encumbered, etc), the worse their sleep quality will be. This can range anywhere from slight endurance loss, to waking up several times throughout the night.

A characters comfort is displayed in the tooltip for the "Sleep" context option. Pillow status is also displayed here. Sleeping in a vehicle will display your comfort in the sleep confirmation text box.

Comfort has 6 different levels:
  • Snug as a bug: Fatigue and exertion will regenerate slightly faster while sleeping, meaning you will also wake up quicker than usual.

  • OK: Your character feels comfortable and has no negative effects.

  • Tolerable: Your character won't feel fully recharged when waking up, meaning their exertion/stamina doesn't go to 100% while sleeping

  • Bad: Your character feels more tired in the morning than usual, with a small amount of fatigue and exertion/stamina not fully regenerating.

  • Poor: Your character doesn't recharge a sizeable portion of their fatigue and exertion. They will also wake up after several hours, and may have neck pain.

  • Very Poor: Your character doesn't recharge a significant amount of their fatigue and exertion. They will wake up after only a few hours, and may have neck pain.


Latest Update

Update 2.9.2
  • Added Brazilian Portuguese translation by Guicsr

For bugfixes, please see the patch notes.


Features
  • Standing Items support: Pillows standing up via Standing Items are recognised as pillows for the comfort bonus while sleeping.

  • Multiplayer Support: Now everyone can be restless and uncomfortable together!

  • Moodles & Clothing: Both can now affect your characters comfort, meaning you have to go the extra mile to make them feel right at home.

  • Poor comfort causes pain: Makes pain from sleeping a bit more frequent to be more in line with the mod.

  • Restlessness: Being too uncomfortable will eventually wake your character up.

  • Customizability: Not a fan of how much pain your character wakes up in sometimes? Or wish to disable very poor comfort waking your character up at night? Then disable it!

  • PILLOWS! (They now contribute to your comfort)


Planned Features
  • Body temp/warmth bonus while sleeping. Will help for perma-winter/extreme winter scenario's.
  • Look into compatibility for Beds Have Blankets.

If you have any other ideas that you think would be in line with the mod, feel free to add them to the "Ideas & Suggestions" discussion. These may or may not be implemented, as modding is more meant as a small project to tinker with in my spare time.


SANDBOX OPTIONS
Click here to see the sandbox options and their description/examples!

If the above link isn't working, keep scrolling and look for the pinned "Sandbox Options" discussion board.


FAQ (READ BEFORE COMMENTING)
  • Is Comfy Sleeping compatible with B42 IWBUMS?
Probably, TIS said there has been significant lua/script changes, but as far as I can tell, Comfy Sleeping appears to work fine for B42.

  • Does this mod have any incompatibilities? 
Since this mod doesn't replace any Zomboid files, nor modify any of the vanilla game's code, there should not be any incompatibilities with other mods.

  • Does this mod work in SP/Coop/Dedicated MP? 
Yes it works in all 3! It was intended & tested to work with MP, and because the code is handled client side, it should have no issue with either SP or Coop saves.

  • Is this safe to add to a current save? 
Yes it is safe to add and remove at will! All of the code in the mod is custom, meaning it doesn't need to hook in to or modify any of the vanilla game code. If the mod is enabled, you'll have the comfort mechanics, if not, then you won't!

  • I'm adding this to an existing SP save, how do I change the sandbox options mid save? 
Use a mod such as Change Sandbox Options to modify them.

KNOWN ISSUES
  • Comfort not showing in Sleep context option: There seems to be an issue potentially related to Act 1 & 2 of True Actions, lying down on beds or other furniture causes the Sleep UI to no longer report the players comfort level. Hovering over the Sleep option of a bed/couch/chair and not sitting on it still works as normal.

  • Comfort calculation bug: Some users have reported their comfort being stuck at 'very poor' after sleeping with exercise fatigue. Need to find out reproduce-able steps, game version, and, if needed, investigate comfort calculations.


TRANSLATIONS
If there are any issues with the translations, please let me know!
  • English - Translated by Fluffy89
  • German - Translated by LordWolfi
  • French (French Canadian) - Translated by LordWolfi
  • Italian - Translated by Galaga_G
  • Simplified Chinese - Translated by Pillow Victim (needs updating, comment if you can help)
  • Traditional Chinese - Translated by Pillow Victim (needs updating, comment if you can help)
  • Polish - Translated by Typical
  • Brazilian Portuguese - Translated by Guicsr

Thank you to all those who have helped in translating Comfy Sleeping!


MOD PERMISSIONS
[theindiestone.com]

Feel free to include the mod in modpacks/workshop collections here on Steam. You are however NOT AUTHORISED to do any of the following:
  • Redistribute OR re-upload to any platform
  • Modify Comfy Sleeping's code


MOD-ID & WORKSHOP-ID

Workshop ID: 2998737588
Mod ID: ComfySleeping
Popular Discussions View All (7)
4
20 Jun @ 7:39pm
portugues brazilian version
Guicsr_
29
8 Jun @ 7:52pm
PINNED: Ideas & Suggestions
Fluffy89
16
30 Mar @ 4:51pm
PINNED: Translations
Fluffy89
243 Comments
Fluffy89  [author] 15 Aug @ 1:55pm 
Humongouspntl, bed quality is determined by what you are sleeping on, whether it be a chair, couch, matress, bed, or anything else you can sleep on. This is determined by the Zomboid itself. Comfy Sleeping only calculates the 'comfort' value you see underneath the bed quality.

If you're waking up in the middle of the night, its either your comfort is at 'poor' or 'very poor' then that might be Comfy Sleeping. If not, its either the vanilla game waking you up from distant gunshots/screams/windows breaking, or another mod.

To raise your characters comfort, make sure their moodles are taken care of, wear more comfortable clothing (clothes with sheets for their fabric are best, denim is a bit uncomfy, and leather is quite uncomfy), and that their bag is taken off.
humongouspntl 15 Aug @ 1:30pm 
i keep waking up when my bed is not poor its average. can someone help me?
Fluffy89  [author] 25 Jul @ 9:39pm 
QS, glad to have helped to explain it then! If theres any other things you need me to explain in better detail, feel free to leave another comment :)
QS 25 Jul @ 7:47pm 
@Fluffy89 thanks a lot, it's clear to me now
Fluffy89  [author] 25 Jul @ 1:40pm 
To reiterate just to make sure things are as clear as I can make them, moodle modifiers of +10 and -20 in your example would change that respective moodles comfort modifier by up to +40 or -80.
Fluffy89  [author] 25 Jul @ 11:46am 
QS, for the comfort modifiers, note that they are per 'level' of that moodle. So for example, being well fed gives +2 comfort per level for a total of +8 comfort when you are well fed (positive version of hunger moodle should have 4 levels, but I'm not 100% sure).

Same for negative moodles, being moist only removes 2 comfort, while being soaked (or whatever the max moodle for wet is called) removes 8.

Changing moddle modifiers to +10 or -20 would more or less 'break' things, as being well fed would then give 40 comfort, and being wet would remove 80. I advise keeping these in the low or mid single digit numbers.

Hope this helps explain it a bit, if not, feel free to leave another comment :spiffo:
QS 25 Jul @ 5:17am 
How do I understand how much 100 comfort is in sandbox settings?
Like for example well-fed gives +2 comfort, but +2 is so little it seems it wouldn't affect anything. If I raise it up to +10, will it destroy the balance because it's 5 times more or it will not?
Or another weird thing, if hat being worn is -15 comfort, how come, for example, being wet is only -2? Is being wet not super nasty and that way it should be like -20? Or -2 is actually a decent discomfort value?
Stefyn 15 Jul @ 6:23pm 
alright thanks
Fluffy89  [author] 15 Jul @ 6:04pm 
Ah, I see. The clock being wonky and either passing by faster/slower than usual isn't caused by Comfy Sleeping, I believe I've had a friend experience this a while back on a multiplayer server we had going, so its likely just a small PZ bug.

Hope this helps! :spiffo:
Stefyn 15 Jul @ 5:58pm 
also im on B42, and yes with the mod off it happens sometimes