Project Zomboid

Project Zomboid

Dynamic Traits and Expanded Moodles [B41 & B42]
NavySeal 1 Sep, 2023 @ 3:07pm
Sickness from infected wounds inconsistent
During my play i noticed that only a "laceration" wound which is infected causes food sickness to randomly rise. is it intended that no other infected wound type has this effect? And yes i am talking only about wound infection and food sickness, not zombification.

To reproduce this, simply launch the game in debug mode
Add 1 or more lacerations to the player, infect them, and bandage them
Now fast forward time, you will see that withint a day you will get a fever and die
Now try the same with just scratches or bite ( make sure to turn off infection in sandbox) and you will see that no sickness will ever appear

On a last note, is this feature mentioned anywhere? Couldnt find any mention of this, but maybe i am just blind
Last edited by NavySeal; 1 Sep, 2023 @ 3:14pm
< >
Showing 1-7 of 7 comments
PepperCat  [developer] 1 Sep, 2023 @ 7:41pm 
The intention is to have all of them to generate the sickness, actually the code is there. But for some reason I'm not being able to make it work for scratches and deep wounds. My code checks for infection level and if higher than 0, then chances of sickness are added. Not really sure if the game is not handling the sickness level for other wounds different than lacerations. That's a pending point I need to review. But it should be for all of them to be honest.
NavySeal 2 Sep, 2023 @ 9:19pm 
This left me kinda annoyed so i checked the code and found the following:
BodyDamage:isScratched() and isWounded() are only true if the wounds are untreated (no bandage/stitch) thats why the code never entered the conditions.

Solutions is to change the conditions
bodyPart:getScratchTime() > 0
for scratches
bodyPart:getDeepWoundTime() > 0 or bodyPart:getStitchTime() > 0
for deep wounds
with those conditions the code for the sickness is ran correctly regardless of the how the wound is treated

If the source is on any git repo, please send me the link and i would go ahead and make a PR with the fixes

On a last note some additonal feedback:
I think the amount a player's sickness gets increased by this method needs to consider the wound severity more. As in, if a wound just got infected this should have considerably less impact on sickness than a wound which has been left infected for a day or more. This way at least the first night could be survivable if the infections are super fresh. This already happened twice to me before i found out about this entire feature, got 2 lacerations. I bandaged them, took sleep pills and went to bed, woke up a couple hours later with a fever and about 5% hp left, and died shortyl after. And all this from infections that were less than half a day old

Another feedback part would be to invert the order of the statements, so to check for deep wounds first, and scratches last, this would be for the case that a player has a scratch and a deep wound on the same part. If such a bodypart would get infected with the current order of the conditions, only the severity of the scratch would apply, but never the deep wound

Lastly, how about adding Bites (for players like me who play without infection) to the list of infected injuries that increase sickness? Currently they are not counted, as they are a different kind of injury

Again, if there is a git repo you could point me too, i would create pull requests for each of the feedback points
Last edited by NavySeal; 2 Sep, 2023 @ 9:20pm
PepperCat  [developer] 14 Sep, 2023 @ 5:28am 
Hello!! thank you a lot for this! I think that this weekend I will have enough time to do the changes and push them to Steam.
Again, thank you for taking the time to fix it!
PepperCat  [developer] 14 Sep, 2023 @ 5:30am 
About the order, completely agree. Will switch the order. And related to the wound severity again, agree! It makes completely sense all you mentioned so will work on those changes if I can tomorrow friday or saturday!
PepperCat  [developer] 20 Sep, 2023 @ 10:16am 
Code changes were done, took almost all of your feedback and a couple improvements more. So update will come really soon :)
GageTM 14 Oct, 2023 @ 10:08am 
hey kind of having the same problem. I got a minor scratch on my foot in my first time playing this mod. I didn't do a great job paying attention to my health bar but I washed and rebandaged my wounds 3 times before going to bed. Next thing I knew, I woke up with a fever and died. I have infection turned off, so I knew I didn't get a zombification virus unless that is a bug with my game settings. Not sure what is happening here, but I feel I shouldn't die if I do an okay job fixing a scratch on my foot. I can't play this mod because of this reason, even though this mod looks super cool. What I'd like to know is if this is a bug or if it is intended, as I feel I did everything right.
Arman3 14 Oct, 2023 @ 12:53pm 
the error is to more fast, i have a laceration, infection and one two late i dead for the fever :steamsad:
< >
Showing 1-7 of 7 comments
Per page: 1530 50