Project Zomboid

Project Zomboid

Proper Vehicle Injuries for MP [B41 & B42]
111 Comments
Fluffy89  [author] 21 Jun @ 7:36am 
Kagrine, as far as I know, it works in B42 *as of right now*. I'm not on B42 yet as things are still being updated and B42 is still on the unstable branch of things, but if PVI works in singleplayer, it *should* work the same in multiplayer. Whether that assumltion is true or not though, we'll only know when mp drops.
Kagarine 20 Jun @ 10:04pm 
I'm genuinely curious to how we know this functions on B42 while MP isn't even out yet x))
Fluffy89  [author] 15 Apr @ 7:28am 
(And yes, thats the issue that was patched)
Fluffy89  [author] 15 Apr @ 7:28am 
Marshmallow justice, you're welcome! :spiffo:

I was actually playing the other night since my term at uni just ended, so I had a bit of time, knew how to fix it, so figured I'd push out that update. Glad its working well and not erroring out anymore!
marshmallow justice 15 Apr @ 2:23am 
(the interaction between PVI and motorcycles w/no airbags causing the stack trace that is I assume) I'd gotten just completely used to it and my brain started to ignore the error in my B41 world after we discussed it before XD
marshmallow justice 15 Apr @ 2:22am 
Thank you for fixing that motorcycle airbag bug!
Fluffy89  [author] 25 Mar @ 9:39am 
Anothername, its more or less 'whats the difference in your current speed, and when PVI last checked', then if you're going fast enough and slow down hard enough, you get injuries based on that speed difference.

BB's bicycle redux is safe to use, I haven't gotten a single injury from crashing while riding a bike. I don't think thry're able to go faster than PVI's default minimum speed for injuries.
Anothername 25 Mar @ 3:12am 
Not exactly sure how the math is done for injuries, but are Braven's Bicycles safe to use alongside this? Wouldn't want an instant gameover because I crashed a bike in a way that would probably just bruise
Fluffy89  [author] 3 Mar @ 11:39pm 
Joaquingarciasevilla, it would take an incredibly high braking power to die from braking alone on default settings.

But yes, braking very hard can cause injury, and left untreated, death.
joaquingarciasevilla 3 Mar @ 8:11pm 
I died for braking too hard
Fluffy89  [author] 2 Mar @ 7:51am 
Mang, you're welcome!
Mang 2 Mar @ 6:00am 
oki doki thank u
Fluffy89  [author] 1 Mar @ 8:52am 
Mang, those vehicles are incredibly touchy if just the brakes are slowing you down from 110+ km/h to 0km/h in between a few game ticks.

You'll have to adjust PVI's options to reflect how touchy your vehicles are, theres tooltips for everything in-game, and a discussion page here with longer descriptions for almost every sandbox option PVI has to offer. If you need more help let me know.

I had only tested PVI with vanilla sports vehicles with a character that had Speed Demon to make vanilla as aggressive as possible, so the default settings should be fine for most modded vehicles that are in line with vanilla vehicles acceleration/brake power wise.
Mang 1 Mar @ 7:03am 
hitting the brakes or even slowing down quickly will give me lethal injuries in singleplayer with Ki5 vehicles with the default speed limit configs
Fluffy89  [author] 28 Feb @ 9:07pm 
Ullatec, I feel that lol, I got flung out the windshield, lacerated several times, and knocked out on the road. Not a pretty end to that character.

Thanks! Glad you like it! :spiffo:
Ullatec 28 Feb @ 5:06pm 
I wanted to say that seatbelt mod was updated for b42, and thank god. My last character died of a deep wound to the groin when i did a slide into a telephone pole, lol.

This is a nice mod btw.
Fluffy89  [author] 6 Jan @ 4:06pm 
(Comment 3/3)

What game version are you on, which vehicle from what mod were you using, what do you mean by "just by walking inside the vehicle"?
Fluffy89  [author] 6 Jan @ 3:38pm 
(Comment 1/2)

kArMaFPS, by 'maximum', are your meaning you changed the 'upper bound' option for one of the severities? There is no explicit 'maximum' speed for low, medium, high, or fatal severities.

There's the option for "minSpeedForInjury" which is the minimum speed the vehicle must be traveling for any injury to occur, I'm assuming this is the "minimum" speed value you're referring to.
Fluffy89  [author] 6 Jan @ 3:37pm 
(Comment 2/2)

Injuries can **only** occur when:
(Note: Collision refers to ANY significant slow down where the vehicle slows at a rate faster than the threshold, not just physical impacts)

[list]
[*] The difference in speed pre and post collision is greater than the "threshold" sandbox option (defaults to 30km/h).
[*] Your pre collision speed is greater than the "minSpeedForInjury" value.
[*] A collission hasn't happened in the last 40 game ticks (fraction of a second)
[/list]

If and only if these three conditions are met, can PVI cause any injuries. This is the best information I can give you with what I have on hand from what you have told me.
kArMaFPS 6 Jan @ 2:12pm 
@Fluffy89 I only changed the sandbox configuration of the minimum and maximum speed and nothing else... The vehicle that caused the injury was a modified vehicle (In which the creators are even creating different physics), I have 1500 hours of play, I didn't get scratched by a bush (don't get me wrong)...The injury happened when riding in a specific vehicle, I ruined my rescue and that was last night, if it happens again I'll remember to take a print and send it to you, but it was something VERY SPECIFIC and I don't know say why it happened. I also work with some mods but I don't dare to launch them, some I do my own editing, this wasn't the case with PVI, in your mod I just changed the sanbox, but I didn't change any .lua files
Fluffy89  [author] 6 Jan @ 10:32am 
(Comment 1/2)

kARmAFPS, walking through bushes will scratch the player, same for walking barefoot. This is intended and is a vanilla feature. This mod *only* functions when in a vehicle, either driver or as a passenger, and when the vehicle comes to a hard or sudden and immediate stop (hits something solid or a group of zombies). Walking around will not allow PVI to deal injuries.

If those groin injuries are happening when outside of a vehicle, its not an injury caused by PVI.

About Knockoutd and Seatbelts, PVI works without them and still allows you to configure the severities of collisions, the injuries you may get, and their relative chances of happening, even if the other mods are not installed.
Fluffy89  [author] 6 Jan @ 10:32am 
(Comment 2/2)

Can you link a screenshot showing exactly which settings you changed and which 'tab' its in? PVI's sandbox options pages all start with 'PVI'. There is a minimum speed option, but nothing labeled 'maximum speed'.

I'd advise reading the tooltips for each sandbox option, as well as referring to the discussion page here for longer descriptions if needed.
kArMaFPS 6 Jan @ 9:47am 
About the seat belt mod and the knockout mod, they are not updated for the B42, so it doesn't make sense to use the PVI for now, I think... Even so, I await your response if it is a configuration problem that I did wrong or if the mod has some problem causing injuries even without crashing the vehicle, just by walking inside the vehicle (The injury occurred 3 times in a row in the groin, even though the groin was already bandaged, it caused new injuries in the groin)
kArMaFPS 6 Jan @ 9:45am 
@Fluffy89 I only modified the values ​​I mentioned, I didn't have any collisions... He causes injuries just by walking freely around the map, without colliding with absolutely anything (Maybe colliding with a bush, which has no collision)
Fluffy89  [author] 6 Jan @ 6:34am 
drshahramanvariazar, no. PVI will pick up your seatbelt status if and only if you have Working Seatbelts also installed and enabled.If you have both mods installed and enabled, seatbelts will reduce injuries caused by PVI. Same thing goes for the same authors Real Knockouts mod, if its installed and enabled with PVI knockouts can be triggered by PVI.
drshahramanvariazar 6 Jan @ 1:19am 
it already came with seatbelt system?
Fluffy89  [author] 5 Jan @ 6:26pm 
kArMaFPS, which settings specifically have you changed? PVI deals injuries to random body locations, so if its happening exclusively to the groin, it may be a different mod, you are very unlucky and its hitting the same spot, or something else.
kArMaFPS 5 Jan @ 6:09pm 
@Fluffy89 I need help, I don't know if I'm using the wrong mod, but after installing it, I set the minimum speed to 40 and the maximum to 50, driving the vehicle in a straight line without hitting anything I get a scratch on my groin all the time, is it a bug or do I not know how to use the mod?
Fluffy89  [author] 2 Jan @ 2:42pm 
Morgan, nothing has changed with the B42 compatibility update, the code for it and the last proper update for PVI is identical. As far as I know, potholes are just cosmetic sprites overlaid on the road.

Rachel L, will take a look and reply in your report.
Rachel L 1 Jan @ 8:39pm 
There is something weird happening. Whenever something makes the vehicles move more than normal, i get a black screen flicker. I made a more detailed report in the bugs & issues discussion
Morgan 1 Jan @ 6:31pm 
We are getting fractures from potholes in the road. We never had this issue before. Was something updated to cause this?
Fluffy89  [author] 3 Dec, 2024 @ 4:30pm 
Cerro de los Siete Colores, you're welcome, and thanks for confirming that! I'll add that to the FAQ shortly incase it comes up in the future.

Hope the injuries are plentiful, take care!
Cerro de los Siete Colores 3 Dec, 2024 @ 3:33pm 
Thank you for the answer!
I was playing with
.PVI
.WK
.RK
And everything was working as intended. So I guess you are right, those three mods could be in any order.

Stay well!
Fluffy89  [author] 3 Dec, 2024 @ 2:10pm 
Cerro de los Siete Colores, first off, thank you! Always nice to hear people are enjoying the mod! :spiffo:
Fluffy89  [author] 3 Dec, 2024 @ 2:09pm 
Cerro de los Siete Colores, truth be told, I have no idea, but my gut says that it shouldn't. PZ has a specific type of damage for car crashes that Working Seatbelts and Real Knockouts waits for before doing it's thing, whereas PVI disables that type of damage to avoid applying injuries on top of vanilla crashes.

Logic wise, PVI only cares if it can see the sandbox options of the other two mods, and if it see's they're installed, which I'm not sure load order matters for.

Not sure about the order I have the workshopID's of the three mods for my current save, but the modID's load like this:
First: Real Knockouts
Second: PVI
Third: Working Seatbelts

And everything appears to be working fine on my end, so I doubt load order matters for PVI.

Hope this helps!
Cerro de los Siete Colores 3 Dec, 2024 @ 4:54am 
Hey! First of all, this mod and it's customization are awesome! Congratulations!

Now let me ask you. Does the Mod Load Order between your mod, Working Seatbelts, and Real Knockouts matter?
aaaaaaaaaawdssss 7 Nov, 2024 @ 2:15pm 
nvm it works
aaaaaaaaaawdssss 7 Nov, 2024 @ 2:14pm 
The youtube video isnt working so i can see the mod
Fluffy89  [author] 13 Oct, 2024 @ 6:32pm 
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 Oct, 2024 @ 5:08pm 
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  [author] 24 Aug, 2024 @ 11:19pm 
Kenobii, glad you're enjoying the mod :spiffo:
Kenobii 24 Aug, 2024 @ 6:41am 
died from braking too hard in a lamborghini 9/10
Mang 21 Mar, 2024 @ 11:10am 
:steamhappy:👍
Fluffy89  [author] 20 Mar, 2024 @ 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, 2024 @ 10:42am 
Thanks for the detailed response
Fluffy89  [author] 15 Mar, 2024 @ 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, 2024 @ 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, 2024 @ 12:41am 
Recommended sandbox settings for realism?
Fluffy89  [author] 25 Jan, 2024 @ 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, 2024 @ 7:47pm 
Appreciate the update everything seem to be working. good work