Vehicle damage modeling

Is there any way to change the amount of modeled damage a vehicle incurs when hit by something?
I mean, some cars hardly even dent when run over by a tank, and others completely pancake.

I am not a very technical person, so I thought that this topic would be useful for people who are/ who want to mod.
 
Is there any way to change the amount of modeled damage a vehicle incurs when hit by something?
Yes, somewhat, and no depending on what exactly you mean by "damage". I was never responsible for working on vehicles directly, so hopefully one of our vehicle guys will jump in here and expand or correct anything I talk about.

1. Hitpoints. All vehicles have a set number of hitpoints which control when they start to smoke, catch fire and ultimately explode. The base number of hitpoints for each vehicle is set in the vehicle table files, although the base hitpoints is sometime overridden at runtime (usually by script to give a vehicle more/less health depending on the gameplay requirements). Anything that causes damage to the vehicle will subtract from the vehicle's current hitpoints. You can adjust hitpoints in the vehicle table.

2. Components (doors, bumpers, etc.) can be unlatched or fall off completely. I'm not familiar with how exactly these various states are handled, and I think a lot of it might be hard coded.

3. Deformation. Certain pieces of vehicle collision can be flagged to allow visual deformation (dents/bumps/etc.). I believe the amount of damage is directly calculated from the velocities and mass of the colliding vehicles, but there may be some "toughness" parameters in the vehicle table somewhere that modify the amount of deformation. I'm not sure where geometry is flagged for deformation, but I imagine it's part of the vehicle's crunched data.

4."Crushing". Crushing is a specific type of damage added in SR3, to support - well - tanks crushing shit. Some non-tank vehicles are also flagged to crush things (the STAG SUV is the only one that comes to mind). This is specialized code, and does a lot of "smoke and mirrors" type stuff in the background to pull off. As such, tanks cannot be crushed themselves (two things crushing each other causes all sorts of glitches). There are crush specific values in each vehicle table to control how the vehicle is crushed "Crush_height" & "Crush_factor".

Like I said, I'm no where near an expert on our vehicle system, so there may be more tweakable values in the various vehicle tables to play around with. Hopefully some of these terms will clue you in for what you are looking for in the table files.
 
Crushing and Vehicle damage are actually two connected systems, one facilitated by the artist through morph targets (visual damage), the other entirely through code (crushing), facilitated by specially flagged collision hulls. Vehicles can be crushable or not crushable based on two things: the first is in the table file as Matt stated, but if the vehicle is never intended to be crushable (such as motorcycles, heli's or tanks) then the vehicle isn't even set up to support it and may lack the collision flags altogether.

I think most four wheel vehicles were set up to support it though, but some had it disabled in the table file for various reasons, including if the vehicle is too tall for the tank to physically climb, so the crush code is never called, or called intermittently anyway. In these cases you just see the impact damage, the same as in any vehicle collision.

As to the amount of damage a vehicle takes in a collision, I think that's hard coded, with the ease with which the vehicle is damaged being based on the vehicle's maximum hitpoints. I do know that the vehicle the player is currently in gets a buff though; sometimes this is high enough that the vehicle can take multiple impacts before damage is easily visible.
 
I was mostly talking about deformation and crushing. Since I can modify the crush height and factor, I guess my main question is where can I change the values for

As an example, some vehicles in Gta 4 deform very unrealistically, however, you can change the values to the point that if you throw a rock at the car, it will look like it went through a car compacter. This is what I am hoping to be able to do. Any info to point someone in the right direction would be great.

EDIT* just read the post you posted right before my post. (too many posts...)

Is there a way to change the amount of deformation per impact without causing hitpoint loss?
 
Not to my knowledge, no. There is a Health Drop Count variable in the _Veh table file, but that's deep dark designer territory so I don't know what it actually does, if anything at all. Sorry.
 
Is there a way to change the amount of deformation per impact without causing hitpoint loss?
Vehicle deformation is almost entirely hard coded. The deformation sphere radius and intensities are controlled by the damage source and physics calculations, and there aren't any modifiers that are exposed to data/script that I can find to directly change anything used in calculating these values.

If you wanted to limit the extra deformation to just player caused damage, or player controlled vehicles, that may be possible.
 
Back
Top