I'm thinking there could be some sort of UI app that would allow the engine and driveline (maybe even the suspension) to be restored, without losing any cosmetic damage
This would definitely be interesting. Like you're just swapping in a new driveshaft to continue driving if the rest of the car isn't that damaged. Would also be interesting if someday you could save the current state of your car, including the wear and tear you did, and then loading it into another map for example. So when parts would wear out completely, you'd be able to replace certain parts instead of resetting the entire car. But now I'm just daydreaming about features being implemented maybe in years from now, if they're even thinking about putting it in game.
Currently you can save the state of the car during the session you are currently in at its current damage state, then continue beating it up and then reload back to that damage level, but i dont think its set up currently to save between sessions, like loading into another map...that would be cool, but the save function is already somewhat implemented, its in the radial menu.
For the most part this is not possible. Everything that relies on breaking beams can't be properly reversed since we can't "unbreak" beams. So while I could easily restore the simulation part of a broken driveshaft for example, the beam used to trigger breaking of said driveshaft will still be broken and therefore can't break again, making the repaired driveshaft literally invincible.
Couldn't you just restore the broken beam to default state using the beam data? I'm kind of curious now as to why that can't be done.
For anyone curious, running Code: powertrain.getDevice("driveshaft").isBroken=false powertrain.getDevice("driveshaft").setMode(powertrain.getDevice("driveshaft"), "connected") in the vehicle lua console will magically repair the driveshaft simulation for most RWD cars, but this obviously has the downsides Diamondback mentioned.