• 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
42 Badges
Jan 28, 2013
2.763
4.286
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Expansion Pass
  • Crusader Kings III: Royal Edition
  • Crusader Kings II: Sunset Invasion
  • Victoria 2
Hello there! I made up a quick and easy console app in C# that will convert a GEDCOM genealogy file to CK2 dynasty and character files.

HOW TO INSTALL
Disclaimer: I know one or two things about coding, but very little about deploying. I found two methods that should allow you to run it on your computer, but there's bound to be an easier way I'm overlooking. This one should work for now, at least. The required platform is Windows, 64-bits.

First method:
  • Install the Dotnet CORE 2.0 or higher runtime framework, if you haven't already. Get it here: https://dotnet.microsoft.com/download
  • Download CharacterCreator - Framework Dependent.zip, and unpack it
  • In it you will (sadly) not find any exe files. You must open a command prompt, navigate to the folder, and then enter the following command: dotnet CK2CharacterCreator.dll
  • Use the tool in the same command interface.
Second method:
  • Download CharacterCreator - Self-contained.zip, and unpack it.
  • Find the exe file in that mess of a folder.
  • Run it, and use the console that pops up.
In both cases, you can see the example files in the InputFiles directory. Place your own files there when using it.

HOW TO USE
This application takes the following:
  • A properly-formatted GEDCOM file, containing the characters you want to put into CKII.
    • Dates can be full dates in the standard gedcom format ("5 APR 2001"), but just years is also supported, in which case the first of January of that year is taken.
    • You can put trait, religion and culture names in the NOTES section of a person. They will be applied to the character.
  • A csv file for all dynasties you want featured in CKII.
    • The first line should contain the headers "Dynasty", "Culture", "Religion", "Custom number" in that order.
    • The Dynasty should be equal to the last name of the persons in the GEDCOM you want to belong to that dynasty.
    • Persons with unrecognised dynasties will become Lowborn.
    • Persons with no recognised culture/religion will get "noculture" and "noreligion".
Both are meant to be located in the InputFiles file. It produces two txt files: one for dynasties and one for characters.

Further behaviour:
  • Every culture/religion/trait should be written using the CK2 tags, e.g. "norse_pagan_reformed".
  • The application will ask for the number from which you want to start counting character and dynasty ID's. You can also enter a custom dynasty ID in the csv file (can be useful if you want to use a dynasty that you already have elsewhere). This will get used instead, and the remaining dynasties will always get an ID higher than that one, to prevent overlapping.
  • A dynasty's culture/religion is initially given to every member of that dynasty as well.
  • Any religion/culture in a person's NOTE will override that.
  • Marriages are required by the game to have dates, both for the start of the marriage and the end through divorce or annulment. If you do not set a marriage date in the GEDCOM, the tool will take the first day of the year when the wife turned 17. This will obviously cause problems when there's a character with multiple marriages throughout their life, so you should just enter wedding dates as well.
Example csv and GEDCOM files are provided. To see what the tool does, run it by double-clicking CK2CharacterCreator.exe. It will generate two new files, characters.txt and dynasties.txt. There's your CK2 script!

Try it out! And let me know if you have suggestions for improved functionality.
 

Attachments

  • CharacterCreator - Framework Dependent.zip
    628,8 KB · Views: 17
  • CharacterCreator - Self-contained.zip
    27,4 MB · Views: 26
Last edited:
What is GEDCOM?
It's just about the most common format for family trees. Like mp3 for genealogy.
https://en.wikipedia.org/wiki/GEDCOM
There's a lot of tools that you can use to build family trees, and pretty much all of them allow exporting the trees to GEDCOM format. My tool imports GEDCOM, and turns it into CKII characters and dynasties.
 
It's just about the most common format for family trees. Like mp3 for genealogy.
https://en.wikipedia.org/wiki/GEDCOM
There's a lot of tools that you can use to build family trees, and pretty much all of them allow exporting the trees to GEDCOM format. My tool imports GEDCOM, and turns it into CKII characters and dynasties.
Any good (and free) genealogy tool you advise?
 
Any good (and free) genealogy tool you advise?
I like Simple Family Tree. It's exactly what it says on the tin. Only issue for my tool is that it doesn't implement divorces, so you'll have to add those manually - which is easy enough, as GEDCOM is plain text.
 
I like Simple Family Tree. It's exactly what it says on the tin. Only issue for my tool is that it doesn't implement divorces, so you'll have to add those manually - which is easy enough, as GEDCOM is plain text.
Thanks, the simpler the better.
Until it creates basic family trees I ll be happy with it, all complex or specific things can be changed by hand.
 
Does dynastic name needs to be field somewhere in Simple Famiy tree (SFT) ?
 
No, my tool will take the surnames of the people, and compare them to the dynasties you entered.

I dunno if you've worked with GEDCOM before, but basically a name is structured like this: "Karl /Karling/", and the part between the slashes is the surname. If you enter a name without bothering to add the slashes yourself, SFT will place them around the last word. So "Karl Karling" will work just fine, as will "Louis Pierre Hubert Karling", and if you add a Karling dynasty to the csv file, my tool will pick up all the Karlings and give them the proper dynasty (you'll want to insert the existing Karling dynasty ID in the "Custom number" field in that case).

However, if the last name consists of multiple words, you need to add the slashes yourself. E.g. "Roger de Hauteville" will, absent your own slashes, be turned automatically into "Roger de /Hauteville/", making "Hauteville" the name of the dynasty, which is not what you want. So enter the name like this: "Roger /de Hauteville/", and "de Hauteville" will be the dynasty.

EDIT: Another thing: if you only have the first name of someone, make sure to put // after the name. Otherwise SFT will interpret the lone word in the name as the family name, so you'll end up having a "John" be a nameless guy of the John dynasty.
 
Last edited:
Thanks!

I can't get the tool to work, even with just test files.
I'm launching the .exe (as admin) a window briefly appears and disappears immediatly. Win10 64bits here.
 
Okay... obviously not what I wanted ^^; I'll look into that. Might be that you need to install a certain framework for it to run.
 
Okay... obviously not what I wanted ^^; I'll look into that. Might be that you need to install a certain framework for it to run.
Looks like that kind of issue, a certain framework :D
 
in case I am using another genealogy tool, does your tool still work in regard to the extra the .ged could have ?
 
What do you mean, extra?
Well, when using less-simple genealogy software, it can write a lot of additional to the .ged. My question was to know if such would interfere with your tool or if that extra stuff would just be ignored as it should ?
 
Well, when using less-simple genealogy software, it can write a lot of additional to the .ged. My question was to know if such would interfere with your tool or if that extra stuff would just be ignored as it should ?
Should be ignored. My tool only takes what it needs.

By the way, I found two new ways to deploy it that should work on your device. I'll add it to the OP.