The heroes (and sometimes the villains) in historical romances are often involved in war, whether in the Royal Navy, the army, or as spies. Even if their wartime activities do not appear directly in the story, their military experiences shape their lives and their characters. One group of unsung heroes in the army was the engineers. Engineer officers could not buy their commissions as cavalry and infantry officers did; they were only given commissions after training at the Royal Military Academy at Woolwich, and thereafter promotion was by seniority.
As you might expect, engineer officers were essential in sieges, planning where the trenches should be dug and artillery batteries sited, and also in repairing a fortress once it had been taken. Being an engineer in a siege could be as dangerous as being an infantry officer in the battalions attempting to scale the walls. The engineers knew their way through the trenches and where the weakest points in the walls were, and often led the way.