• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

Keizer Harm

Swamp German
40 Badges
Jan 28, 2013
2.719
3.959
  • Crusader Kings III: Royal Edition
  • Crusader Kings II: Sunset Invasion
  • Victoria 2
Hello there! I have made a tool that will hugely facilitate creating character history files, family trees of every ruler in your mod, by letting it be done in the software specifically designed to do it. Two years back, I spent an evening making a quick and easy console app in C# that will convert a GEDCOM genealogy file to CK2 dynasty and character files. This year, I spent about two weeks in total updating it to CK3 and making it better in every way.

HOW IT WORKS
You can make family trees with family tree software, such as FamilyEcho or Simple Family Tree. These allow you to easy define people and relationships, and display the resultant trees visually, unlike CK3's boring script. Any self-respecting genealogy program (including those two) allows exports to the GEDCOM format. Such a file is the primary input for my converter tool.
1625242978189.png

The other input includes the lineage files, those being Dynasties.csv and Houses.csv. In those, you list every dynasty you wish to be represented in the game. This serves two purposes: it lets you define the CK3 representation of families in the GEDCOM file. A person's surname in the GEDCOM is matched to the combined dynasty/house name and prefix in the lineage files, and the dynasty/house is generated with the ID specified. Or they are not generated, in case you just want to refer to a vanilla dynasty/house.
1625243519328.png

The lineage is also used to set default cultures and faiths for every member character. However, you can define exceptions to those in the GEDCOM. Every person has a Description or Notes field in the GEDCOM standard, and my tool detects specific words in those files. Those being cultures, faiths, and traits. Just put them in there, separated by newlines or spaces.
1625244270409.png


Those words reference three more input files: cultures.txt, faiths.txt, and traits.txt. Those are extremely simple txt files containing the CK3 keys of every culture, trait and faith in the game. It is set up like this to allow you to add keys for your own modded versions of such entities, if you have any.
1625244390996.png


The last input file is settings.txt. As the name implies, here you can define some settings to tweak the generation, such as character file ordering and the aforementioned namespace.

When running, the tool uses a simple command line interface that just reports what is going on, without asking for input like the CK2 version. The result is that once you have all the files set up, the tool should do everything automatically and generate your required files without issue. Of course, any errors will be reported here too - which will also be printed to a log in the Output folder, in case the tool should close unexpectedly.
1625245198321.png


The output files are:
  • One or more CK3 character history files - depending on the settings these may be grouped by culture, dynasty, or not at all.
  • CK3 dynasty and/or dynasty_house files.
  • A localisation file - used for the dynasty/house names as well as any prefixes. Note that these may duplicate vanilla prefixes, but I have no way to tell which so that may be the only manual maintenance required :)
  • A cache file. You do not need to do anything with this, it just makes sure that over multiple generations with the same file, the same ids are given to the same GEDCOM people.

1626633806604.png


HOW TO INSTALL
Disclaimer: I know one or two things about coding, but very little about deploying. This method I have used seems reliable enough but I can offer no guarantees - please let me know if it doesn't work for you! The required platform is Windows, 64-bits.
  • Install the Dotnet CORE 3.1 or higher runtime framework, if you haven't already. Get it here: https://dotnet.microsoft.com/download
  • Download CK3-GEDCOM.zip (attached to this post), and unpack it
  • Run it from the exe. The default setup has a simple GEDCOM and associated dynasty/house files, kindly provided by @Torngasuk
Further notes for behaviour and specific GEDCOM requirements (all really simple) can be found in the tool's readme. Do try it out! And let me know if you have suggestions for improved functionality.
 

Attachments

  • CK3-GEDCOM-1.1.zip
    14,2 MB · Views: 0
Last edited:
  • 6Like
  • 5Love
  • 1
Reactions:

Keizer Harm

Swamp German
40 Badges
Jan 28, 2013
2.719
3.959
  • Crusader Kings III: Royal Edition
  • Crusader Kings II: Sunset Invasion
  • Victoria 2
Version 1.1 is out! It critically solves an issue with character ID namespacing. I had naively adopted CK3's own precedent and prepended namespaces to the numberic id with a period. However a period is also used for scope chaining. So if you had a character id MyMod.16; and needed to scope there from event script, you would write "character:MyMod.16 = {" - but CK3 interprets as scoping to a character with the Id MyMod, and from there scoping to some variable with the name "16". That obviously wouldn't work.

To solve this, I switched to using underscores for the namespaces. Now, the tool will generate MyMod_16 for character ids. Note that, in order to take advantage of this fix, you will need to adjust your cache files manually, as they by design will store the original gedcom ref to ck3 id connection regardless of how it was originally formatted.

Otherwise it should be wholly compatible with any files generated with the original version. It also comes with improvements for culture/faith assigning - lowborn characters will now get the culture/faith of their (last) spouse. And I decided to move the explanatory comments out of the Houses/Dynasties csv files, because they were making Excel even worse at parsing csv than it usually is, and caused major issues.

The new version is now attached to the forum post. Happy modding, and let me know any new features you would like to have!
 
  • 2Like
  • 1Love
Reactions:

TypicalCrusader

Earth King
37 Badges
Nov 9, 2013
1
1
  • Tyranny: Archon Edition
  • Empire of Sin
  • Island Bound
  • Crusader Kings III
  • Age of Wonders: Planetfall
  • Cities: Skylines - Campus
  • Imperator: Rome
  • Cities: Skylines Industries
  • Cities: Skylines - Parklife
  • Cities: Skylines - Green Cities
  • Tyranny - Bastards Wound
  • Tyranny - Tales from the Tiers
  • Cities: Skylines - Mass Transit
  • Cities: Skylines - Natural Disasters
  • Tyranny: Gold Edition
  • Tyranny: Archon Edition
  • Crusader Kings II: Legacy of Rome
  • Cities: Skylines - Snowfall
  • Knights of Pen and Paper 2
  • Cities: Skylines - After Dark
  • Crusader Kings II: Way of Life
  • Cities: Skylines Deluxe Edition
  • Cities: Skylines
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Victoria 2
  • Sengoku
  • Europa Universalis IV
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Hearts of Iron III
  • Age of Wonders III
  • Prison Architect
  • Prison Architect: Psych Ward
This tool is really really great, it turns tedious process of creating character history into a breeze.
 
  • 1
Reactions:

Keizer Harm

Swamp German
40 Badges
Jan 28, 2013
2.719
3.959
  • Crusader Kings III: Royal Edition
  • Crusader Kings II: Sunset Invasion
  • Victoria 2
Would it be possible to have this tool work in reverse? That is we supply CK3 history/character files and the tool spits out the GEDCOM genealogy file?

Asking for someone who has 2000+ canon characters already in a CK3 mod where the super-majority are the descendants of one mythical founder.
That already exists, actually :)


Let me know if that one works for you; it wouldn't be impossible to make mine work in reverse but maybe your needs have already been fulfilled. :)
 
  • 1Like
Reactions: