DayZ
520 ratings
ZenSleep
6
6
5
3
2
2
2
2
   
Award
Favorite
Favorited
Unfavorite
Type: Mod
File Size
Posted
Updated
1.842 MB
Apr 25, 2022 @ 2:22am
Feb 16, 2023 @ 5:49pm
22 Change Notes ( view )

Subscribe to download
ZenSleep

Description
DEPRECATED!

This version is no longer maintained - check out the new V2 version here (compatible with DayZ 1.28): https://steamcommunity.com/sharedfiles/filedetails/?id=3468961047

What Is This?

This mod adds an immersive sleeping feature to the game.

It is heavily based on and inspired by Lucian's old Medical Attention mod, so most of the credit goes to him (and ◣ ▲▼▲ for updating his mod to work with recent builds of DayZ).

It has been designed to be as intuitive and immersive as possible, but keep reading to learn about all the various features and behaviors of this mod. Much more info is in the included readme file.

Player Guide:

The following information might vary depending on the server settings you're playing on, but with the default settings the mod will behave like this:

You have approximately 4-6 hours of full energy on a new character (real time, not server time).

Your tiredness will deplete faster or slower depending on the activities you're doing.

Sprinting around the map or basebuilding and carrying heavy items will result in you becoming tired faster, while taking it slow will result in a longer wake time.

If your "tiredness" meter falls below 20%, your character will start yawning randomly.

These yawns are audible to other players like the vanilla sickness sounds and can give your position away, so stay rested!

If you allow your tiredness meter to fall below 10%, then you run the risk of randomly falling unconscious from tiredness.

If you hit zero then your character will fall asleep on the spot.

You can recover your rest using the "Lie Down" emote (NOT the "Lie Back" emote!)

The longer you let your player stay sleeping, the faster your energy recovers.

Sleeping next to a fire will not only protect you from potentially catching influenza, but will help you rest faster and recover more energy depending on the time of day.

Sleeping inside buildings and tents will also allow you to recover energy faster. The fastest way to rest is in a building with a fire lit nearby (fire must be within 3 meters).

Rest Limits:
During the day you can only recover 50% of your energy sleeping without a fire, or 75% with a fire.
During the night you can only recover 80% of your energy sleeping without a fire, or 100% with a fire.
Sleeping inside buildings and tents (especially with a fire nearby) is the best way to recover your energy quickly.

If your clothes are wet you might not be able to recover the maximum energy, so make sure to dry your clothes before sleeping.

Certain drinks can also help you recover your energy (soda cans in particular). Certain meds will make you more sleepy (PO-X injectors especially, but also morphine & epinephrine).

There are also some syringes you might find which you can use to keep yourself awake, or put other survivors to sleep...

You can also fall asleep while driving (unless the server you play on has turned that option off), so make sure to utilize rest stops often on long drives!

All of these features are adjustable on the server-side config so your experience may vary, make sure to check with your server operator for more info on how they set their server up with this mod.

Server Owner Guide:

Here is a video explaining most of the features of this mod: Video Guide

Main Sleep Mod Features
(All Configurable in ZenSleepConfig.json):
- Sleep meter (configurable: always show, only show on inventory screen, or only show above certain tiredness %)
- Random yawn sound when player gets tired (male & female sounds - audible to nearby players)
- Chance to randomly fall unconscious when the player gets too tired
- Random sleep sounds when player is resting (male & female sounds - audible to nearby players)
- Many other small details (explanations are in the mod readme file)

Max Rest While Sleeping:
- 50% during the day with no fire
- 75% during the day with a fire
- 80% at night with no fire
- 100% at night with a fire
- Beware - if you sleep without a fire you might catch influenza (configurable)

Other Notes:

The mod will detect fires within 3m of the player, and if the fire is lit then it counts as a heat source.

If you have issues with fires on certain maps or sleeping next to modded heat sources, try turning "HeatBuffCountsAsFire=true" on.

Set DebugOn=1 in the config to get detailed messages explaining what the mod is doing and what values it is detecting.

Rest Accelerators:
Depending on where you are sleeping will affect how quickly you regenerate energy. The mod can tell when you are sleeping under a roof and if you have a fire lit nearby.
- Asleep Outside With No Fire = 1x
- Asleep Outside With A Fire = 5% faster
- Asleep Inside House or Building With No Fire = 10% faster
- Asleep Inside House or Building With A Fire = 20% faster

Energy Drinks / Consumption Items:
You can add your own energy drinks/consumption items in the json config. The default ones are:
- Epinpehrine: +25% rest
- Cola: +25% rest
- Pipsi: +20% rest
- Fronta: + 15% rest
- Spite: +10% rest
- Kvass: +5% rest

The mod checks for energy drink items and rest object types with a "contains" check and is not case-sensitive. A negative value increases energy, a positive value decreases energy. So in other words, if you want to make all soda cans restore 20% of your energy you can just set the JSON config to have this entry:

{
"ItemType": "sodacan",
"EnergyGained": -20
}

Some meds will also negatively affect your energy:
- AntiChemInjector (PO-X): -100% rest
- Morphine: -20% rest

Anesthetic & Stimulant Syringes:
This mod also comes with 4 custom items:
- Anesthetic Syringe (and "used" version)
- Stimulant Syringe (and "used" version)

The anesthetic syringe puts the player to sleep (can be used on self or others).
The stimulant syringe maxes out your rest energy (can be used on self or others).

These syringes are optional and can be disabled by simply not adding the types to your types.xml.

(If you want to enable them spawning, just copy the text inside the provided types.xml from the mod folder and merge it into your server's types.xml)

Rest Objects:
You can add specific objects in the json config that affect how the player sleeps.
Note: This feature is still in development and doesn't work 100% of the time on some objects.
- MediumTent: Max rest during the day with no fire is 80%, you sleep 10% faster and no chance of influenza regardless of fire status.

Default Mod Settings
A detailed explanation of all the configuration settings is provided in the mod folder's readme.

Credits:
Lucian & ◣ ▲▼▲

Repacking:
Unfortunately due to lack of time I can't maintain all of my mods all of the time. I do my best, but these mods are offered as-is. If there's a problem, you have the source code and my permission to fix it yourself and upload a fixed version to the workshop without any credit necessary. It's all free.

As with all my mods the source code is open-source and free to use however you like. You can find the code on my GitHub - www.zenarchist.com

Buy Me A Coffee:

All my mods are free and open source, but it takes an enormous amount of time to put some of these mods together. If I've helped you out, please consider helping me buy my next coffee! I don't expect it, but I very much appreciate it.

https://buymeacoffee.com/zenarchist

Enjoy!
Popular Discussions View All (16)
2
Feb 3 @ 11:23am
Roaming AI go to sleep
Dr. Death
6
Dec 27, 2022 @ 8:46am
Boomlays bed & Illness problems
RetroMaja
4
Mar 15, 2023 @ 9:45am
incompatible
ATOS
377 Comments
DaɍkḘᵽ1d3mic May 13 @ 6:20am 
new v2 doesn't work with expansion, any fixes?
13 Apr 23 @ 12:28am 
Thanks Zen! Looking forward to checking out the new version!
Zenarchist  [author] Apr 23 @ 12:20am 
Thanks for your patience on this guys, took far longer to put together than I expected (as always with this fkn game lol) but version 2 is out now.

Here's version 2: https://steamcommunity.com/sharedfiles/filedetails/?id=3468961047

V2 works much the same as this old one, but using way better code which follows best practices as closely as my experience allows (so it shouldn't have minimal impact on server performance and be far more stable/less potential errors etc)

And it's a bit more streamlined than the old mod and not quite as convoluted with the config. This old mod was quite frankly written in spaghetti code - the new version is significantly better I'm pleased to say. Although it may have some bugs being a total re-write so bare with me while I iron any out.

I won't be updating this old mod but I'll leave it here just in case anyone has a need for the old source code.

Sweet dreams survivors! Thanks for using my mods, makes all the work worthwhile :)
dedov1x Apr 14 @ 10:19am 
@Zenarchist <3
13 Apr 12 @ 10:05pm 
That new icon for v2.0 looks absolutely amazing. I think I speak for everyone when I say we'll be patiently waiting for the release & thanks for giving us an update on the situation.
PAY DAYZ Apr 12 @ 5:57pm 
Ты молодец!:steamthumbsup:
MastaHiggins Apr 11 @ 6:13am 
That's great news!
Dr. Kendo Apr 11 @ 5:44am 
@Zenarchist: :steamhappy: <3<3<3 :happystar2022: :steamthumbsup:
Zenarchist  [author] Apr 11 @ 1:26am 
Sorry for the neglect on this mod, I've been burnt out with modding and needed a break. But I'm currently working on a new sleeping mod v2.0 re-written from scratch for 1.27+ with much better code which will blow this old one out of the water as I made it long before I really knew what I was doing. Not sure when v2.0 will be ready to release, but hang in there, it's getting close and will be worth the wait I promise: https://i.imgur.com/8LZNyGR.jpeg
Cypher Agathe Mar 25 @ 9:53am 
Element | PVE vs PVP vs THE HORDE vs AI vs YOU vs THEM vs ME 14.1.28.218:2302