From a castle that became a lighthouse on the Buchan coast to the 13th century triangular fortress that was besieged by the English, the buildings chart hundreds of years of Scottish history with many becoming the real-life settings for generations of battle and bloodshed.