Complex sentence: The buildings were ransacked during the Swabian War in 1499 but thanks to the treaty with Solothurn the monastery was spared the effects of the Thirty Years' War.
Split into simpler sentences: The buildings were ransacked during the Swabian War in 1499. However, thanks to the treaty with Solothurn the monastery was spared the effects of the Thirty Years' War.