Destroyed Buildings & Metal Detector

I’d really like an option to have buildings randomly be demolished on world gen. Is this moddable easily enough? Not all buildings, mind you, but have a percentage chance per building or something. It be interesting to have to dig through rubble to try and retrieve goods. This could make a Metal Detector item useful, too.