I've been working on a rally scenario, and one of the bigger issues I ran into was setting a fail state. I know the Bank Robbery scenario uses vehicleData.damage(), but that just returns a number that appears to care little about what the damage actually was (in the scenario itself, purely cosmetic damage will fail you for example). From what I can tell from the purely json scenarios they work in a similar way. How would, or can, I go about getting the state of the powertrain and steering linkages? As long as the player can put power down - and at least somewhat control direction - they shouldn't be failed.
The "Damaged Truck" scenario ("minimum speed" in the game files) uses drivetrain breakage for failure. Have a look at that to see how you can detect specific parts breaking.