Project Zomboid

Project Zomboid

97 ratings
Proper Vehicle Injuries for MP
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
348.384 KB
21 Jul, 2023 @ 6:09pm
31 Mar @ 10:45am
14 Change Notes ( view )

Subscribe to download
Proper Vehicle Injuries for MP

Description
Check out my other mod, ComfySleeping!


Artwork Credit
Credits to Errorthy for drawing the thumbnail!


Purpose
The name says it all! Project Zomboid does feature injuries from vehicle collisions in vanilla, however, the experience in multiplayer is extremely inconsistent. This mod aims to fix this by having each individual player determine when they were involved in a car crash and make vehicle injuries consistent for multiplayer!

I created this mod to replace the vanilla system, along with adding additional customization so you can modify the chances of certain injuries, enable or disable the chance of breaking full limbs or even death!


Latest Update
Update 3.4
  • Updated sandbox options to now do the conversion from in-game hours to time units. PLEASE REVISE YOUR SANDBOX OPTIONS, AS INJURIES WILL LAST LONGER/SHORTER THAN PREVIOUSLY

  • Fixed a few spelling/translation mistakes in the English translation.

Features
  • Working Seatbelt support: PVI is compatible with Working Seatbelt, reducing injuries if seatbelts are buckled, airbags are installed, and potentially ejecting the player out of the vehicle!

  • Real Knockouts support: Car crashes can now knock the player out. Knockout chance is configurable per severity level and overrides Real Knockouts chance for car crashes only.

  • Helmets protect your head: Does what it says on the tin! Helmets offer head protection with the highest protection helmets being full-face helmets (like motorcycle helmets), and half-face helmets (riding helmets) give a lower injury reduction.

  • Multiplayer Support: Now you can share your collision related injuries with others!

  • Varying Severity Levels: Different speeds can cause different injuries, with different times needed to heal. The faster you go, the worse it'll be!

  • Zombie Hordes: Trying to make a quick get away, and slam into a horde? Congratulations, because it's not just other vehicles and buildings that you can collide with!

  • Full Limb Fractures: Makes that broken arm just that much worse, by breaking the rest of it!

  • Fatal Crashes: Going full speed and not paying attention? Hitting a pole or other objects from full speed can very well now spell the end of your character!

  • Customizability: Not a fan of how often certain injuries happen? Nearly all of the variables for this mod are available in the sandbox options!


Planned Features
  • Minimum injuries - Currently the injury count is entirely random aside from the general body damage the player receives (this is what lowers your healthbar on collision).
  • Server & Client sync - I've had several reports of laggy conditions in MP causing issues. I'm going to try add logic to the server side to track collision severity, and only cause injuries if the client and server determined severity match to hopefully increase consistency.
  • Refresh bodyParts tables when a new player is created via Events.OnCreatePlayer instead of every time a crash happens.

If you have any other ideas that you think would be in line with the mod, feel free to add them to the "Ideas & Suggestions" discussion. These may or may not be implemented, as this mod is more meant as a small project to explore the world of modding and for me to tinker on in my spare time.


SANDBOX OPTIONS
Click here to see the sandbox options and their description/examples!

If the above link isn't working, keep scrolling and look for the pinned "Sandbox Options" discussion board.


FAQ (READ BEFORE COMMENTING)
  • Does this mod have any incompatibilities? 
Since this mod doesn't replace any Zomboid files, nor modify any of the vanilla game's code, there should not be any incompatibilities with other mods.

One thing to note however, vehicles with very high acceleration or braking power may falsely trip the collision detection, as when you speed up or stop extremely fast, it sees your high speed difference, and thinks you've crashed into something. This shouldn't be an issue for 99% of vehicles (vanilla sport's cars are not powerful enough).

  • Does this mod work in SP/Coop/Dedicated MP? 
Yes it works in all 3! It was built to work with MP, and because the code is handled client side, it should have no issue with either SP or Coop saves.

  • Is this safe to add to a current save? 
Yes it is safe to add and remove at will! All of the code in the mod is custom, meaning it doesn't need to hook in to or modify any of the vanilla game code. If the mod is enabled, you'll have the injuries, if not, then you won't!

  • I'm adding this to an existing SP save, how do I change the sandbox options mid save? 
Use a mod such as Change Sandbox Options to modify them.

KNOWN ISSUES
  • Nothing major known at the moment


Translations
PVI has translations for the following languages:
  • English - Translated by Fluffy89
  • Brazilian Portuguese - Translated by Sknurt
  • Simplified Chinese - Translated by Phoenix

Thanks to all who have provided or helped translate the mod into various languages! If there are any translation or spelling issues in any of the available translations, or you would like to translate the mod, please let me know!


MOD PERMISSIONS
[theindiestone.com]

Feel free to include the mod in modpacks/workshop collections here on Steam. You are however NOT AUTHORISED to do any of the following:
  • Redistribute OR re-upload to any platform
  • Modify Comfy Sleeping's code


MOD-ID & WORKSHOP-ID

Workshop ID: 3007922923
Mod ID: ProperVehicleInjuriesMP
Popular Discussions View All (5)
11
13 May @ 4:01pm
Simplified Chinese Translation File
Fluffy89
7
13 May @ 4:00pm
Translates
Sknurt
13
28 May @ 9:36pm
PINNED: Bugs & Issues
Fluffy89
69 Comments
Mang 21 Mar @ 11:10am 
:steamhappy:👍
Fluffy89  [author] 20 Mar @ 12:00pm 
You are very welcome Mang, if you need anything else then comment here, or if it's something more in depth don't hesitate to open a discussion post :)
Mang 20 Mar @ 10:42am 
Thanks for the detailed response
Fluffy89  [author] 15 Mar @ 6:48pm 
Mang, it depends how close to realistic you want to get, and how much liberty you want given it's a game. It's really a lot of personal preference/what experience you're going for, but here's my current config.

PVI - Main [gyazo.com]
PVI - Debug [gyazo.com]
PVI - Low [gyazo.com]
PVI - Medium [gyazo.com]
PVI - High [gyazo.com]
PVI - Fatal [gyazo.com]

For the numbers you see in these screenshots, do the following to get the injury min and max times in hours:

Scratch time = (Scratch Min or Max) * 0.934
Laceration time = (Laceration Min or Max) * 0.34
Fracture time = (Fracture Min or Max) * 1.943
Fluffy89  [author] 15 Mar @ 6:48pm 
2/2

The injury times scale really weirdly and don't heal at the same rates but over different durations. I'm uploading an update now so you just need to put the actual injury time in hours into the respective sandbox option, as writing a tooltip that makes sense for each of these was a pain.

I recommend users of PVI revisit their sandbox options and adjust their sandbox options accordingly.[/b]
Mang 15 Mar @ 12:41am 
Recommended sandbox settings for realism?
Fluffy89  [author] 25 Jan @ 10:18pm 
All White G Fazos, you're very welcome!

I did a good bit of testing, both by myself and with the help of a friend for this update. It's good to hear that PVI's working as expected, especially after a fairly large update like v3.3.

If you do run into any bugs/issues/crashes, do let me know either in a discussion thread or in a comment.
All White G Fazos 25 Jan @ 7:47pm 
Appreciate the update everything seem to be working. good work
Fluffy89  [author] 21 Jan @ 10:13am 
Equa1ity, I actually have no idea. I'm not sure how vehicles interact with players if at all in general.

I wouldn't rule it out but I won't make any guarantees. I know there is a sandbox option for this but I have no idea how well or if at all this works in MP.
Equa1ity 21 Jan @ 7:57am 
Question: what about cars colliding with other players? Is there a possibility of future release including global car injuries inside and outside of vehicle if hit?

oh snap this look awesome we are voting on adding it to our server now.