ZenSleep
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.
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).
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.
Here is a video explaining most of the features of this mod: Video Guide
(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)
– 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)
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.
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
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
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)
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.
A detailed explanation of all the configuration settings is provided in the mod folder’s readme.
This mod is still in development and I’m not an experienced modder, so there may be issues with these early builds. Please be patient and also please let me know if you encounter any issues (and ideally as much info about what caused it as possible so I can investigate it and try to recreate it myself).
There are a handful of minor quirks with the mod I’m still ironing out but so far I haven’t discovered any major issues. More info is in the readme.
Lucian & ◣ ▲▼▲
As with all my mods, you are free to repack or do whatever you like with this mod. But keep in mind that repacking will prevent my updates from being automatically applied, and this mod is still in development.
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.io
If you want to see all of my mods in action check out HardcoreDayZꓸcom!