The latest experimental (42428d678ad4a77a89678fcdd4decd2289dacbf3) includes a fix from me to what I’ve been calling “Shock Damage” - damage from collisions with things that damages parts other than the one that was hit.
The old system had some issues, the most notable of which was that any damage that wasn’t from a vehicle-vehicle collision would be applied from (0, 0), which is usually the seat with the controls. This would mean that, especially if you lengthened your vehicle, parts that were far away from the front of the car would be damaged by ramming into stuff. It would damage any part, but with a random chance, decreasing with distance.
Now, colliding with things (notably monsters) will deal damage from the correct location. It deals shock damage all the time, but only to frames.
The end result is that you will be repairing the front of your car more often and the back of your car never. It also means that you can be more conservative with armor, and only apply it to the front. Extra bumpers in the front will work better too, as they will actually absorb some of the shock damage. You also won’t have seatbelts or gas tanks or solar panels exploding for no apparent reason.
Something I noticed when testing, should parts get unmounted when the frame under them is destroyed? It looks like there’s no actual down side to frames getting broken except perhaps preventing you from mounting new stuff. I went ahead and merged because frames broken from shock having little impact (ha) is MUCH preferable to the previous behavior.
There’s no direct downside to them being broken, except that frames with 0 HP could be destroyed if they take more damage, and if that happens anything mounted on them will be forcibly dismounted. (Only the (0, 0) frame is immune to this)
Shock damage doesn’t cause parts to shatter into pieces like collision or smashing damage does - but it could. I don’t think it should, though, but am open to suggestions.
Ran over 4 zombears at about 120 MPH, my seat was unmounted from under me, dropping me on the ground, and my horrifically wrecked car coasted to a stop.
The game thought I was still boarded on the vehicle, so spammed messages. Perhaps a “fling_player()” or similar is in order if an occupied seat is destroyed.
I would think in most situations, the frame would only take as much damage as the rest of the parts, so they would either break at the same time, or the other parts would break before the frame. The only time I can think of this not being the case would be if the car took damage from something underneath, like a mine.
What If separating vehicle parts created separate vehicle instances with said parts attached rather than dropping piles of scrap, Either that or have a chance of dropping the pieces as highly damaged items.