Dev Diary 2019-02-20

Welcome to our second development diary of 3.8.8, on early access now and available to the public this Friday, February 22nd. Fair warning: this diary is relatively technical and focuses on the advances to the dynasty system that were made in the background of 3.8.8 to facilitate some cool features coming in 3.9

View Dynasty & Personal Union Inheritance
Lets talk first about the visible changes in 3.8.8: the ability to view the dynasty of another nation and how inheritance laws affect Personal Unions. The dynastic view is relatively simple, under the dynastic heading of diplomatic interactions there is now available a View Dynasty option which fires an event displaying the current royal family in that nation in the same manner that you can view your own in the decision window.

Prior to 3.8.8, although two nations might have differing rules of succession the junior partner's rules ceased to function once the Union began. Now, the junior nation continues to consider who will inherit based on it's own laws and the union can break in the event of a divergence in the inheritance. For example, under Salic Law no woman can inherit the French throne so when the King of France dies with only a daughter, the throne passes to his brother. France begins with two personal unions, Berry and Navarre; since Berry also follows Salic Law the union continues but Navarre follows general male primogeniture which means that the king's daughter has preference over his brother. The daughter inherits Navarre and that union is now broken. This adds another historical dimension to the considerations of maintaining a Personal Union in the long term.

The Mechanics of Characters
Prior to 3.8.8, every character displayed in your nation's royal family was a product of a designator and an age, the designator itself carried the gender, relation to the monarch generationally, and order of birth ( e.g. male_gen0_1 ) while the age simply measured the age of the character in months. In 3.8.8, we add a LOT of information to what we track about each character. WHY? The end goal is to allow nations to arrange marriages between different characters across various realms; in order to do that, a child with parents in two separate nations needs to be visible to each nation and calculated properly into their succession. Each character is now additionally tracked on all of the following:


 * Active: (0 = dead 1 = active 2 = passive) this variable determines whether the characters chances of having a child or dying are calculated in this nation or in another one; this prevents characters in multiple nations' succession order from having twice the likelihood of death.
 * ID: A unique id variable is issued to every character; this allows the system to know who that character is if they are represented in another nation. For example, in the 1309 bookmark the brother of the King of France is the Duke of Anjou and therefore is in the line of succession.  If the Duke of Anjou dies, his character id is used to determine which character in France needs to be removed from their royal family display.
 * Country: How do we know that we need to tell France about the death that just happened and not, say, England? Each character can track up to two countries that concern them. For an active character, these countries represent places he is passively tracked.  For a passive character, there will only be one country (the one in which they are active).
 * Stats: (the total of the character's adm/dip/mil stats) which will give an idea of how promising the character seems when they are young; specific stats won't be shown for any character less than 15 except active heirs.

If much of that seems like gibberish, well, dynastic-related events and effects are approaching 100k lines of code so it's not easy to wrap your head around the internals by any means. I just didn't want anyone to think there wasn't progress being made in 3.8.8 since there was a lack of visible content due to the amount of work that went into the dynastic engine but won't be realized until 3.9