• 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.

unmerged(30939)

Second Lieutenant
Jun 22, 2004
131
2
I got a bit of time between work and playing the game to make the old family tree maker for CK2.

This program takes a CK2 savefile and generates a family tree for a specified character, saving it in the GEDCOM file format which can be loaded in many genealogy programs. For example, heres the tree for 'the Conqueror' about 30 years into one of my games (I didn't play as him) shown in Genopro.
CK2FTM1.gif

As of this first version, it's very basic. I cobbled together some sort of usable GUI but there's no error handling so if you do something wrong it will just crash.
Needs .NET 4 installed. If you get errors on starting it, this may be the problem.
You need to know the character's ID number which can be found in the savefile.

There is a lot still to do but let me know of any bugs, problems and suggestions.

Basic instructions:
  1. Place the program in your CK2 directory; the one ck2.exe is in.
  2. Run the program and select a savefile using the browse button, or type it into the text box.
  3. Type the ID of the character you want to generate genealogy for. This MUST be just a number. You can find the ID from your savefile.
  4. Press go, select a location to save and wait. It takes a few seconds to complete.

DOWNLOAD HERE: http://dl.dropbox.com/u/1867105/CK2%20Family%20Tree%20Maker.exe
 
I dunno what is wrong but it doesn't work.
Savefile: C:\Users\kemerover\Documents\Paradox Interactive\Crusader Kings II\save games\Spain1066_09_15.ck2
Character id: 2008
I click go, write name, click save and get error: Input string was not in a correct format.
Maybe is it because I use cyrillic Windows (FYI Windows 7)?
Log:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.FormatException: Input string was not in a correct format.
at System.Number.ParseSingle(String value, NumberStyles options, NumberFormatInfo numfmt)
at System.Convert.ToSingle(String value)
at CK2_Family_Tree_Maker.CK2_Character_Ops.loadCharacters(String filename)
at CK2_Family_Tree_Maker.Form1.button1_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.239 (RTMGDR.030319-2300)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
CK2 Family Tree Maker
Assembly Version: 0.1.0.0
Win32 Version: 0.1.0.0
CodeBase: file:///C:/Program%20Files%20(x86)/Steam/steamapps/common/crusader%20kings%20ii/CK2%20Family%20Tree%20Maker.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.235 built by: RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 built by: RTMRel
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.236 built by: RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

Anyway thanks for work!
 
Ooh, sounds interesting. I will have to try it. Since the game's announcement, I have been contemplating the inverse procedure. Do you think it possible to parse a GED file and turn it into CK2 character files? This would be an incredibly easy way to populate the game with historical figures. There are all kinds of well-researched royal GEDs out there.
 
I dunno what is wrong but it doesn't work.
Savefile: C:\Users\kemerover\Documents\Paradox Interactive\Crusader Kings II\save games\Spain1066_09_15.ck2
Character id: 2008
I click go, write name, click save and get error: Input string was not in a correct format.
Maybe is it because I use cyrillic Windows (FYI Windows 7)?
Log:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.FormatException: Input string was not in a correct format.
at System.Number.ParseSingle(String value, NumberStyles options, NumberFormatInfo numfmt)
at System.Convert.ToSingle(String value)
at CK2_Family_Tree_Maker.CK2_Character_Ops.loadCharacters(String filename)
at CK2_Family_Tree_Maker.Form1.button1_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.239 (RTMGDR.030319-2300)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
CK2 Family Tree Maker
Assembly Version: 0.1.0.0
Win32 Version: 0.1.0.0
CodeBase: file:///C:/Program%20Files%20(x86)/Steam/steamapps/common/crusader%20kings%20ii/CK2%20Family%20Tree%20Maker.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.235 built by: RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 built by: RTMRel
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.236 built by: RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

Anyway thanks for work!

The error, as you suspected, is that it can't convert the text you typed into the ID box into an actual number, probably because of the regional settings/differences. Unfortunately at your end it probably looks exactly correct. Try copying the ID from your post and pasting into the textbox? Or if you can think of another method to get text into the box that will be recognisable by the program, try that.

Ooh, sounds interesting. I will have to try it. Since the game's announcement, I have been contemplating the inverse procedure. Do you think it possible to parse a GED file and turn it into CK2 character files? This would be an incredibly easy way to populate the game with historical figures. There are all kinds of well-researched royal GEDs out there.

It is technically possible. Probably not even too difficult. The main problem is you'd have to go back through the generated files and add in all the detail; DNA, traits, stats etc. But it could be a way to build a basic skeleton.
 
The program seems to run just fine; and I've run into no errors. HOwever, whenever I load the gedcom files that the program creates, they all show up as blank, with no one/nothing in them. And I'm certain the character IDs are correct. Just to clarify though - are we putting the character ID of the origin or the end of the family tree?
 
The program seems to run just fine; and I've run into no errors. HOwever, whenever I load the gedcom files that the program creates, they all show up as blank, with no one/nothing in them. And I'm certain the character IDs are correct. Just to clarify though - are we putting the character ID of the origin or the end of the family tree?
You are entering the ID of the top character, the oldest. After you save the gedcom file, does the text on the program say any characters were found related to the one you entered? For example: "32 found related to 140" on mine. Also which program are you using to load the gedcom file?
 
OKay, I've gotten the issue sorted out, Subterranean - apparently my Gencom viewing program had an issue with the files; I changed to Genopro as mentioned n teh first post and it works out. I was using the topmost character (the dynasty founder in most cases). However I have an issue with it, namely that all ages are based upon the modern date, instead of the save date in the game - how would I go about adjusting that, or do I need to toy with death dates with all 'living' characters somehow, to avoid having 900+ year old peopel littering the tree?
 
OKay, I've gotten the issue sorted out, Subterranean - apparently my Gencom viewing program had an issue with the files; I changed to Genopro as mentioned n teh first post and it works out. I was using the topmost character (the dynasty founder in most cases). However I have an issue with it, namely that all ages are based upon the modern date, instead of the save date in the game - how would I go about adjusting that, or do I need to toy with death dates with all 'living' characters somehow, to avoid having 900+ year old peopel littering the tree?

I think I know one reason the files might not be working in other viewing programs and I'll work on that next.

As for the date thing, you can't code that into the gedcom files themselves. In genopro you can sort it by going to File->Properties and changing the Reference date for your tree to the ingame date of the savefile. I tend to just enter the year, but you can be more specific with day/month.
 
thanks for this. Just thought I'd post my family tree 50 years in, starting with my starting character. Right now I'm Eberhart von Weimar, the son of Kunigunde. I'm Duke of Bavaria and Messien, and my son is set to inherit those plus the Duchies of Gelre, Brunswick, and Saxony. I had to spend 30 minutes reorganizing the tree, it was a little jumbled. The names might be a little too small to read in the picture. fam_tree_von_weimar.png
 
Hey, I am encountering similar error as kemerover, even though I have an "ordinary" windows 7 (not cyrillic or made for any other special characters). Any idea where the problem could lie?
 
Hey, I am encountering similar error as kemerover, even though I have an "ordinary" windows 7 (not cyrillic or made for any other special characters). Any idea where the problem could lie?
Hmm odd, are you using version 0.1.1.0 (it should tell you in help->about)? Could you try entering ID 140 and see if that works? that should be William the Conqueror.
 
Hmm odd, are you using version 0.1.1.0 (it should tell you in help->about)? Could you try entering ID 140 and see if that works? that should be William the Conqueror.

Yes, it is 0.1.1.0 and William doesn't work either. What the program tells me is:

Code:
Unhandled exception has occurred in your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will close immediately.

Input string was not in a correct format.



See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.FormatException: Input string was not in a correct format.
   at System.Number.ParseSingle(String value, NumberStyles options, NumberFormatInfo numfmt)
   at System.Convert.ToSingle(String value)
   at CK2_Family_Tree_Maker.CK2_Character_Ops.loadCharacters(String filename)
   at CK2_Family_Tree_Maker.Form1.button1_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.261 (RTMGDR.030319-2600)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
CK2 Family Tree Maker
    Assembly Version: 0.1.1.0
    Win32 Version: 0.1.1.0
    CodeBase: file:///C:/Users/.../Documents/Paradox%20Interactive/CK2%20Family%20Tree%20Maker.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.235 built by: RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 built by: RTMRel
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.261 built by: RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
 
I used the CK1 version and loved it. However, I can't even get this version to download. It will put the 28 kb file in the selected download folder for a second and then it just disappears. I'm not sure why that is happening. I'm wondering if it's because it's a direct link to a .exe file. Any way to have an archived version available?
 
Here's why it's deleting, FYI. If no one here is having trouble with it then I guess I can trust it.

____________________________
Threat Details
Threat type: Insight Network Threat. There are many indications that this file is untrustworthy and therefore not safe
____________________________
Origin
Downloaded from http://dl.dropbox.com/u/1867105/CK2 Family Tree Maker.exe
http://dl.dropbox.com/u/1867105/CK2 Family Tree Maker.exe Downloaded File "ck2 family tree maker.exe"
(WS.Reputation.1) from: dropbox.com


ck2 family tree maker.exe
____________________________
File Actions
File: c:\users\jeff\downloads\ck2\ck2 family tree maker.exe
Removed
____________________________
File Thumbprint - SHA:
c10ea60d421612f839eba2b7d5fce1ca395f8ffa650ee1759ac6ff1171780be7
____________________________
File Thumbprint - MD5:
e7dee727c3a3e59c88008847861141fe
____________________________
 
I think I've tracked down the error some people are having, if they could re-download and try again. I also fixed a couple of other crashes that popped up so I'd re-download even if yours seems to be working.

I've added it to a zip if your having trouble downloading the exe file here: http://dl.dropbox.com/u/1867105/CK2%20Family%20Tree%20Maker.zip.
I have checked with various online virus scanners and it all comes back safe so I'm sure it is virus free. If anyone else has any virus/malware reports about it feel free to post them.