Project Zomboid

Project Zomboid

Proper Vehicle Injuries for MP
73 opmerkingen
Fluffy89  [auteur] 13 okt om 18:32 
Crazyk4250, from what I know, PZ uses metric internally, Im not sure if the speed values change depending on if the game is set to metric or imperial.

From when I was first writing the logic for crash detection, it appeared to use metric, so if you were going at 30mph, thats be about 48km/h, which is very close to the upper bound of low severity crashes by default. Its likely you were going slightly faster and actually triggered a medium severity injury, as lacerations caused by PVI are impossible at the default options.

Hope this helps!
crazyk4250 13 okt om 17:08 
I crashed into a parked car going 30 mph and got a right arm laceration. I'm just wondering how that could be possible. My friend said that maybe it was the seat belt, but upon closer inspection of a stock image of a guy with a seat belt on, that could not be possible. So then I thought: maybe the windshield broke and I got cut by glass; once again, that was not the case. Please, somebody help me understand this. I am having quite the conundrum here.
Fluffy89  [auteur] 24 aug om 23:19 
Kenobii, glad you're enjoying the mod :spiffo:
Kenobii 24 aug om 6:41 
died from braking too hard in a lamborghini 9/10
Mang 21 mrt om 11:10 
:steamhappy:👍
Fluffy89  [auteur] 20 mrt om 12:00 
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 mrt om 10:42 
Thanks for the detailed response
Fluffy89  [auteur] 15 mrt om 18:48 
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  [auteur] 15 mrt om 18:48 
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 mrt om 0:41 
Recommended sandbox settings for realism?
Fluffy89  [auteur] 25 jan om 22:18 
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 om 19:47 
Appreciate the update everything seem to be working. good work
Fluffy89  [auteur] 21 jan om 10:13 
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 om 7:57 
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.
All White G Fazos 18 jan om 7:43 
@Fluffy89 Yeah, figured it was the base damage applied on impact that Real Knockout was depending on. Noticed when crashing with your mod enabled, ive never seen my health go below 90% on the initial crash (all the injuries will cause it to go down though). Usually the base damage is always "Slight Damage" no matter how fast youre going.
Fluffy89  [auteur] 16 jan om 18:31 
All White G Fazos, I imagined, the mod author for Real Knockout is the same for Working Seatbelt and that mod is also listening for a specific damage type from vehicle collisions (the flat damage that gets applied).

I'll have to check the mods code itself to see if theres a way for me to call Real Knockout to happen, or if the mod author could implement a trigger I can call to have PVI determine when it should happen, but Real Knockout handle the knocking out part.
All White G Fazos 16 jan om 17:38 
@Fluffy89, Yea I did some testing and came to that conclusion. It looks like Real Knockout does depend on the "Player Damaged from Crash" sandbox setting. Would love for PVI, Real Knockout. and Working Seatbelts to all be compatible with each other they since are all great mods. Good work on PVI
Fluffy89  [auteur] 16 jan om 17:23 
All White G Fazos, at the moment, no. Most likely because PVI forces the vanilla crash damage system off to avoid potentially dealing double damage/injuries.

Next time I look at PVI again (it's been a hot minute) I'll look into how Real Knockout handles knockouts, and see about adding compatibility.
All White G Fazos 16 jan om 12:37 
Is this compatible with Real Knockout? Ive been crashing into everything trying to knock my character unconscious but I only get damaged from this mod
Fluffy89  [auteur] 6 dec 2023 om 15:10 
Agitatio, currently it is not. I was debating whether or not I should've in the last update but decided against it at the time.

Now that you've brought it up, I might do just that and force the option to off, since leaving it on may cause other people to get wildly different results that what they may have configured.
Agitatio 6 dec 2023 om 13:12 
Player Damaged from Crash is not forced off by this yet, right?
Arendameth 4 dec 2023 om 10:29 
Thank you! I appreciate it :)
Fluffy89  [auteur] 4 dec 2023 om 10:23 
I'll make note of that and modify my logic slightly for the seatbelt to also account for airbag protection.

Also saw you included a mention & link to PVI's workshop page, so I've come up to par and set 'Working Seatbelt' under my features section to also link to your page. Much appreciated for that btw!
Arendameth 4 dec 2023 om 10:11 
It's my pleasure!

Airbags operate in the same exact way as seatbelts, where if the airbag is to be deployed in a crash, it may apply damage reduction independently if the seatbelt is not buckled, or its effect may stack with the seatbelt if the seatbelt is buckled (seatbeltDamageReduction + airbagDamageReduction)
Fluffy89  [auteur] 4 dec 2023 om 10:03 
Thanks for letting me know!

I'll have to get a patch out to fix that, multiplication by nil might brick PVI.

I saw you implemented airbags in your latest update too, are these meant to just be an upgraded seatbelt, or what injuries & body parts to they protect?
Arendameth 4 dec 2023 om 9:59 
Both have indeed changed, they are now:

-workingSeatbelt.seatbeltDamageReduction
-workingSeatbelt.seatbeltFractureReduction
Fluffy89  [auteur] 4 dec 2023 om 9:52 
Hi Arendameth!

Appreciate the heads up, the only two sandbox options I'm hooking onto/looking for are:
- workingSeatbelt.damageReduction
- workingSeatbelt.fractureReduction

Have these changed, and if so, what to?
Arendameth 4 dec 2023 om 9:19 
Hello! I am the author of Working Seatbelt mod. I noticed that you've implemented compatibility with my mod thanks to a comment on my mod's page (really appreciate it!!)

I just wanted to notify you that I've just released a major update in the mod, with some names of SandboxVars being changed, in case your mod utilizes said SandboxVars!
Fluffy89  [auteur] 1 dec 2023 om 17:57 
Maxwell, there does seem to have been a minor oversight on my end with the last update, but seatbelts do appear to be functioning correctly.

The logic was determining the injuryTime for each injury by:

injuryTime = injuryTime * seatbeltDamageReduction

instead of:

injuryTime = injuryTime * (1 - seatbeltDamageReduction)

Which would, if you have an injury time of 10 and a damage reduction of 40%, reduce the injury time to 4 (a 60% reduction) instead of to 6 (the 40% reduction the sandbox options specify).
Fluffy89  [auteur] 1 dec 2023 om 17:57 
I also was reducing non-fracture injuries to the body by the fracture damage reduction, and reducing fractures by the general damage reduction.

Maybe this was what you were experiencing? It could also have been that PVI rolls the injuryChance for each individual injury, so you might just be getting lucky in testing, hence why some collisions are really bad, and some cause few injuries.

Just to clarify as well, the seatbelts help by reducing the severity of the injury, meaning the time it will last, it doesn't actually 'downgrade' the injury itself.

Let me know if this helps clarify/solve anything, if not, more detail on what you mean by the damage being reversed would be much appreciated.
Maxwell Wolfington The Wolf 1 dec 2023 om 16:27 
I noticed that with this Mod, Proper Vehicle Injuries for MP mod and the Working Seatbelts mod enabled at the same time the seatbelt damage is reversed, with the seat belt off you basically don't get hurt and with it on it basically kills you. is this fixable?
Fluffy89  [auteur] 27 nov 2023 om 8:01 
Changed that link, I use the one by star, and I thought that was the one I linked but apparently not.

Should be updated!
Agitatio 27 nov 2023 om 7:27 
By the way, Change Sandbox Options (by Star) is a better option when it comes to changing sandbox options in an ongoing save.
Fluffy89  [auteur] 25 nov 2023 om 13:15 
Agitatio, I was planning one for a while, been wanting to look into implementing seatbelts and someone came out with Working Seatbelts before I made an addon for PVI.

Ended up settling in the middle and just adding compatibility for Working Seatbelts, among a few other things.

If theres any issues with the new update, do let me know!
Agitatio 25 nov 2023 om 13:06 
Well, wasn't expecting to see an update so soon.
Fluffy89  [auteur] 21 nov 2023 om 12:15 
Agitatio, it might be. I havent experienced the 'cars start flying' bug in a long while so I have no clue how something that janky could interact with PVI, but other than that PVI should be ok.

And thanks for downloading my mod :)
Agitatio 21 nov 2023 om 11:34 
Having death enabled by default is crazy, haha. Especially knowing how janky MP can get. Good thing it's configurable. Anyway, cool mod. Looking forward to seatbelts that work with it.
Fluffy89  [auteur] 2 nov 2023 om 11:04 
Matchutchuc, I would assume it does not, as PVI has it's own system for dealing out injuries, as opposed to hooking on top of the vanilla collision injury system as it's very inconsistent in MP. A patch for Working Seatbelts should be fairly easy to add, as I've had to add a patch to my other mod for Scrap Armor, and it seems to have gone pretty smoothly.

I've been wanting to add both seatbelts, helmets, and damage on top of injuries for a while, just never had the time to look into implementing TimedActions. I'll aim for the next update to PVI (which should be relatively soon as I'm going on break from uni) to include support for helmets reducing head injuries, a Working Seatbelt patch, and a flat amount of damage on top of injuries.
Matchutchuc 2 nov 2023 om 10:34 
Does Working Seatbelt work with this mod? If not, could it be possible to make a patch?
Fluffy89  [auteur] 27 sep 2023 om 19:23 
You're welcome balance!

One thing I'll note though, is I'm not entirely sure how the game handles knowing what the vehicles speed is. This is to say, if you experience rubberbanding while in a vehicle, the mod might be a bit janky with handing out injuries, but that's a whole seperate issue out of this mods control.
Balance 27 sep 2023 om 10:55 
Perfect, thank you for the prompt response! Also thank you for the mod, it's truly a god-send, co-op causes some wacky situations at time loading assets which make a random death to slamming into a late spawned car no fun at all. But with the mod option to remove fatality I can finally re-implement vehicle injuries. Immersion and balance restored, beautiful work.
Fluffy89  [auteur] 27 sep 2023 om 10:41 
Balance, it's not an explicit requirement, the mod will function regardless if the vanilla vehicle injury setting is enabled or disabled, but injuries can stack if it's enabled.

The issue arrises when vanilla decides to give you injuries on top of what PVIMP will cause, stacking injuries. Vanilla collisions also add flat damage on top of causing scratches/lacerations/fractures/etc.

I recommend you disable it (I might try forcing it off in a future update instead of relying on the player doing so) as I intend on also adding this flat damage mechanic to make collisions have a bit more 'oomf' on the initial impact.
Balance 27 sep 2023 om 6:52 
Sorry if this is a dumb question or has already answered and my brain just ignored it reading the desc., do you need to enable/disable the vanilla vehicle injury setting or does this over-ride and implement collision injuries regardless of vanilla sandbox settings?
Fluffy89  [auteur] 2 sep 2023 om 10:18 
Appreciate it EastDawn!
EastDawn 2 sep 2023 om 2:51 
Great, I need this kind of mod to train my first aid skill instead of punching a glass window of a car or a house :steamthumbsup:
Fragrant Butthole 30 aug 2023 om 14:49 
Thanks
Fluffy89  [auteur] 30 aug 2023 om 14:21 
Kudoku, the patch has been shipped and it should be fixed!
Fluffy89  [auteur] 30 aug 2023 om 14:04 
Kudoku, I thought I removed those when I sent the mod out for its workshop release, but it seems like I forgot to comment them out!

I'll push a patch right now to fix that, thanks for bringing it to my attention!
Fragrant Butthole 30 aug 2023 om 12:48 
How can I remove the notification?
Fluffy89  [auteur] 31 jul 2023 om 23:19 
Appreciate it!