Other user's assetsAll the assets in this file belong to the author, or are from free-to-use modder's resources
Upload permissionYou are not allowed to upload this file to other sites under any circumstances
Modification permissionYou must get permission from me before you are allowed to modify my files to improve it
Conversion permissionYou are not allowed to convert this file to work on other games under any circumstances
Asset use permissionYou must get permission from me before you are allowed to use any of the assets in this file
Asset use permission in mods/files that are being soldYou are not allowed to use assets from this file in any mods/files that are being sold, for money, on Steam Workshop or other platforms
Asset use permission in mods/files that earn donation pointsYou are not allowed to earn Donation Points for your mods if they use my assets
Author notes
This author has not provided any additional notes regarding file permissions
File credits
This author has not credited anyone else in this file
Donation Points system
Please log in to find out whether this mod is receiving Donation Points
Fix regression: diarrhea not waking up characters even when untreated.
Version 1.5.1.0
Diarrhea no longer wakes characters when their dysentery is being treated.
Fixed snores not ending immediately when characters wake up.
Rebalanced sleep healing primarily to make infection healing more relevant while keeping infections dangerous in the long term.
Infections no longer increase the duration of sleep significantly more than other afflictions.
Slightly reworded localizations to better express the intended meaning.
Version 1.5.0.0
The Time Skip Patch is now fully integrated into the main file.
The amount of time to skip is now determined dynamically when loading a save file, and it depends on the maximum number of players (ServerMaxPlayerCount). Solo sessions work like they used to (X divided by 1 = X)
The timescale (24-hour cycle/DayNightLength) is now determined dynamically when loading a save, which makes the old timescale patches obsolete.
Version 1.4.1.0
Added a small base hunger & thirst cost for sleeping
Added a small cost for recovering HP and fatigue when sleeping
Version 1.4.0.2
Improved compatibility with other mods.
Version 1.4.0.1
Fixed colored bedrolls not triggering sleep
Removed safety checks that were triggering yellow warnings in the console (will not be necessary in the future)
Improved compatibility with other mods
Version 1.4.0.0
The Refreshed status is no longer permanently displayed on the HUD, and is only displayed when relevant instead
The Alertness debuff no longer triggers by taking damage from passive sources (like debuffs), unless the character is under 10% max HP
The duration of insomnia now scales with the total chance of insomnia, ranging roughly from 2 game hours at 0% chance to 36 game hours at 90% chance
Version 1.3.1.1
Fixes buffs getting applied in god mode
Version 1.3.1.0
Added previously missing translations for the sheep-counting
Greatly reduced the wait (counting sheep) when insomnia is going to trigger anyway
Improved description of the new Bedtime buff
Changed the color of the icon of the Bedtime buff
Icons for Bedtime, Sleep Deprivation, Severe Sleep Deprivation, and Insomnia chance increases now blink at the start
Getting attacked during microsleep now immediately removes the black screen effect
Display of the chance of insomnia now shows only up to one digit after the decimal point
Fixed sedatives not triggering VFX before Sleep Deprivation kicks in
Version 1.3.0.0
Improved the reminder at 20 hours awake by adding a new 'Bedtime' status (orange bed icon) that is removed when the player gets full rest, or is otherwise replaced by Sleep Deprivation if the player stays up long enough (thanks KNcreepy98 for the suggestion). This new status makes it significantly easier to fall asleep during that timeframe
Visual effect of the reminder now only triggers if the player is not under the effect of Stimulants, Coffee or Mega Crush
Mega crush now prevents all visual effects of Sleep Deprivation except for hallucinations
Coffee now prevents microsleep during Sleep Deprivation (thanks Darkikos2 for the suggestion)
Reduced the maximum and average amount of time to wait to fall asleep
Set a hard cap of 80 to 100 seconds (random) of maximum sleeping time per attempt even if the healing quota isn't fully used up, to prevent excessive sleeping and make things a bit more predictable
Slightly tweaked falling asleep speed multipliers for the following statuses: Sedatives, Sleep Deprivation, Severe Sleep Deprivation
Fixed Refreshed status ticking during sleep, which caused the sleeping timer to reset if the Refreshed status happened to end before the player finished sleeping
Version 1.2.1.0-TSP
Sleep reminder and Bedtime buff trigger after 16 hours awake instead of 20
Version 1.2.0.0
Refactored code to simplify the implementation of patches for alternative 24-hour cycle settings (yes, I don't want to have to update these ever - sue me)
Added optional patches for alternative 24-hour cycle settings
Updated the Time Skip patch to work with the new system
Fixed a typo in Localizations.txt
Added "Microsleep" to the list of effects in the description of Sleep Deprivation
Improved the logic of Sleep Deprivation visual effects to fix a bug that could trigger when taking Stimulants right before the visual effects ended (thanks viking093 for reporting) and other potential similar problems
Version 1.1.0.0
Fixed chance of insomnia from alcohol applied multiple times on interrupted sleeping attempts
Removed minor long-term chance of insomnia from alcohol and coffee to make insomnia more predictable
Lowered short-term chance of insomnia from coffee from 10% to 6%
Added missing short-term increase in chance of insomnia from drinking mega crush (8%)
Random visual effects for sleepiness now start triggering at the same time the player gets the Sleep Deprivation debuff
Changed the time window for Sleep Deprivation to kick in from 20-28 hours to 24-28 hours since the last time the player slept
Added a toolbelt message after 20 hours awake reminding players to sleep soon, with a single microsleep effect triggering at the same time
Added a buff that displays the current total chance of insomnia. It's only visible on the status interface, not the HUD.
Added a short-duration buff that displays increases in the chance of insomnia so players can more easily tell what increases the chance and what does not
Improved translations (or tried to)
Version 1.0.1.0-TSP
Reduced the duration of the Refreshed status to 8 hours for balance and to make schedules more manageable
Increased the maximum healing from sleeping by 33% for balance
Increased the injury healing rate values by 50% so sleeping while hurt does not take much longer than before the update
Version 1.0.1.0
Made stimulants and sedatives craftable at the chemistry table. Progression not touched for compatibility with other mods
Replaced dummy sound for attracting zombies with snoring sounds (thanks Darkikos2 and josefdark for the suggestions)
Fixed refreshed status getting removed after oversleeping
Fixed minimum sleeping time not taking into account refreshed status
Slightly tweaked auditory hallucinations
Version 1.0.0.1
Fixed error that was triggering a game-breaking ArgumentNullException
Version 1.0.0.0b
Initial release
Version 1.0.0.0-NSP
Add optional patch to disable snoring (and its associated danger)
What this mod is A sleeping system aiming to be realistic, immersive, and fun, mainly for those who seek to enhance the survival aspects of the game.
What this mod is not Simply a quick way to skip the night, which is something you may be after if you mostly enjoy the looter-shooter/sandbox aspects of the game. While skipping the night is possible with this mod, there are better mods for that out there if that's all you care about.
Important notes about time-skipping in V1.5.0.0+ Time-skipping supports up to 12 players. Servers with a Max Players setting (ServerMaxPlayerCount) of 13 or more will not skip time when players sleep.
If you play solo and want time to be skipped when you sleep, set Server Enabled to Offline, as seen in the image.
If your group is smaller than 13 people and you want time to be skipped, set Max Players (or ServerMaxPlayerCount in dedicated servers) to the size of your group, otherwise less time will be skipped than you expect.
Features
(New!) Time is gradually skipped when you sleep, and the amount of time skipped this way is dynamically adjusted based on the maximum number of players in that server. This is now the default behavior. No need to install an optional patch for this anymore.
(New!) Effects are dynamically adjusted to your chosen 24-hour cycle. No need to install separate patches for this anymore either.
Server-side.
EAC-friendly.
Designed with multiplayer in mind (but works the same in single player).
Not overpowered or punishing, and has built-in mechanisms against abuse that don't hinder the gameplay otherwise.
Realistic but prioritizing fun over realism.
Designed to be as compatible as possible with other mods out of the box.
Sleep helps you recover from injuries and infections, not just regular damage, with limitations, at the cost of a little hunger and thirst.
You cannot see and your hearing is impaired while you sleep.
You can sleep on bedrolls, beds, couches, mattresses, and other types of blocks might be added in the future. Beds from other mods are also supported.
Sleeping on good quality beds increases the healing rates.
Random chance of snoring attracts nearby zombies to your location. Nearby players can also hear the snoring, and get ready for the consequences...
Integrates with the new challenge system from A22/1.0, adding 10 new sleep-related challenges (see pictures)
Implements sleep as a new need system with its own rules, but it is fairly forgiving.
Adds new sleep-related status effects, including an Alertness buff that triggers whenever you get attacked (simulating a fight-or-flight response), Sleep Deprivation, Severe Sleep Deprivation, Insomnia, a Refreshed status (after uninterrupted sleep), and more (see pictures for more info).
Uses various visual and sound effects for immersion.
Adds 2 new items: Sedatives and Stimulants. You can find them in loot and traders, or craft them at the chemistry table.
I went ahead and translated my ridiculous ingame descriptions into all 12 languages supported by the game. Translations are by no means great but hey, I am only human... (for now). Gern geschehen, de nada, de rien, prego, どういたしまして, 천만에요, nie ma za co, Пожалуйста, rica ederim, 不客气, 不客氣.
This video shows the first version of the mod (1.0.0.0b). Numerous things have been improved since.
How to Use
Stand on top of a bed or bedroll, stay still, and then crouch to begin trying to sleep.
While you are trying to sleep (counting sheep), you can cancel at any time by moving around or standing up.
Once you fall asleep, you will not be able to move around, but you will be able to use your inventory and other menus. Standing up at this stage will not wake you up. Your character will have to wake up on their own, which can take as little as 20 seconds or as much as 100, depending on your general health.
Getting attacked, getting diarrhea (when the sound plays during Dysentery), or getting too hungry or too thirsty, will wake up the character before they get enough sleep.
Once your character wakes up, they will get a Refreshed status (green bed icon), which indicates how many seconds will be added to all attempts to fall asleep until that status ends. This is a measure against abuse of the sleeping system and it's also somewhat realistic, because it's generally not so easy to fall asleep again once you already got some sleep.
Known Issues
(1.0b336 /1.1b4) If you want the new challenges added by this mod to load correctly, you need to start a new game after installing this. It's not a bug in this mod, it's a bug in the game itself (the Fun Pimps have to fix this, not I). The rest of the mod works fine even if you don't.
Compatibility issues are very unlikely as of v1.4.0.1, but still possible. RuntimeOCD can solve the most likely compatibility issue between this and other mods, and it will otherwise report some of the less likely ones so you can more easily tell which mods are in conflict.
If you set ServerMaxPlayerCount (the max number of players) to a higher value than the number of actual players that will play in the server, time skipped when players sleep will be less than you expect. It's recommended to limit the max number of players to the actual number of people playing, or otherwise set it to 13 or higher to disable time skipping altogether. This is by design, as it allows the mod to remain server-side and EAC-friendly.
To-Do
Implement some form or another of insanity for long-deprived survivors, and ways to treat it. Not confirmed yet, but most likely going to happen.