Defecation v1.11
2 2

21 posts in this topic

Recommended Posts

Posted (edited)

xnjXTRN.png

 

I always thought there should be some minor needs management in Project Zomboid. This mod adds required defecation to the game, implemented similarly to the need of smoking cigarettes.

 

Features

 

  • GUI
  • Get the poop scared out of you
  • Diarrhea
  • Multiple sounds with their own noise radiuses
  • Lucky/Unlucky compensations
  • Rebindable hot-key
  • Feces can be used as compost or fuel in a fire

 

Download

 

Steam Workshop Link: https://steamcommunity.com/sharedfiles/filedetails/?id=1436878551

 

Source Files - The main file (defecation.lua) is lightly commented: Defecation_v111.rar
Feel free to edit this for private distribution, but if you wish to upload it publicly you will need to ask for permission.

 

Changelog

 

v1.11

-Added comic book to list of usable TP.
-Fixed player being able to sit at 100% with no negatives if they do not get panicked, they will now have a chance to defecate themselves if they're above 95%, or 85% and sick.
-Fixed defecating pants as female adding skirt and defecating skirt as male adding pants.

 

v1.1

- Added ability to use toilet by right clicking it. Player will not be required to have any toilet paper, the toilet must have 10 units of water (equal to a full water bottle), and the toilet will be flushed automatically meaning the player will lose their feces and the toilet will make a loud noise.
- Added flies sound if there are multiple piles of poop in the same area as well as unhappyness and a small amount of nausea.
- Added missing defecated skirt.
- Added magazine and newspaper to available toilet paper list, they will still decrease your stress and boredom as they should. Also added tissue.
- Added a small amount of fatigue if you defecate without a toilet.
- Added iron gut/weak stomach modifiers.
- Updated defecate button to let player know what TP they're about to use.
- Cleaned up and fixed some drunkery in my code. (Why did you do this past self?)

 

 

How to Use

 

CMCiDrm.png

To open the GUI press the , (comma) key on your keyboard by default. The GUI was designed to be updated in real time, so it can be left open, or you can open it periodically to check the status. This keybind can be changed in your key bindings under 'Defecation Status'.

If you are above 66.66% you will see the 'DEFECATE' button and become stressed.

If you have the required materials in your inventory, you will be able to click the defecate button.

Clicking the defecate button will start the process, it will be one short timer for pulling down your pants and another longer timer for actually defecating.

You will always defecate on the ground.

As of version 1.1 you can alternatively defecate using a toilet. This will require 10 units of water (in the toilet), you will flush your feces, and the toilet will make a loud noise.

 

jHpoj30.png

Drinking dirty water or eating raw or rotten food can give you the possibility of getting diarrhea. If you have diarrhea you will see the upset stomach icon and you will need to defecate up to 4x quicker than usual. You can find 'Anti-Diarrheal Pills' in medical stores or bathrooms and these will calm your stomach, but they will not cure you. You will only be cured when your body no longer has contaminants (dirty water, bad food) in it.

 

uBr7Lkp.png HxAG2lN.png

If you are under the influence of anti-diarrheal pills, the upset stomach icon will be green rather than red for 3 hours, up to 6 hours maximum.

 

TjOVWSL.png

If you are panicked, and over 80% (or 70%, if you have diarrhea) you have the possibility to poop yourself. This will upset your character and destroy your current pants, continuing to wear them will further upset your character so they should be burned.

 

Standing near piles of feces will slowly make your character unhappy as well making them nauseated. You will hear a 'flies' sound.

 

Details

 

Spoiler

 

Your character's defecation status will fill to 66% over 24 hours if they are between the food levels of peckish-satiated and they are not sick with diarrhea. You will start to become stressed at 66%.

If you are hungry, very hungry, or starving, this decreases to 75%, 50%, and 25% respectively. If you are well fed, stuffed, or full to bursting, the levels increase to 200%, 300%, and 400%.

 

If you eat or drink bad water or food, you can get sick with diarrhea, this is a 16.66%-25% chance, depending if you have lucky or unlucky traits. If you are sick with diarrhea, your percentage is increased by a further value, depending on your current poisoned level up to 400%, every ten minutes.

Once your body is no longer poisoned (from bad water or food), you will have a 25%-50% chance to recover, every ten minutes.

 

Anti-Diarrheal pills last 3 hours each, up to 6 hours maximum. So eating 4 pills will only give you 6 hours of effect.

 

There are 6 different sounds ranging from a radius of 5 tiles to 15 tiles. If you are 'Lucky', you will never make the loudest noise, if you are 'Unlucky', you will never have the possibility to defecate silently.

 

Standing near 4 or more piles of feces will cause your player to get nauseated and unhappy, this is multiplied times the amount of feces nearby, starting at a minimum of 4x.

 

 

Credits

 

The 'human feces' sprite comes from Hydrocraft and is used with permission from the creator, Hydromancerx.

The anti-diarrheal pill and box sprites are recolored and they also come from Hydrocraft with permission from the creator, Man_In_The_Purple_Hat.

 

Permission

MODS_03.png

Edited by nater

Share this post


Link to post
Share on other sites

I've seen a lot of mods for PZ, but this has to be the crappiest one ever.

 

Nice idea.

 

Downloaded and I'll give it a go on my next play through.

Share this post


Link to post
Share on other sites

All jokes aside, I'm actually really very happy someone has made a mod like this.

I have a couple of questions though..

Is there any way to integrate this with a Toilet object? Perhaps would not need/use less toilet paper (or some other effect that makes it more convenient than using it anywhere else)

Do you have plans on other hygiene mods? I see (and agree) that you're not doing a urination version - but what about general hygiene, requiring the player to bathe/shower?

 

Share this post


Link to post
Share on other sites
Posted (edited)
7 hours ago, Bejasc said:

All jokes aside, I'm actually really very happy someone has made a mod like this.

I have a couple of questions though..

Is there any way to integrate this with a Toilet object? Perhaps would not need/use less toilet paper (or some other effect that makes it more convenient than using it anywhere else)

Do you have plans on other hygiene mods? I see (and agree) that you're not doing a urination version - but what about general hygiene, requiring the player to bathe/shower?

 

 

Thank you for the suggestion. I didn't want to make the game easier at all, as there are quite a lot of ways to get happy already. I also had some weird issues detecting if the player was near a toilet, so the idea got scrapped. I'll do some further experiments and see if I can figure out a good solution, though.

 

I am currently in the 'concept' phase for another mod, so I do not currently have any plans for bathing/showering, but I may start experimenting with this in the future.

Edited by nater

Share this post


Link to post
Share on other sites
13 hours ago, nater said:

 

Thank you for the suggestion. I didn't want to make the game easier at all, as there are quite a lot of ways to get happy already. I also had some weird issues detecting if the player was near a toilet, so the idea got scrapped. I'll do some further experiments and see if I can figure out a good solution, though.

 

I am currently in the 'concept' phase for another mod, so I do not currently have any plans for bathing/showering, but I may start experimenting with this in the future.

 

No worries! I agree the game can be made easy enough. I wasn't suggesting toilets make you happy, just add some extra convenience to needing to use this - perhaps not needing ripped sheets or TP, etc.

 

As for experimenting to detect player near the tile - I know @Soul Filcher (in Discord) has been poking around a lot in the code recently and has done some pretty great things, that were previously not done by a lot of modders. Perhaps he might have some ideas on detecting your range to the toilet tile? 

To clarify, I think it should be used like a Sink is for drink (Right click > drink) - only it would be Right Click > Use (when your defecation level is >66.6%).

 

The larger hygiene mod would make things come pretty much full circle for me. I've been longing for that sort of mod for so long. 

With this quality/style of work on this mod, I'm excited for your next project. Do you have any details you could share?

Share this post


Link to post
Share on other sites
Posted (edited)
On 7/11/2018 at 11:06 PM, Bejasc said:

 

No worries! I agree the game can be made easy enough. I wasn't suggesting toilets make you happy, just add some extra convenience to needing to use this - perhaps not needing ripped sheets or TP, etc.

 

As for experimenting to detect player near the tile - I know @Soul Filcher (in Discord) has been poking around a lot in the code recently and has done some pretty great things, that were previously not done by a lot of modders. Perhaps he might have some ideas on detecting your range to the toilet tile? 

To clarify, I think it should be used like a Sink is for drink (Right click > drink) - only it would be Right Click > Use (when your defecation level is >66.6%).

 

The larger hygiene mod would make things come pretty much full circle for me. I've been longing for that sort of mod for so long. 

With this quality/style of work on this mod, I'm excited for your next project. Do you have any details you could share?

 

I was able to get this working last night with the help of the 'Lua code snippets' thread, specifically the 'World objects' section, I was going about it all wrong before. You will not need any kind of TP (we'll pretend all the toilets are bidets), there must be water, and it will make a flush sound that is equal to the loudest fart (15 tiles, and this will attract zombies that are outside.)

 

I am still working on a suggestion that came from the Steam workshop, and that is to make piles of feces act similar to piles of zombies with the 'flies' sound, and making the player depressed. I may need to implement a custom sound though, because the flies sound is in one of the '.bank' files, which is a proprietary archive created by IndieStone, and is unable to be extracted from. After I get these features wrapped up, I will release an update.

 

I would love to talk about my next mod, but it's a feature that has been suggested many times so I do not want to get anyone's hopes up, until I can be sure I can implement it in a good way.

Edited by nater

Share this post


Link to post
Share on other sites

Good to hear you managed to get toilets working. I was about to post and offer my help if needed. The idea of making a mod to use showers and other hygiene methods crossed my mind, but I have so much to do in my current mods that I don't know if I'll ever start that one.

Share this post


Link to post
Share on other sites

So the next logical step for progression of this mod is Diet...

 

Like, what if *ALL* you eat is Peanut butter hmmm ??

Sure it's got nutritional value and good shelf life, but there are consequences.

Share this post


Link to post
Share on other sites
6 hours ago, Arsenal26 said:

So the next logical step for progression of this mod is Diet...

 

Like, what if *ALL* you eat is Peanut butter hmmm ??

Sure it's got nutritional value and good shelf life, but there are consequences.

 

I thought about doing this, it is easy enough to get a player's carbohydrates, proteins, and lipids, but I couldn't decide on what kind of formula or values to set on, so I just went with a daily timer that is influenced heavily by variables.

Share this post


Link to post
Share on other sites

Thanks for this Nater, it's definitively a worth addition. I'm always in favor for more "simulation" or "realism" in games like this.

 

A few questions/suggestions though.

I don't know how hard it is but have you thought about making it a moodlet (could even re-use the vanilla "hungry" one) that simple says "need to go to the toilet" with variations such as "slight need, somewhat urgent need and urgent need?" It would be a bit more realistic than knowing exactly how much you are ready to go, solves the "need" to add urinating and removes the need to sometimes check a separate window. Seamless integration of a new necessity. Could do the same with diarrhea, but you could just rename it to "food poisoning" to make it more generic. Could start with "queasy", progress to "nauseous" and end up with the "food poisoning" moodlet. It would add a bit to the tension, not knowing what you have for a while.

 

Second thing, I do agree with Bejasc and being able to interact with bathrooms instead of them being a dead zone in your house would be nice. Maybe possible other bodies of water too, such as rivers. But I think you'd still need sheets or toilet paper when using the bathroom, just less than when doing open defecation. One possibility to make things simpler would simple be to make it so toilets are recharged with TP or ripped sheets, so you don't need to haul it with you everywhere. There should be an option to defecate, in the option or toilet, without TP or anything else, but that would make you sadder and increase chances of getting food poisoning (maybe even with cooked food, if possible).

Using toilets do create a problem though, which is the huge amount of water we use for flushing. I never tried myself but I hear that, in game, if you put a rain collector directly above a sink it will work again, which is nice but for toilets a barrel would be probably good for a few flushes before it runs out.  So the suggestion would be to jury-rig a few rain collectors together in an upper floor to create an improvised water tower/water tank. I know that in a few poorer countries, and countries that have trouble with water, they build houses with plastic or ceramic water tanks in the upper floors (the attic, just below the roof tiles) that store a set amount of water and is used through the house. Usually they get refilled with a pump but since you can open them to clean them, I guess in PZ you could just leave them open. This would also make so any sink in the house would be usable, and could also be used in the "showering and personal hygiene" suggestions, which I also support.

 

For showers, as mentioned previously, I agree it would be nice if there was a need for that too. A moodle for when you are getting dirty, with sweat-inducing activities such as chopping wood, carrying a heavy-load, running long times from zombies or being drenched in zombie guts quickly filling it. The dirtiness would tick slowly otherwise so not doing much running or heavy-work, like just sitting and reading would mean you probably could get away (and would be desirable to save water) without showering for a day, probably for a few, but a week without cleaning yourself would be too much.


Maybe not using TP could increase your "dirtiness" instead of making you sad, so you'd need to shower sooner and both "mods" would fit nicely in a personal hygiene mod. High dirtiness would carry the increased risk of getting food poisoning when eating, even cooked meat, and could you make you a bit sad over time in high levels.

 

It would be nice to have water as a resource that needs to be divided between thirst and hygiene, carefully rationed. You might end up alive but during dry spells or cold months without any water to shower or using the toilet for days, further complicating the player's life and encouraging less sweaty-work (while also encouraging running only in emergency situations/with abundance of water). It certainly would be less annoying than managing electricity once it goes out (especially since you can't salt food meat and pickling vegetables destroy lids).

 

Final request: If it wouldn't be too much trouble, please, always keep a non-steam download for the mod. As a GOG owner of PZ, steam workshop only acts as a walled garden for modders beautiful creations.

Share this post


Link to post
Share on other sites
2 hours ago, zakarum said:

I don't know how hard it is but have you thought about making it a moodlet (could even re-use the vanilla "hungry" one) that simple says "need to go to the toilet" with variations such as "slight need, somewhat urgent need and urgent need?" It would be a bit more realistic than knowing exactly how much you are ready to go, solves the "need" to add urinating and removes the need to sometimes check a separate window. Seamless integration of a new necessity. Could do the same with diarrhea, but you could just rename it to "food poisoning" to make it more generic. Could start with "queasy", progress to "nauseous" and end up with the "food poisoning" moodlet. It would add a bit to the tension, not knowing what you have for a while.

This – I also thought that having a moodlet would be more appropriate. It's nice that you spend time to code the GUI, but on the other hand, it'd be more intuitive to use if you could just defecate via right click -> Defecate, similar to right click -> Walk to, but not sure how easy it is to code.

 

Secondly, I didn't check yet, but are defecated pants washable? Since we can wash dirty and bloody clothes now, a logical step would be washing defecated clothes as well. Actually, I think that re-using the "dirty"  mechanic of clothes would be sufficient as well, though it would be nice to have some more maluses from wearing defecated clothes vs simply dirty ones :)

 

Thirdly, I think that the Iron Gut and Weak Stomach would be more fitting than Lucky/Unlucky for the purpose – it would also give them more use!

 

Fourthly, it would be nice if more items could be used for wiping, including newspapers, comic books, magazines books and skill books (which would use them, though it would make more sense to be able to tear them to sheet of papers, but that's a matter for another mod), tissues (which would use them), bath and dish towels (ideally they could be defecated, but for simplicity sake it'd be enough to just use all the remaining uses out of them), socks and underwear (actually it would be nice if underwear could be won to prevent dirtying the pants, but that's another advanced feature) and clothes (which would make them defecated) – finally, it'd be nice if tall grass from hydrocraft could be used for this purpose as well. To counter the use of the items, it would be nice to have most of them (everything other than TP and tissues) take longer and maybe incur a small debuff – for example minor pain :). Also using bloody clothes would be really unwise for this purpose (I hope I don't have to explain why?)

 

Finally, in case you will plan on implementing toilets, it would be nice if using them would also rest character a little, and not using would tire a little (squatting is tiresome, one of the reason we created toilets in the first place). Also, I'd love seeing flushing as a separate action, that way when there's no water you could still use toilet and then pick the excrement manually later on when there's no water, unable to use the toilet until done so. I kinda things toilets should be usable as normal chair in regular game, but that may be scope for a different mod or feature request as well.

Share this post


Link to post
Share on other sites
Posted (edited)
6 hours ago, zakarum said:

Thanks for this Nater, it's definitively a worth addition. I'm always in favor for more "simulation" or "realism" in games like this.


A few questions/suggestions though.

  • I don't know how hard it is but have you thought about making it a moodlet...

Thank you! Unfortunately, moodlets are not moddable at this time but hopefully I can add this in the future.
 

  • Second thing, I do agree with Bejasc and being able to interact with bathrooms...

This is something I already have implemented and it will be in the next update. However, my implementation will be a bit different than what you have suggested:

1) You will be able to defecate using toilets through the right click menu
2) You will not need any kind of toilet paper
3) The toilet must have water
4) The toilet will be flushed immediately after use, meaning you do not get feces and it will make a loud noise

 

Some of this may change before I release the update, but these are the current plans.

 

  • So the suggestion would be to jury-rig a few rain collectors together in an upper floor to create an improvised water tower/water tank.

Sorry, this is pretty out of scope for this mod, so I will not be implementing this. I may take a look at hygiene in the future, but I don't have plans at the moment.

 

  • Final request: If it wouldn't be too much trouble, please, always keep a non-steam download for the mod.

No worries, I will always include a mirror as I like to let people easily study the files.

 

3 hours ago, Faalagorn said:

This – I also thought that having a moodlet would be more appropriate. It's nice that you spend time to code the GUI, but on the other hand, it'd be more intuitive to use if you could just defecate via right click -> Defecate, similar to right click -> Walk to, but not sure how easy it is to code.

 

Agreed on the subject of the moodle, hopefully I can get that added in a future update when they are moddable! Right clicking will allow you to defecate using a toilet after the next update, but I'd like to keep the rest of the stuff in the 'defecation status' window.

 

  • Secondly, I didn't check yet, but are defecated pants washable?

They are not, but this is on purpose to further penalize the player for defecating themselves. I also forgot to add the skirt and this will be coming in the next update.

 

  • Thirdly, I think that the Iron Gut and Weak Stomach would be more fitting than Lucky/Unlucky for the purpose – it would also give them more use!

I like this idea and I will do some investigating into how I should implement these traits!

 

  • Fourthly, it would be nice if more items could be used for wiping, including newspapers, comic books, magazines books and skill books...

I am further expanding the list of items that you will be able to use as toilet paper. As you can craft ripped sheets from all the clothes already, I will not be allowing clothes to be used as TP. I like the idea of making actual toilet paper and tissues the best options, I'll look into this.
 

  • Finally, in case you will plan on implementing toilets, it would be nice if using them would also rest character a little...

I like this idea as well, I will add a small amount of fatigue to defecating without a toilet. However, I'd like there to be some more negatives to using a toilet, so you will lose your feces, not allowing you to use them for compost/fire fuel.

 

Thank you both for the great suggestions!

Edited by nater
missing comma

Share this post


Link to post
Share on other sites

Thanks for the update! Yesterday when I tested the mod on sandbox, when I reached 100% defecation status, my character got a queasy moodle, but didn't crap her pants and got stuck at 100% defecation. The moodle eventually went away and I could just run around with 100% defecation status without any drawbacks. I wanted to further test it, but guess I'll test it with the updated version now :).

 

BTW, what happens when there's no water in toilet? I guess you can't use it at all then?

 

Oh and P.S. Now it finally makes sense why the magazines and newspapers are magically disappearing after reading ;). What about the comic books though (since I assume books have too hard cover and are too long to read when pooping :))?

Edited by Faalagorn

Share this post


Link to post
Share on other sites
1 hour ago, Faalagorn said:

Thanks for the update! Yesterday when I tested the mod on sandbox, when I reached 100% defecation status, my character got a queasy moodle, but didn't crap her pants and got stuck at 100% defecation. The moodle eventually went away and I could just run around with 100% defecation status without any drawbacks. I wanted to further test it, but guess I'll test it with the updated version now :).

 

BTW, what happens when there's no water in toilet? I guess you can't use it at all then?

 

Oh and P.S. Now it finally makes sense why the magazines and newspapers are magically disappearing after reading ;). What about the comic books though (since I assume books have too hard cover and are too long to read when pooping :))?

 

I actually hadn't thought of a player just letting it reach 100% and stay. I'll need to add the possibility of defecating yourself if you're above 95% or so and are not panicked.

 

If there is no, or not enough, water in a toilet you will not be able to defecate using the toilet.

 

I actually forgot about the comic book, shoot! I'll release an update today (probably) to fix these two issues.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
2 2