DayZ
250 个评价
Zens Sleeping Mod
7
2
4
2
2
2
   
奖励
收藏
已收藏
取消收藏
Type: Mod
Mod Type: Mechanics
文件大小
发表于
更新日期
16.450 MB
4 月 23 日 上午 12:04
11 月 7 日 下午 9:23
21 项改动说明 ( 查看 )

订阅以下载
Zens Sleeping Mod

描述
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://psteamcommunity.yuanyoumao.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://psteamcommunity.yuanyoumao.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://psteamcommunity.yuanyoumao.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://psteamcommunity.yuanyoumao.com/workshop/filedetails/?id=2572331007).

My DayZ modding buddy SpaceCat (https://psteamcommunity.yuanyoumao.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

Learn Modding

Want to learn how to make your own mods? Check out my guides on YouTube: https://www.youtube.com/@Zenarchist

Buy Me A Coffee / Contact Me:

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.

To contact me you can send me a message there too - I get an insane amount of messages so it's the best way for me to filter out the noise and focus on people who are willing to support my work with a coffee first:

https://buymeacoffee.com/zenarchist

Enjoy!
热门讨论 查看全部(6)
12
11 月 8 日 下午 11:38
Error on start: OnMenuRelease is protected
blumentopf
6
5 月 6 日 上午 8:29
Icon didn´t works
Feldwebel Steiner
1
9 月 24 日 上午 7:07
Classnames
TheHaluzer Official™
124 条留言
DangerRanger1702 12 月 4 日 下午 8:17 
Is there a way to install this and just wipe player data only, and not wipe out everyone's bases?
Kazzy 11 月 27 日 上午 7:26 
has there been any conflicts with namalsk survival?
ColdNhungry 11 月 19 日 下午 5:15 
Right on, thanks for the update boss!
M4ketech 11 月 16 日 下午 6:41 
Hmm when im trying to sleep i get "I feel too buzzed"... No idea what to do
samboo898 11 月 10 日 下午 3:48 
Zenarchist your a legend Mate thankyou for all your time and effort keeping your mods updated. Mod works great again Very good.
samboo898 11 月 9 日 下午 1:47 
Just wanting to know if the mod works again. Thankyou
blumentopf 11 月 8 日 上午 11:17 
Mod works again when u ran the mod seperatly before :) Thanks for the update
scary_shots 11 月 4 日 上午 1:25 
is it just me or does the sleep symbol have 2 symbols overlaping?
blumentopf 11 月 2 日 上午 5:43 
Yeah! You can sleep wherever you can lie down, even on the floor. You need to assign a key to the lie down emote. And as soon as you lie down and lay still a bit and are tired enough u will fall asleep. Unfortunately it doesn’t run at the moment due to a bug. I forked the repository and trying to fix it but need more time to figure things out.
Fun Fact 10 月 31 日 下午 5:26 
I want to add this to my server.

Can you also sleep on couches and beds in this mod?