Sleeping Overhaul (DOES NOT WORK WITH STEAM FFS)
12 12

121 posts in this topic

Sleeping Overhaul


Did you ever want to hole up in the Pile 'o Crepes or Spiffo's Burger Joint but couldn't because there was no place to sleep? Then this mod is exactly what you are looking for. It allows you to sleep virtually anywhere (in beds, on sofas, in tents, in armchairs, on chairs, on benches, on the floor, and more...) and every object has its own comfortability levels which affect the recuperation process.
 

You too can sleep in the lovely smell of crêpe.

DBSaeHP.png


But this mod does more than adding more sleeping possibilites to the game. It changes the whole sleeping system. The player won't sleep for a fixed amount of time anymore but instead only until he is fully recuperated ... or awakened by a nightmare. You now can also sleep whenever you want - No more "you aren't tired enough to sleep" modals. Take a nap and be happy!
 

Church is closed... but open for napping.

wWpVSHb.png


There is also a chance to pass out when too tired now, so try to sleep regularly. If it happens, your character will drop to the floor and stay unconscious for a few hours. Of course this has a few repercussions so try to avoid it ... not to speak of the zombies who might munch on your brain while you are dreaming of better days.
 

Who wouldn't sleep in a fast food joint!?

v9FfUkR.png


The recuperation system is more realistic than with the vanilla sleeping mechanics. With this mod a healthy character who's very exhausted sleeps about 6 hours to be fully rested. But there are other factors that influence the recuperation time. For example being stressed will make the player sleep longer to regain fatigue, because who could sleep deeply during a zombie apocalypse anyway?

At the moment the most important factor for the sleeping time is the comfort level of the furniture (from best to worst):
  • Level 0: Beds
  • Level 1: Couches
  • Level 2: Armchairs, Tents*
  • Level 3: Chairs**, Benches, Treatment Tables
  • Level 4: Bathtub
  • Level 5: Toilet, Stools
  • Level 6: Floor
* Park Rangers have the "Camping Enthusiast"-Trait which makes tents as comfortable as beds for them.
** Security Guards have the "Chair Man"-Trait which makes chairs as comfortable as sofas for them.

Sleeping in a bed will of course offer the best recuperation, but I tried to keep the values balanced so even sleeping on the floor (without any other effects) won't be too bad. Of course I know that there are some people out there who'd prefer sleeping on the floor. For those people the values are easily changeable in the Sleeping_Config.lua file.









Some of the new modal dialogues.

f96o5FB.gif


As of version 1.1.0 there are two new traits for the Park Ranger and the Security Guard which affect the sleeping behaviour for those characters. The custom icons were made by the one and only Thuztor!
 

fshOsGc.png


Finally sleeping is affected by a multitude of factors (stats, comfortability, etc...) and there is even more stuff to come in the future! For a complete list of the current features check out the changelog below. As always crits && comments are appreciated. If you find any bugs or places where the sleeping overhaul doesn't work please report them here! Also the stats and different values aren't carved into stone. If there are issues with the balancing I'm totally open to change it.

 

Download for Updated Sleeping Overhaul (Build 27) updated by Pravus


 

(OUTDATED) Download from pz-mods.net

8o6exC7.png



The mod in action:
(ENG) Awesome showcase by Rancorist:



(GER) Great let's play by totu:


Known Bugs:
- Player starts sleeping before walking to the object (Fixed in v1.1.0)
- Fatigue is reset right after sleeping (Fixed in v1.1.0)
- Nightmares happening even when negative stats are zerored (Fixed in v.1.1.2)

Special Thanks:
EreWeGo: for all the testing and feedback!
Thuztor: for helping with the tile sheets && creating the trait-icons!
RobertJohnson: for his work and help with modding!
aricane: for pz-mods and being a nice guy!
7roses: for helping me figure out the overriding stuff!
... and finally all the people I forgot :)

Changelog


Version 1.1.2

  • Added icons for the custom traits (created by Thuztor)
  • FIXED: zeroed stats provoking nightmares
Version 1.1.1
  • FIXED: Tent had wrong comfort level (whoops)
Version 1.1.0
  • Normal sleeping reduces a small amount of unhappyness now
  • Awaking screaming from a nightmare might attract zombies (small radius)
    => make sure you don't go to bed panicked ;)
  • Unhappyness & Panic affect the recuperation time of normal sleep now
    => Increased chance for nightmares
    => Mental health is kind of important now ;)
  • Added custom traits to parkranger and security guard
    => Camping Enthusiast sleeps better in tents
    => Security Guard sleeps better on chairs
    => ! Icons are placeholders at the moment !
  • Player regains a little bit more fatigue when passed out
  • Sleeping Overhaul now works for tents
  • FIXED: Mod doesn't change base files anymore.
    => Instead overwrites them when game is loaded
    => ISWorldObjectContextMenu.createMenu()
    => ISCampingMenu.doCampingMenu()
    => ISCampingMenu.onSleep()
  • FIXED: Bug where the fatigue was reset after sleeping.
  • FIXED: Bug where player would sleep before walking to the object.
  • Some Code refactoring ...
Version 1.0.0
  • Added chance to pass out when too tired.
    => player will stay unconscious for a random amount of hours
    => passing out will only restore a small amount of fatigue
    => passing out will make you unhappy :(
  • Added options to sleep virtually anywhere:
    => on the floor
    => on beds
    => on sofas
    => on armchairs
    => on chairs
    => on benches
    => on treatment table
    => on crafted chairs
    => on stools
    => differentiates between a total of 291 tiles
  • Each object has a different level of comfortability
  • Sleeping has no fixed length anymore
    => instead player will sleep until being recuperated
    => small chance to wake up early when sleeping stressed (due to nightterrors)
  • Recuperation is affected by comfortability and certain stats
    => Nightowl Perk will reduce recuperation time
    => Stress will increase recuperation time
    => Lower Comfortability will increase recuperation time
    => Having a pillow in the inventory will reduce recuperation time
  • Player can take short naps even when not tired
  • Player walks to object to sleep
  • Tweaked ISModalDialog to prevent modals from being displayed offscreen
  • Tweaked ISWorldObjectContextMenu to deactivate the vanilla sleeping option
Version 0.1.0
  • Added option to sleep in bathtubs
  • Added option to sleep on toilets

Marmotte971, nasKo, Totu and 10 others like this

Share this post


Link to post
Share on other sites

Great to see all of your awesome mods here, Mat.

That was quick haha :) Thanks Rathlord!

I wish I could've released the Sleeping Overhaul (or at least an early version of it) today :(

Hopefully I can finish it tomorrow.

Share this post


Link to post
Share on other sites

Now let us sleep on the floor, in trees, and under Dumpsters.

In trees and under Dumpsters?

Well actually sleeping (passing out) on the floor is one of the things I want to integrate.

Good work :)

Thanks! <3

Share this post


Link to post
Share on other sites

Sleeping anywhere is planned for the final game, also. Just one of those things we may need to wait on XD

Share this post


Link to post
Share on other sites

UPDATED TO VERSION 1.0.0

Features as listed below:

  • Added chance to pass out when too tired.
    => player will stay unconscious for a random amount of hours
    => passing out will only restore a small amount of fatigue
    => passing out will make you unhappy :(
  • Added options to sleep virtually anywhere:
    => on the floor
    => on beds
    => on sofas
    => on armchairs
    => on chairs
    => on benches
    => on treatment table
    => on crafted chairs
    => on stools
    => differentiates between a total of 291 tiles
  • Each object has a different level of comfortability
  • Sleeping has no fixed length anymore
    => instead player will sleep until being recuperated
    => small chance to wake up early when sleeping stressed (due to nightterrors)
  • Recuperation is affected by comfortability and certain stats
    => Nightowl Perk will reduce recuperation time
    => Stress will increase recuperation time
    => Lower Comfortability will increase recuperation time
    => Having a pillow in the inventory will reduce recuperation time
  • Player can take short naps even when not tired
  • Player walks to object to sleep
  • Tweaked ISModalDialog to prevent modals from being displayed offscreen
  • Tweaked ISWorldObjectContextMenu to deactivate the vanilla sleeping option
Kajin, Cap1139, Dr_Cox1911 and 2 others like this

Share this post


Link to post
Share on other sites

Great work Mat, can't wait to try out this latest version, love the changes listed!  :)

Share this post


Link to post
Share on other sites

Two things I noticed so far. You can sleep after you woke up, meaning if you're well rested at 2 am, you can keep on sleeping. Is that intented? Another thing is the modal windows seems to appear near the cursor rather than in the center of the screen.

Share this post


Link to post
Share on other sites

Thanks for the feedback.

Both are intended. The "napping" can be used to forward time a bit, because in real life you can stay in bed too if you are too lazy to get up ^^

I might change the modal position if people don't like it that way. I thought that having it at the cursors position would feel more "natural". If people don't like it, it wouldn't be a big issue to bring it to the middle ;)

Share this post


Link to post
Share on other sites

Wowzers! This is amazing!

Thank you very much lemmy! (clyde)

 

I should probably start using mods... This would be awesome.

What holds you back? :)

Share this post


Link to post
Share on other sites

Amazing RoboMat.

 

I petition and vote for The Indie Stone to hire RoboMat as a developer.

 

 

And RoboMat? What's with the dragons? Is it a Magic Dragon named Puff? Or his cousin named Pass?

ROFLMAOmatt likes this

Share this post


Link to post
Share on other sites

I petition and vote for The Indie Stone to hire RoboMat as a developer.

Haha and I petition that they spend their money on someone more experienced ;)

Besides, I'm not french so it's impossible anyway!

 

And RoboMat? What's with the dragons? Is it a Magic Dragon named Puff? Or his cousin named Pass?

Well, as I had to remove the dragons from the lockpicking mod because of the dwarf infestation I didn't want to risk it with this mod :geek:

 

Amazing update!

 

Thanks for your help Thuztor :)

Share this post


Link to post
Share on other sites

nice modding again RoboMat :D (I really love your mods :))

but why overwriting the files ISModalDialog and others?

why not just overwriting there functions out of another file? this makes your mod even easier to enable/disable install/uninstall

Share this post


Link to post
Share on other sites

The tweak in ISModalDialogue is just a little fix I provided so it actually doesn't harm the game even if my mod is removed (it prevents the modal dialogues from being displayed off-screen).

 

In ISWorldObjectContextMenu.lua I had to deactivate the vanilla sleeping. It can be easily reactivated by uncommenting these lines:

    -- sleep into a bed    -- RoboMat: deactivated to use sleeping overhaul mod    --    if bed then    --        if test == true then return true; end    --        context:addOption("Sleep", worldobjects, ISWorldObjectContextMenu.onSleep, x, y);    --    end

But of course you are right, modifying base files is a no no :) I'll see what I can do about it until the next update.

Share this post


Link to post
Share on other sites

Why am I so tired? My survivor has slept about 18 hours (4-5 at a time) for over a week straight and every time after waking up I am Very Tired so I go back to sleep, wake up and very tired, go back to sleep, tired, sleep, tired, sleep. But I'm still very tired when I wake up :(. And the pop-up says I'm fully rested when I wake up.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
12 12