Carlzilla Posted June 11, 2016 Share Posted June 11, 2016 This adds a need for sleep to the game, and makes beds a usable object for sleeping. The mod contains a series of buffs that confer bonuses or penalties depending on how rested you are. There are 5 states: Well Rested - You receive a movement and stamina boost. Lasts 6 hours. Active after getting at least 6 hours of sleep. Normal - You receive no bonuses or penalties. Last 10 hours. Active after getting woken up after between 3 and 5 hours of sleep or after well rested wears off. There is no notification for the normal state. Tired - You incur a 20% movement penalty. Lasts 8 hours. Active if you slept for less than 6 hours and were previously exhausted, or after Normal wears off. Exhausted - You incur a 50% movement penalty and a stamina hit. Lasts 5 hours. Active after Tired wears off or you wake up from a passed out state. Passed Out - You are asleep on your feet. You incur a 100% movement penalty and a complete stamina loss. Lasts 1 hour. Upon reviving you will be in an exhausted state. You do NOT want to enter this state, you're basically a sitting duck for zombies. Different levels of beds offer different boots to your stamina, core temp, and wellness by "resting" on them. To rest on a bed simply hang out on top of one. You do not need to activate the sleep option to receive the resting bonuses. You can sleep on the beds in two different ways, first, you can hit the <use> key while looking at a bed, or second you can stand on top of the bed and hit the 5 key on your NumPad. Doing either of these will allow you to sleep. There's a chance that your sleep will be interrupted by zombies, and you'll be notified of how much sleep you received. If you got 4 hours or more of sleep, you will not be able to sleep again for 16 hours. If you were interrupted before the 4 hour mark, you may sleep again immediately after dealing with the intruding zombies. A full night's sleep fully restores your health and your stamina, gives you a .25 boost to wellness, and moves the game time ahead 8 hours. Anything less than 8 hours will give you a percentage of those boosts based on the number of hours you slept. If you aren't sure when you can sleep again, stand on top of the bed and press 6 on your NumPad this will tell you when you last woke, and when you can sleep again. If you slept through a horde night (dog horde included), the script will trigger a wandering horde upon waking just to attempt to re-add some difficulty. I know that some people are going to view the ability to sleep through feral hordes as cheating...but it's up to the player how to play, and I personally hate the idea of omniscient feral hordes. The mod is fully configurable through a small text file in the save game directory (on windows it's %appdata%\7DaysToDie\Saves\<either navesgane or random gen>\<world game name>\sleep.cfg), it will be created once the game is run once with the mod active. This file will have descriptions of each line in the file, and only the first 6 lines matter (the others are just descriptions). Here's what you can change Line 1: the 1 in X chance you will be interrupted in your sleep by zombies. 5 means it's a 1 in 5 chance Line 2: the minimum number of zombies to spawn during an interruption event. Line 3: the zero based maximum number of zombies to spawn during an interruption event. Zero based means you start counting from zero, so 4 is actually 3. Line 4: the name of the entity group (as defined in entitygroups.xml) from which to choose the interrupting zombies from. Line 5: the MAXIMUM distance from the bed in which to spawn zombies...even with this set high they can literally spawn right on top of you, and trust me, it's terrifying when it happens. Line 6: if this is 1, all the hordes the script spawns (not interrupting zombies, but the wandering hordes that replace the night hordes if you sleep through a horde night) will be feral (even in the daytime), if this is anything else, they will be normal wandering hordes. Download: https://www.mediafire.com/?cbrcfrrnrf4vxjh *** THIS MOD IS SINGLE PLAYER ONLY *** I WILL NOT HELP YOU TROUBLESHOOT MULTIPLAYER ISSUES!*** Link to comment Share on other sites More sharing options...
stallionsden Posted June 11, 2016 Share Posted June 11, 2016 You had me hooked on this until the last lines lol :'(. I am currently trying to get server up and going with sdx and would love this on mp. Are you saying it def wont work on server or you haven't tested and it could Link to comment Share on other sites More sharing options...
Carlzilla Posted June 11, 2016 Author Share Posted June 11, 2016 Because it advances time, there's no way to get this work on a MP server in the way I intended it. Otherwise every time someone slept it would throw the server forward up to 8 hours. That said, I'm not saying that it won't work, it might "work", but it would definitely be jarring to players to have the times changing constantly. I could remove that part, and leave in the sleeping buffs, which should theoretically make it work in MP, but in my opinion it would completely kill immersion to "sleep for 8 hours" and have it be the exact same time as when you went to bed... ...as a general rule, I write for single player, because it's what I play. If the things I write work on multiplayer, that's great, and I'm happy they do, but unless specifically requested, I don't really consider whether or not it's going to work on MP servers or not. Link to comment Share on other sites More sharing options...
stallionsden Posted June 11, 2016 Share Posted June 11, 2016 Because it advances time, there's no way to get this work on a MP server in the way I intended it. Otherwise every time someone slept it would throw the server forward up to 8 hours. That said, I'm not saying that it won't work, it might "work", but it would definitely be jarring to players to have the times changing constantly. I could remove that part, and leave in the sleeping buffs, which should theoretically make it work in MP, but in my opinion it would completely kill immersion to "sleep for 8 hours" and have it be the exact same time as when you went to bed... ...as a general rule, I write for single player, because it's what I play. If the things I write work on multiplayer, that's great, and I'm happy they do, but unless specifically requested, I don't really consider whether or not it's going to work on MP servers or not. Oh i wasnt having a go at you this is a great mod :-). and yes I understand bout the mp and throwing everything out makes full sense. Link to comment Share on other sites More sharing options...
Carlzilla Posted June 12, 2016 Author Share Posted June 12, 2016 Nah, didn't assume you were having a go. I just figured I'd state it in the open that I mostly do modding for single player. Link to comment Share on other sites More sharing options...
Carlzilla Posted July 9, 2016 Author Share Posted July 9, 2016 Updated to fix a potential bug that happened sometimes when you deleted a save game. Link is in the first post. Link to comment Share on other sites More sharing options...
GARRthePIRATE Posted July 29, 2016 Share Posted July 29, 2016 Not sure why, but this one is not compatible with my set up like your old one was... this one gives me a chunck error on loading game. The only thing I notice different in the XML is an additional block, buffs, and XUi. Link to comment Share on other sites More sharing options...
Carlzilla Posted July 29, 2016 Author Share Posted July 29, 2016 Strange. What error is it throwing? Link to comment Share on other sites More sharing options...
GARRthePIRATE Posted July 30, 2016 Share Posted July 30, 2016 [ATTACH=CONFIG]15680[/ATTACH] Honestly, I'm just surpirsed this one is causing trouble for me an the Link to comment Share on other sites More sharing options...
Carlzilla Posted July 30, 2016 Author Share Posted July 30, 2016 Invalid attachment. Link to comment Share on other sites More sharing options...
GARRthePIRATE Posted July 30, 2016 Share Posted July 30, 2016 ERR Exception in thread_GenerateChunks: NullReferenceException: Object reference not set to an instance of an object Link to comment Share on other sites More sharing options...
Carlzilla Posted July 30, 2016 Author Share Posted July 30, 2016 Can you post your output_log.txt to pastebin.com? More information is needed before I can debug. Link to comment Share on other sites More sharing options...
GARRthePIRATE Posted July 31, 2016 Share Posted July 31, 2016 So, I tried adding the mod one more time to get the log with the error. and it WORKED! Must have been user error thanks for your willingness and another great mod! Now. Time to check out your auto-containers!! XD Link to comment Share on other sites More sharing options...
Carlzilla Posted July 31, 2016 Author Share Posted July 31, 2016 Glad to hear it. Link to comment Share on other sites More sharing options...
teoleo Posted January 5, 2017 Share Posted January 5, 2017 work with new version? I have a error when compile with new tool Link to comment Share on other sites More sharing options...
Carlzilla Posted January 7, 2017 Author Share Posted January 7, 2017 work with new version? I have a error when compile with new tool Use the version found in this thread instead: https://7daystodie.com/forums/showthread.php?57523-Carlzilla-s-SDX-Mods Link to comment Share on other sites More sharing options...
teoleo Posted January 7, 2017 Share Posted January 7, 2017 Use the version found in this thread instead: https://7daystodie.com/forums/showthread.php?57523-Carlzilla-s-SDX-Mods the link is borken...download another mod... duffel bags ( have the same link) Link to comment Share on other sites More sharing options...
Carlzilla Posted January 7, 2017 Author Share Posted January 7, 2017 Fixed. Link to comment Share on other sites More sharing options...
tjmi3y Posted November 10, 2017 Share Posted November 10, 2017 How to install this?...thanx Link to comment Share on other sites More sharing options...
Carlzilla Posted December 5, 2017 Author Share Posted December 5, 2017 You don't. It's been outdated for a while now...and I'm too busy to update. Link to comment Share on other sites More sharing options...
JC LEON Posted February 10, 2019 Share Posted February 10, 2019 Hi. i used your great mod in A16 and it worked fine to me.. but in A17 it doesnt compile with sdx tool 0.7.3.. can you try to help me or do you plan and update version of the mod for a17? thanks in advance Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.