How did societal changes within expanding empires impact their diplomatic relations with other states in the early modern era?