THE STORY of the Stuart kings and their exile is one largely dominated by the near mythic endeavours of their last sporting chance, Prince Charles Edward Stuart – known then, rather dashingly, as The Young Chevalier, but now forever known as Bonnie Prince Charlie. The National Museum of Scotland’s dense and illuminating romp through this rich period of history (recently mined in the Outlander books and TV show) puts this story in the context of the less well told story of the other Jacobite pretenders in exile.

It was religion, in large part, that did for the Stuarts, when the future James II/VII converted to Catholicism at a time when most of his future subjects were Protestants. When James fled to France in the wake of The Glorious Revolution, which saw his Protestant daughter Mary and her husband William of Orange crowned in his place, the long Jacobite exile, with its five doomed attempts to reclaim the throne, began.

The players are all here in this exhibition – James VI and I, his profligate son Charles I, the more circumspect Charles II and his younger brother, the future James II and his wife, Mary of Modena. When their son James III married the Polish princes Maria Clementina Sobieska, their two children became the last of the Stuarts – Charles Edward and Henry Benedict.

Fabulous objects flesh out the tale, from national, private and royal collections at home and abroad. It is all paced out in as much detail as can be lined up on the walls, from the golden Ampulla which contained the holy oil with which the Jacobites were anointed “By Divine Right” to James VII/II’s armour, the faceguard on his helmet an elaborate cut away of his initials and the royal coat of arms.

There is bloody history alluded to in the chilling handwritten order for the massacre of the MacDonalds at Glencoe or a watercolour of the positions taken in the Battle of Culloden. And there is the history of court life, of royalty cloistered in grandeur on the wrong side of the Channel, plotting and re-plotting the return to the throne, in sway to the political manoeuvrings of the other crown heads of Europe.

In exile, James II was welcomed by his cousin, King Louis XIV, the Sun King (James’ sister, Henrietta, was married to Louis’ brother Philippe) and lodged at the Chateau de St. Germain en Laye. There is a portrait, here, of the exiled royal family, a modello for the much larger oil now held in a private collection. An impressive work by Pierre Mignard, it depicts the exiled royal family in palatial splendour, the six year old James VIII/III pointing – in vain, as it turned out – to a cushion on which lie a crown and sword.

It is just one of a large number of sumptuous royal portraits, of would-be kings depicted in armour and regalia, of queens lavishly attired, bloodlines symbolically underlined. These are portraits on a grand scale, the standard accoutrements of royalty, upheld on a pension from the French court and the Vatican.

And then there are the miniatures, the fascinating currency of undercover Jacobitism, the secret signifiers of one’s political leanings, the Stuart portraits hidden inside the double-lids of snuff boxes, designed to be flashed quickly to sympathisers at home. A sub-culture of Jacobite contraband emerged, from the secretive nods to double-sided fans with Jacobite imagery. Behind closed doors, supporters would toast the “King over the water” with glasses such as the “Spottiswoode Amen” glass, (c.1745), engraved with the words of the Jacobite anthem.

The currency of image in maintaining the Jacobite cause was key, from the tartan Highland suit Charles wore to appeal to appeal to potential Highland supporters – seen in the John Pettie portrait of “Bonnie Prince Charlie Entering the Ballroom at Holyroodhouse” painted during his short Edinburgh tenure after the Battle of Prestonpans when he also had his portrait painted by Allan Ramsay – and the more European clothing favoured at court, designed to appeal to the English supporters he hoped to gather on his journey south.

There is a leap at the end of the exhibition to the sudden embrace of all things Stuart by the wider public. From treasonable talk we suddenly, even before the death of the last Stuart (Henry IX, brother of Charles), find Jacobite drinking clubs toasting the absent monarchs, and the likes of Robert Burns accepting invitations to join them. Later, but not much later, even the Hanoverian royal family begin to collect Jacobite memorabilia, a legitimisation of their own history, perhaps, a mending of ties once all threat was gone, and a reclaiming of a little of the Jacobite “romance” for their own.

Bonnie Prince Charlie and the Jacobites, National Museum of Scotland, Edinburgh until November 12

www.nms.ac.uk