Dev Diary 2019-03-29

Greetings and welcome to the Development Diary for 3.9.2, as I hinted last time this one involved a LOT of work; unfortunately most of that work was relatively dull and doesn't show up for much on the front end so I'll do my best to explain why it was necessary to the longer-term process of VeF's development.

Regencies
One of the things you will be able to see is the return of Consort Regencies. The way things work from Paradox, during a consort regency any attempt to reference the nation's dynasty would return the Regent's dynasty instead of the impending heir. The result of this was that any characters born during a regency ended up with the wrong dynasty, potentially creating significant chaos. The easiest thing to do was to disable the regency and this was accomplished by removing the consort the instant the monarch was killed. Now I know you're thinking "generic regencies are probably the most boring part of the game, wasn't there another way to fix this?". There is: by saving all the consort's information prior to their removal, you can recreate them as a new entity except with the correct national dynasty in place to preserve the creation of new characters in the royal family. There is not, however, any way to save the name of an existing consort. In order to get the right name, we have to know it beforehand which results in the work that went into 3.9.2.

Characters
As a brief aside, I should explain how 'characters' work in EU. There are three kinds that matter to us, rulers, heirs, and consorts.

A ruler can be stored and moved to rule somewhere else; they can never be made an heir or a consort. An heir can be stored (a stored heir is the status of most dynastic members in VeF)and moved to be an heir somewhere else, they can become a ruler only by ascending a throne from the heir position, they can never be made a consort. A consort can't be moved or made an heir, they can only become a ruler through a consort regency that runs out of heirs.

These are limitations in the engine and nothing can be done by me to change them. All three types consist of values such as age and ADM/DIP/MIL skill; these values can be copied to variables in order to "recreate" the character elsewhere. By also storing the name as a variable, I can cheat the system and redefine any character in any role at any time.

Names
What's in a name? Well, in VEF a name is another trait of a character being stored as a variable. I accomplished this by selecting a slate of 10 male and 10 female names for each culture group, assigning them values, and then each character can have a variable set to keep track of their name. Any time we need to move them into a slot which the engine doesn't accommodate, we simply take all the attendant variables and create a 'new' person with the same name, dynasty, skills, and age in the correct role. This is how I'm able to create regencies with the same name and stats of the consort without the consort's original dynasty still being attached. For those of you thinking ahead, you'll realize this also means that one of those many heirs each nation is tracking can now end up as a consort in another nation opening up the floodgates for the possibility of arranging marriages between different characters in various nations.

Additionally, many people have commented on the frequency of ruler's that like to name three of their four sons Henry or Louis or whatever. In 3.9.2 I've introduced another variable by which the game tracks which male and female names a particular character has already used for their children to prevent duplicates in this manner. It's also been noted that the ability to name your heir previously available in vanilla (or maybe it's a DLC, I can't keep track anymore) doesn't function because all heirs are instantly stored away. For the children of your ruler, there is now an event available (when you are informed that the Queen is with child) that allows you to select prospective names (male and female) for when the child is born (the Iberian names are shown below).