Project Zomboid

Project Zomboid

Proper Vehicle Injuries for MP [B41 & B42]
 This topic has been pinned, so it's probably important
Fluffy89  [developer] 22 Jul, 2023 @ 8:27am
Sandbox Options
Welcome to the sandbox options discussion! This page serves to give you more detailed descriptions of what certain sandbox options do/change.

Important Note:
I strongly recommend disabling the vanilla sandbox option 'Player Receive Damage From Crash' under the 'Vehicle' tab as it controls whether or not the vanilla system for causing car crash related injuries to the player. Leaving this option enabled can potentially cause the vanilla system to add injuries on top of PVI and cause more injuries than expected.

As of update 3.2, PVI now forces the above sandbox option to 'false' when the game or server boots. Users of the mod no longer need to toggle it off manually, but they can if they wish.

As of update 3.3, users may toggle the automatic disabling of the sandbox option 'Player Damage From Crash' in the 'PVI - Debug' sandbox options page.



PVI Main Sandbox Options
interval
Originally posted by author:
The amount of in-game ticks that must pass before PVI checks if an injury has occured. The lower the interval, the more frequent PVI checks for collision. Helps adjust how 'touchy' PVI is with collisions at all speeds.
Type of value: Integer, Default: 20


threshold
Originally posted by author:
The minimum speed difference before and after a collision the vehicle must be experience before injuries can begin occurring. Helps adjust how 'touchy' PVI is for lower speed collisions.
Type of value: Integer, Default: 30


minSpeedForInjury
Originally posted by author:
The minimum speed the vehicle must be travelling before injuries can begin occurring.
Type of value: Integer, Default: 35


flatDamagePercent
Originally posted by author:
Controls the amount of flat damage applied to the players overall health as a percentage. By default, the flat damage applied equals: speedDifference * (flatDamagePercent/100) = flatDamage.
Type of value: Integer, Default: 30


maxDamageReduction
Originally posted by author:
The maximum percentage of damage reduction a player may receive from seatbelts and airbags from Working Seatbelts. NOTE: This setting does nothing without Working Seatbelt.
Type of value: Integer, Default: 30


knockoutsEnabled
Originally posted by author:
Enables/disabled knockouts from a car crash. NOTE: This does nothing without Real Knockout.
Type of value: Boolean, Default: true


deathFromCrash
Originally posted by author:
Enables/disables the chance of high speed and fatal speed crashes causing death.
Type of value: Boolean, Default: true


traitsAffectInjuries
Originally posted by author:
Enables/disables fast/slow healer affecting injury times. When checked, fast/slow healer recover 30% faster/slower respectively.
Type of value: Boolean, Default: true


helmetsGiveProtection
Originally posted by author:
Enables/disables the reduction of severity to head injuries when either a full or half helmet is worn.
Type of value: Boolean, Default: true


fullHelmetModifier
Originally posted by author:
The percentage reduction applied to head injuries when a full helmet is worn. Full helmet examples are motorcycle helmets, football helmets, and the airforce helmet.
Type of value: Integer, Default: 60


halfHelmetModifier
Originally posted by author:
The percentage reduction applied to head injuries when a half helmet is worn. Half helmet examples include crash helmets, riding helmets, and the police motorcycle helmet.
Type of value: Integer, Default: 40






PVI - Debug Options
disableVanillaCrashDamage
Originally posted by author:
When checked, PVI forces the vanilla sandbox option 'Player Damage From Crash' to false. This is highly recommended to leave checked, as it prevents the vanilla collision system from adding injuries on top of what is dealt by PVI.
Type of value: Boolean, Default: true


forceAlignVehicleDir
Originally posted by author:
Forces the driven vehicles direction to face the same as the player while driving forward, and gets forced to be opposite of the player when in reverse. This is done because the direction of vehicles--at least in testing--didn't update their direction, causing the ejection feature from Working Seatbelts to not work properly. NOTE: Do not turn this off if using the ejection feature of Working Seatbelts, or ejections will only happen in one of 8 directions.
Type of value: Boolean, Default: true






PVI - Severity Options
Proper Vehicle Injuries has 4 severity levels: low, medium, high, and fatal. Each of these settings are applicable to each severity of collision.


For injury times, they are weird. General rule of thumb is the higher the injury time, the longer it will last. If you want it to last between a specific number of hours, use the below formulas:
Scratch time sandbox value = desired time in hours * 0.934
Cut time sandbox value = desired time in hours * 0.34
Fracture time sandbox value = desired time in hours * 1.943




upperBound
Originally posted by author:
The maximum speed limit for a collision to be considered that severity. If the upper bound of low speed collisions is 50km/h, then any collision that happens when going less than 50km/h will be considered low severity. These values should be in ascending order, where low speed upper bound < medium speed upper bound < high speed upper bound. Fatal speed collisions are anything that happen over high speeds upper bound.
Type of value: Integer, Defaults: (Low = 50), (Medium = 80). (High = 110), (Fatal > 110)


scratchTimeMin
Originally posted by author:
The minimum amount of time a scratch will take to heal.
Type of value: Integer, Defaults: (Low = 7), (Medium = 10). (High = 15), (Fatal = 25)


scratchTimeMax
Originally posted by author:
The maximum amount of time a scratch will take to heal.
Type of value: Integer, Defaults: (Low = 16), (Medium = 20). (High = 30), (Fatal = 35)


cutTimeMin
Originally posted by author:
The minimum amount of time a laceration will take to heal.
Type of value: Integer, Defaults: (Low = 10), (Medium = 15). (High = 25), (Fatal = 45)


cutTimeMax
Originally posted by author:
The maximum amount of time a laceration will take to heal.
Type of value: Integer, Defaults: (Low = 20), (Medium = 20). (High = 30), (Fatal = 55)


fractureTimeMin
Originally posted by author:
The minimum amount of time a fracture will take to heal.
Type of value: Integer, Defaults: (Low = 20), (Medium = 25). (High = 70), (Fatal = 100)


fractureTimeMax
Originally posted by author:
The maximum amount of time a fracture will take to heal.
Type of value: Integer, Defaults: (Low = 30), (Medium = 30). (High = 90), (Fatal = 140)


injuryChance
Originally posted by author:
The chance rolled for each individual injury to occur until the maximum number of injuries has been attempted. If maxInjuries is set to 3 and injuryChance is 70%, each injury will have a 70% chance of occurring.
Type of value: Integer, Defaults: (Low = 30), (Medium = 50). (High = 80), (Fatal = 100)


maxInjuries
Originally posted by author:
The maximum amount of injuries (regardless of injury type) that will occur in any singular collision.
Type of value: Integer, Defaults: (Low = 1), (Medium = 2). (High = 3), (Fatal = 4)


scratchChance
Originally posted by author:
Given an injury will occur, this is the chance that it will be a scratch.
Type of value: Integer, Defaults: (Low = 100), (Medium = 60). (High = 20), (Fatal = 5)


cutChance
Originally posted by author:
Given an injury will occur, this is the chance that it will be a laceration.
Type of value: Integer, Defaults: (Low = 0), (Medium = 25). (High = 40), (Fatal = 35)


deepWoundChance
Originally posted by author:
Given an injury will occur, this is the chance that it will be a deep wound with a scratch.
Type of value: Integer, Defaults: (Low = 0), (Medium = 15). (High = 25), (Fatal = 35)


deepGlassChance
Originally posted by author:
Given an injury will occur, this is the chance that it will be a deep wound with glass shards and a laceration.
Type of value: Integer, Defaults: (Low = 0), (Medium = 0). (High = 15), (Fatal = 25)


fractureChance
Originally posted by author:
The chance of a fracture occurring.
Type of value: Integer, Defaults: (Low = 0), (Medium = 10). (High = 40), (Fatal = 40)


fullLimbFractureChance
Originally posted by author:
The chance that an entire limb will be fractured (thigh, shin and foot for example).
Type of value: Integer, Defaults: (Low = 0), (Medium = 0). (High = 15), (Fatal = 35)

deathChance
Originally posted by author:
The chance for a character to immediately die from a collision.
Type of value: Integer, Defaults: (Low = 0), (Medium = 0). (High = 0), (Fatal = 20)


knockoutChance
Originally posted by author:
The chance that the player will be knocked out on collision. NOTE: This does nothing without REAL KNOCKOUT.
Type of value: Integer, Defaults: (Low = 0), (Medium = 10). (High = 20), (Fatal = 30)
Last edited by Fluffy89; 28 Mar, 2024 @ 1:00pm
< >
Showing 1-9 of 9 comments
Bostson 5 Sep, 2023 @ 11:10am 
minSpeedForInjury , is it in mph or kmh?
Fluffy89  [developer] 5 Sep, 2023 @ 4:51pm 
Originally posted by 4 4Ever:
minSpeedForInjury , is it in mph or kmh?

All distance/speed related sandbox options should be in metric.
nyanbinary 27 Dec, 2023 @ 5:48am 
Can zombie collision stuff be disabled? (for high zpop servers, it would be nice to customize this)
Fluffy89  [developer] 27 Dec, 2023 @ 12:11pm 
Originally posted by nyanbinary:
Can zombie collision stuff be disabled? (for high zpop servers, it would be nice to customize this)

At the current moment, no. There is no way for PVI to tell the difference between what you are colliding with, only what your inertia (how fast you stopped) is.

I can look into it, but Im not sure when this could see the light & be implemented.
how can i disable whiplash? it feels like cars are a deathtrap now unfortunately
Fluffy89  [developer] 8 Feb @ 11:31pm 
Originally posted by erm, what the sigma?:
how can i disable whiplash? it feels like cars are a deathtrap now unfortunately

By whiplash, do you mean the small amount of 'general' damage your healthbar takes? Or do you mean slamming the brakes and being injured because of that?
Originally posted by Fluffy89:
Originally posted by erm, what the sigma?:
how can i disable whiplash? it feels like cars are a deathtrap now unfortunately

By whiplash, do you mean the small amount of 'general' damage your healthbar takes? Or do you mean slamming the brakes and being injured because of that?
slamming the brakes and being injured, yeah yeah its realistic but its making driving quite a hell hole
Originally posted by Fluffy89:
Originally posted by erm, what the sigma?:
how can i disable whiplash? it feels like cars are a deathtrap now unfortunately

By whiplash, do you mean the small amount of 'general' damage your healthbar takes? Or do you mean slamming the brakes and being injured because of that?
like the general damage is absolutely insane, ill be full health and go down around a quarter due to whiplash
Fluffy89  [developer] 12 Feb @ 2:04pm 
Originally posted by erm, what the sigma?:
Originally posted by Fluffy89:

By whiplash, do you mean the small amount of 'general' damage your healthbar takes? Or do you mean slamming the brakes and being injured because of that?
like the general damage is absolutely insane, ill be full health and go down around a quarter due to whiplash

On the 'PVI - Main' sandbox option page, look for something named 'flatDamagePercent'. This is the setting that controls how much whiplash damage is applied to your general health, and is by default 30% of whatever the difference in speed pre/post collision is. Setting this to 0% will prevent all whiplash damage from happening.

Whiplash on its own shouldn't do nearly 25% of your general health unless you're going exceptionally fast and immediately stopping, 25% general health damage would be ~83km/h to 0km/h in a single game tick.

Hope this helps!
< >
Showing 1-9 of 9 comments
Per page: 1530 50