Project Zomboid

Project Zomboid

Realistic Injury Healing
 This topic has been pinned, so it's probably important
Yummy  [developer] 21 Oct, 2024 @ 12:30pm
Dynamic Influence on healing
Let's start with the fact that each wound has its own general healing time and its own healing rate. I used the settings ("Severe Injuries" and the "Long Healing" trait), here are the healing values ​​for each injury type per 1 in-game minute:

Normal fracture: 0.0006
Fracture with splint: 0.0030
Fracture with comfrey: 0.0012
Fracture with splint and comfrey: 0.0036

Open burn: 0.0006
Bandaged burn: 0.012

Open laceration: 0.00012
Bandaged laceration: 0.006

Open bite: 0.0006
Bandaged bite: 0.012

At first aid level 10:
Fracture with splint: 0.0330 (11 times faster, + 0.0030 per first aid level)

In this mod There are currently several dynamic effects on healing speed, here are the values ​​for each:

1. Moodles (the value is applied once per game minute):
the values ​​in brackets mean each level of this moodle, for example:

{ type = MoodleType.FoodEaten, effects = { 0.0012, 0.0024, 0.0036, 0.0048 } }, -- Saturation

1 level of saturation = +0.0012 to healing speed per 1 game minute
2 level of saturation = +0.0024 to healing speed per 1 game minute

{ type = MoodleType.Hungry, effects = { -0.0010, -0.0020, -0.0030, -0.0040 } }, -- Hunger

1 level of hunger = -0.0010 to healing speed per 1 game minute minute
2 hunger level = -0.0020 to healing rate per 1 game minute

here are all the moodles that affect:

{ type = MoodleType.FoodEaten, effects = { 0.0012, 0.0024, 0.0036, 0.0048 } }, -- Saturation
{ type = MoodleType.Hungry, effects = { -0.0010, -0.0020, -0.0030, -0.0040 } }, -- Hunger
{ type = MoodleType.Tired, effects = { -0.0012, -0.0024, -0.0048, -0.0060 } }, -- Tiredness
{ type = MoodleType.Injured, effects = { -0.0010, -0.0020, -0.0030, -0.0040 } }, -- General health { type = MoodleType.Thirst, effects = { -0.0003, -0.0006, -0.0012, -0.0024 } }, -- Thirst { type = MoodleType.Sick, effects = { -0.0003, -0.0006, -0.0012, -0.0024 } }, -- Sickness { type = MoodleType.Stress, effects = { -0.0001, -0.0003, -0.0006, -0.0010 } }, -- Stress { type = MoodleType.Hyperthermia, effects = { -0.0003, -0.0006, -0.0012, -0.0020 } }, -- Hyperthermia { type = MoodleType.Hypothermia, effects = { -0.0003, -0.0006, -0.0012, -0.0020 } }, -- Hypothermia { type = MoodleType.Bleeding, effects = { -0.0010, -0.0020, -0.0030, -0.0040 } }, -- { type = MoodleType.Wet, effects = { -0.0002, -0.0004, -0.0008, -0.0012 } }, -- Wet { type = MoodleType.HasACold, effects = { -0.0004, -0.0008, -0.0012, -0.0016 } }, -- Cold 2. Treatment of wounds (the value is applied once per game minute)

Depending on the type of bandage you use to treat the wound, the healing speed changes:

Dirty Bandage = -0.0020
AlcoholRippedSheets = +0.0005,
Bandage = +0.0015,
Bandaid = +0.0012,
AlcoholBandage = +0.0020,

There are only 2 bandage effects for a fracture:

Dirty Bandage = +0.0005
Other Bandages = +0.0010

3. Activity (the value is applied once per game minute)

This is where it gets a little more complicated. Activity contains 2 types:
1. Weapon strikes, weapon shots (Applied for each strike with a weapon weighing more than 2 kg or when shooting)
2. Running, sprinting, sleeping, sitting on the ground

Each type has its own expression, in which the value is multiplied by the influence of the body part and the wound for which it is applied:

local bodyTypeValue = { Arm = 0.0005, Body = 0.0010, Leg = 0.0010 }

local activityMultipliers = {
stand = { Arm = 1, Body = 1, Leg = 1 },
sit = { Arm = 2, Body = 1.5, Leg = 2 },
sleep = { Arm = 3, Body = 2.5, Leg = 3 },
run = { Arm = -2, Body = -2, Leg = -3 },
sprint = { Arm = -4, Body = -4, Leg = -6 },
weaponHit = { Arm = -1, Body = -1.5, Leg = -2 }
}

local injuryMultipliers = { -- Injury multipliers
Fracture = { activityMultiplier = 1.5 },
Burn = { activityMultiplier = 1.0 },
Scratch = { activityMultiplier = 0.5 },
Cut = { activityMultiplier = 1.0 },
Bite = { activityMultiplier = 2.0 },
}

then these values ​​are added together

All the resulting values ​​above are finally multiplied by the value of each injury:

local injuryMultipliers = { -- Injury multipliers
Fracture = { effectMultiplier = 5 },
Burn = { effectMultiplier = 2 },
Scratch = { effectMultiplier = 3 },
Cut = { effectMultiplier = 1 },
Bite = { effectMultiplier = 2 },
}

I hope I managed to explain it clearly
< >
Showing 1-4 of 4 comments
Can you confirm what the sandbox config initial and limit multipliers do? I actually want to use your mod to greatly shorten healing time for long-dayed multiplayer servers. Can I set those to 0.1 to make healing 10x faster?
Yummy  [developer] 21 Feb @ 2:37pm 
Initial multiplier: Sets the initial healing time, for example with a multiplier of 1 the initial healing time of a fracture would be say 7 days with a multiplier of 2: 14 days, the lower the multiplier the shorter the initial injury time.

Limit multiplier: Some conditions negatively affect the healing rate. Limit multiplier sets how much the injury can "roll back in healing". For example, a fracture heals in 7 days. If you do not maintain a positive condition, then with a multiplier of 1 the maximum healing time will be 7 days, with a multiplier of 2: the injury can "roll back" in healing up to 14 days, and so on.

You also need to consider dynamic influence. If you enable dynamic influence, even if you set the healing time to minimum, it can still take a significant amount of time if you have bad healing conditions.

About deep wounds: the deep wound tracking system works differently from other types of wounds. It tracks the wound only when it is open. If the wound is stitched, it disappears, and instead it gets the "Stitched" status. For this reason, I disabled the influence on the deep wound
Last edited by Yummy; 21 Feb @ 2:37pm
Thanks Yummy! I set my multipliers to 0.5 (and 0.2 for burn). It seems to work well for 2 hour days in MP.

For dynamic influence... if they keep their bandages on and clean the wounds, this shouldn't slow down their healing, right? I like that challenge if so.
Yummy  [developer] 5 Mar @ 6:42pm 
The whole idea of ​​the mod was to make the effect of the character's condition on healing noticeable. Thanks for the comment
< >
Showing 1-4 of 4 comments
Per page: 1530 50