However, all this ended when, in March 1798, more than 30,000 French soldiers marched on the Zähringerstadt in the medieval area of the city to secure free access to the Alpine passes for Napoleon Bonaparte, and also to rob the legendary Bernese treasury to finance the campaign in Egypt. Pauly was an artillery sergeant in the Swiss Army, and, seeing the superiority of the light and easily mobile guns of the French over the heavy Bernese ones (which required a team of oxen), he went on to design artillery for the new Helvetian army that required just a horse or a few strong men. Whilst fighting in Massena's campaign against the Russians in 1799, he wrote a manual about the usage of firearms.