In the past, the line of succession of most monarchies revolved around only male heirs while disregarding female heirs. A king’s heir is traditionally his eldest son. If the eldest son dies before producing an heir, he would be succeeded by his younger brother as the heir apparent. If the king produces no male heirs, his heir would either pass on to his younger brother or the eldest male heir of his younger brother. If the king has no brother or nephews, his heir would be his closest cousin. This process would go on and on until there were no male heirs left and the dynasty would be replaced by a different dynasty. The idea of giving a female heir the throne was not taken seriously in England until Mary I AKA Bloody Mary and then Elizabeth I AKA The Virgin Queen.
Even though this line of succession was easy to follow, I was not fond of it because the female heirs mostly were never given a chance to rule under their own power. There is another line of succession known as Absolute Primogeniture, which involves giving equal inheritance to all heirs regardless of gender. This would mean that the next heir whether if they are male or female would inherit the throne. This was the practice in the Kingdom of Navarre before their dynasty was overthrown by royals who followed the male preference line of succession. In modern times, countries like Sweden, Monaco, the Netherlands, and Norway have adopted absolute primogeniture.
After a great deal of brainstorming, I have come up with the version of absolute primogeniture in my third fantasy book. When the ruling emperor dies without a son, his daughter would take the throne. When that happens, the daughter, her husband, and her heirs will inherit the surname of the ruling dynasty. That way, the bloodline and family name of the ruling dynasty will never die. However, the kings and barons of the empire, who adhered more for male preference lines of successions, would not be happy.