warfare in early modern scotland includes all forms of military activity in scotland or by scottish forces, between the adoption of new ideas of the renaissance in the early sixteenth century and the military defeat of the jacobite movement in the mid-eighteenth century. in the late middle ages, scottish armies were assembled on the basis of common service, feudal obligations and money contracts of "bonds" of "manrent". in 1513 these systems produced a large and formidable force, but in the mid-sixteenth century there were difficulties in recruitment. individuals were expected to provide their own equipment, including axes and pole arms. highland troops often brought bows and two-handed swords. heavy armour was abandoned after the flodden campaign. highland lords tended to continue to use lighter chainmail and ordinary highlanders dressed in the plaid. the crown took an increasing role in the supply of equipment. the pike replaced the spear and the scots began to convert from the bow to gunpowder firearms. feudal heavy cavalry were replaced with light horse, often drawn from the borders. james iv established a gun foundry in 1511 and gunpowder weaponry fundamentally altered the nature of castle architecture. in the 1540s and 1550s, scotland was given a defended border of earthwork forts and additions to existing castles.