The palace , much altered over the generations , was generally used as a residence only at times of dynastic importance or danger , when Holyrood , down in the lowland , was difficult to defend .
The palace was only a house when there was a threat because the other areas of the country were susceptible to Viking attacks .