DayZ
195 ratings
Zens Sleeping Mod
6
2
4
2
2
2
   
Award
Favorite
Favorited
Unfavorite
Type: Mod
Mod Type: Mechanics
File Size
Posted
Updated
16.433 MB
23 Apr @ 12:04am
8 Jun @ 7:35pm
10 Change Notes ( view )

Subscribe to download
Zens Sleeping Mod

Description
What Is This?

This mod adds an immersive sleeping fatigue stat to the game.

It is a total re-write of my original sleeping mod and is a far superior version, compatible with 1.28 and beyond.

Click here to watch a silly short trailer explaining the mod features: https://youtu.be/gWgUmdO1BZY

This new "sleep" stat works very similarly to the hunger and thirst stats.

Over time the player will slowly get tired, indicated by the moon icon stat. Eventually they will need to use the Lie Down emote to sleep. (Doing so requires no item in hands, a hotkey can be bound under vanilla Gestures keys).

If they ignore their basic human need to sleep for too long they eventually risk negative effects such as audible yawning giving away their position, occasional visual hallucinations, reduced immunity to sickness and even random unconsciousness if they get extremely tired.

The quality of a player's sleep is affected by whether they are sleeping at night time, near fires or other sources of warmth, inside buildings or tents, or on top of the custom included sleeping bag items which spawn in the world.

By "quality" of sleep I mean:

- There's a limit to how much their fatigue stat can be recovered based on their condition
- Some conditions make them eligible to receive immunity boosts or even health gain
- The speed they recover their fatigue stat is faster if their sleeping conditions are warm & cosy

Server admins have full control over the config of the mod, so the experience may vary from server to server and some of the features or items mentioned here might not be present if the admin doesn't want them to be.

I've spent a lot of time making this mod and followed the template of vanilla systems as closely as I possibly could based on my current modding skill level of 2+ years experience to ensure it is robust to future vanilla changes and also increases the chances of it being compatible with other mods.

It should be compatible with the vast majority of mods on the workshop, but might won't work well with other complex mods which affect player stats (like the Syberia Project for example, who have their own sleeping mod anyway).

A lot of thought has gone into the mechanics and I spent several weeks building the mod and bugtesting, although as a solo dev I'm sure bugs are still present and I'll do my best to fix any which are reported.

Here are some examples of how the mod works and why it's immersive (most of these features are configurable):

- This mod gives players a reason to chill from time to time, make a campfire, and enjoy the ambience
- Trying to sleep while cold, wet, sick, hungry, thirsty, or during the day will limit their max rest
- The player's activity level affects the speed which they drain their fatigue stat at over time
- The player has about 5 hours of full rest time as a freshy (can be configured to be more/less)
- During the night fatigue drains 50% faster when active, but also recovers 50% faster when sleeping
- Getting injured will cause the player to be unable to sleep for some time due to adrenaline
- Drinking sugary drinks like soda cans will increase their fatigue stat (fully configurable)
- Custom items (anesthetic and amphetamine injectors) boost/reduce the fatigue stat significantly
- Sleeping in a sleeping bag or tent will maintain a small heat buff to avoid illness in the cold
- Sleeping inside a building and ideally with a heat source nearby will speed up resting
- Sleeping bags can be carried on the backpack tool slot and can be repaired if damaged
- When the player yawns sometimes their screen will produce a chroma hallucination effect
- The player makes sounds while sleeping which can be heard by attentive players nearby
- The mod was made to be as efficient as possible with server FPS and netcode
- VPPAdminTools compatibility is included for debugging and admin configuration

Installation Instructions:

Install this mod like any other mod (there are many guides out there) - copy it into your server folder and add it to your server mods list. It must be run on both server and client. Make sure to copy the .bikey into your server keys.

Also don't forget to copy over the types.xml from inside the "extras" folder into your server types if you want to add the custom items to your loot table (optional). You can either import my types.xml separately (here's a guide: https://www.youtube.com/watch?v=PAAEhdiQ_vE) - OR just carefully merge my types with the vanilla types ensuring you don't break the XML structure in the process.

The mod will automatically generate a default server config file in your server's profiles folder (under "profiles/Zenarchist/ZenSleepConfig.json"). If you're not experienced with JSON editing make sure to use this website to double-check the validity of your changes or you run the risk of the server reverting all of your changes to the default values: https://jsonlint.com/

There will be a YouTube video on my channel explaining how the mod works: https://youtu.be/7ckS1W7wAq8

And here is a short wiki guide explaining the config etc: https://github.com/ZenarchistCode/ZenModPack/wiki/Zen's-Sleeping-Mod

You DO need to wipe your server to add or remove this mod because otherwise your player profiles will become corrupted due to the new sleep stat.

This mod requires Community Framework to function (https://steamhost.cn/steamcommunity_com/workshop/filedetails/?id=1559212036)

There is an optional persistence-related PBO file in the "ZenSleep/extras/defines" mod folder (for advanced server admins/modders only) - a readme file is included in that folder to explain what it does.

Credit:

Obviously the original sleeping mod included in Medical Attention is a huge inspiration for this mod: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2293429999

I learned a lot about the technique for adding custom stats to the game from the Syberia Project authors: https://steamhost.cn/steamcommunity_com/workshop/filedetails/?id=2569522069

I've learned a ton from DayZ modding communities, particularly the Enfusion Modders Discord (https://discord.com/invite/enfusion-modders-452035973786632194) and studying the work of the Expansion Project team (https://steamhost.cn/steamcommunity_com/workshop/filedetails/?id=2572331007).

My DayZ modding buddy SpaceCat (https://steamhost.cn/steamcommunity_com/id/spacecatboy/myworkshopfiles/?appid=221100) has taught me some important debug tricks and best practices which has no doubt led to improved stability/crash-proofness for this mod and my other recent mods.

Repack & Source Code:

You can repack this mod if you like, and do anything else you want with it for that matter. Just keep in mind my future updates won't be applied so make sure to check back for new versions if you notice any bugs. The source code is on my GitHub at 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 (3)
6
6 May @ 8:29am
Icon didn´t works
Feldwebel Steiner
0
28 Jun @ 6:35pm
SetRequesterUpdating Error
Jay
0
19 May @ 12:05am
Conflicts
[U4EA]MrG
92 Comments
Dr. Death 13 Jul @ 3:38am 
G'day Zen mate, fellow Ozzie here.

I am running a fairly heavily modded server, which include Expansion Bundle (Including AI).
I installed this mod today on my server, but it seems like players outright die if they develop a bleed. Also my Expansion AI die randomly within 4 minutes of spawning in.
Don't know whats causing this, if you would like a list of my mods let me know.
Cheers mate.
Samy FIGUEROA 12 Jul @ 12:30pm 
I confirm the issue that Jamie Marsh has reported, when healing with COT, It reduce at 0% the Sleeping/Energy Bar ! That's enough to stop using the mod and remove it Totally !
Drack 7 Jul @ 3:55am 
i've installed this mod on my server Namalsk, the problem is when after 3 hits of any zombie i instantly die. Without this mod this doesn't happen. I've tried on Chernarus and the mod works perfectly, it only happens on Namalsk and i cant fix it. Anyone knows what happens?
D1ogoBˢᶠᶜ 5 Jul @ 10:07am 
bom
GypsyvGaming 5 Jul @ 4:49am 
Hey Zen, is there a bug with the whole combat buzz thing? Players are reporting it's longer than 15 minutes where they have to log completely to be able to sleep. In the config it's set to 15 minutes
devkirkir 28 Jun @ 8:34pm 
FAUSZ-A-, hi) no
fausz 26 Jun @ 11:14pm 
Does this mod make your character "sleep" when you are offline? Like Rust?
devkirkir 12 Jun @ 8:53pm 
hello! please tell me how to add in VPPA
Gamb1t 11 Jun @ 2:08am 
I'm loving it, welcome back mate.
Jamie Marsh 7 Jun @ 1:46am 
Hi Zenarchist, hope you're well. I know you have added in a patch for VPP, due to some other issues I have had to migrate over to Community Online Tools, when forcing a heal using COT, it completely depletes the energy bar, forcing the player to sleep/blackout.

Is there any fixes to this, so when healing using COT it boosts the sleep meter too?