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

Kliwarrior

General
85 Badges
Oct 27, 2003
2.165
1.970
  • Hearts of Iron IV: No Step Back
  • Hearts of Iron IV: By Blood Alone
  • Stellaris: Synthetic Dawn
  • Stellaris: Distant Stars
  • Europa Universalis IV: Dharma Pre-order
  • Crusader Kings II: Holy Fury Pre-order
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Distant Stars Pre-Order
  • Europa Universalis IV: Rule Britannia
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Hearts of Iron IV: Expansion Pass
  • Crusader Kings II: Jade Dragon
  • Europa Universalis IV: Dharma
  • Hearts of Iron IV: Death or Dishonor
  • Steel Division: Normand 44 Sign-up
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II: Monks and Mystics
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Lithoids
  • Victoria 3 Sign Up
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Europa Universalis 4: Emperor
  • Battle for Bosporus
  • Crusader Kings III: Royal Edition
  • Crusader Kings III
  • Imperator: Rome - Magna Graecia
  • Stellaris: Federations
  • Hearts of Iron IV: La Resistance
  • Europa Universalis IV: Rights of Man
  • Stellaris: Ancient Relics
  • Imperator: Rome Sign Up
  • VtM - Bloodlines 2 Blood Moon Edition
  • Hearts of Iron IV: Expansion Pass
  • Imperator: Rome
  • Imperator: Rome Deluxe Edition
  • Europa Universalis IV: Golden Century
  • Crusader Kings II: Holy Fury
  • Stellaris: Megacorp
  • Europa Universalis IV
  • Victoria 2
  • Rome Gold
  • Europa Universalis: Rome
  • Victoria: Revolutions
  • Europa Universalis IV: Res Publica
Based on the parsing library of Klas (ck-clean) but having using a different approach to the Character Removal problems, I wrote this small tool, ck-purge.

The algorithm.
Imagine the genealogy trees of CK. How to remove the "dead branches" , that is those characters that don't affect inheritance?
The characters that can be safely removed are for sure the Dead Childless Characters (DCC ;) ) If he is a DCC, he can be removed without changing any inheritance of titles. After their removal, some other characters could have become DCC, because their children were removed, so the program removes them too, and so on, recursively, until there are no DCC around.

The program.
The zipfile contains the program itself and the cygwin1.dll . The best thing is to put those in the same directory. Usage is simple.
ck-prune oldsavegame -o newsavegame
Please note that if you use the same name for old and new files, your old file will be lost forever.
You can find a sample output of ck-prune just below

The Download,
You can find ck-prune here

Feedback, suggestions, complains etc..
Please feel free to make suggestions, criticize and pin point errors and issues, about ck-prune :)

ciao :rolleyes:

UPDATE: 07/24/2006: changed the link to work again..
Update: 11/12/2006: changed the link againg....

Code:
C:\Lorenzo\Game tools\CK>ck-purge.exe "Kingdom of Hungary_1154_February_23.eug" -o new.eug

Reading CK savegame.....................................................
Number of marriages read: 5060
Number of characters read: 23660
Number of titles read: 1109
Number of claims read: 5295
Finding relationships between characters...
Removing characters, marriages and claims
....Number of characters removed: 6650
Checking again...
....Number of characters removed: 2758
Checking again...
....Number of characters removed: 966
Checking again...
....Number of characters removed: 332
Checking again...
....Number of characters removed: 107
Checking again...
....Number of characters removed: 42
Checking again...
....Number of characters removed: 15
Checking again...
....Number of characters removed: 13
Checking again...
....Number of characters removed: 5
Checking again...
....Number of characters removed: 3
Checking again...
....Number of characters removed: 2
Checking again...
....Number of characters removed: 2
Checking again...
....Number of characters removed: 1
Checking again...
....Number of characters removed: 0
Done
Number of marriages removed: 1124
Number of claims removed: 418

Writing CK savegame.......................
Done!
 
Last edited:
Good algorithm...

Bravo, and Thank you. ;)

I will test it.
 
Last edited:
hochmeister said:
Sorry but how does it work? I've installed it in the same saves folder, swithc the purge.exe and nothing happens? :confused:

What am I doing wrong? :(

Thank you

Use the command prompt! ;)
 
I had thought myself about such an algorithm, but I'm not a Windows expert... Good job, will try this evening. Ah, & I'm bumping that for keeping it high.....
 
Solmyr said:
Any chance of adding an option to remove only unconnected dead characters? I'd rather keep all my dynasty branches around, even the dead ones.

What do you mean with "unconnected"?
Just characters without neither any children nor any parents (e.g. a random courtier that didn't get married)?

yes I can add a flag for this .. stay tuned for more :)
 
Kliwarrior said:
What do you mean with "unconnected"?
Just characters without neither any children nor any parents (e.g. a random courtier that didn't get married)?

yes I can add a flag for this .. stay tuned for more :)

I thought CK purged those automatically?
 
Fornadan said:
I thought CK purged those automatically?

Hm.. I don't know..
Ck-purge does (if it finds any). But Solmyr wishes to have ONLY those removed, if I well understood.
 
Wow! My 1366 Lower_silesia game went from 58 megs to 20 megs!!!!! impressive... And this should be playable again. 1001 thanks!
 
Galleblære said:
Use the command prompt! ;)

I'm very sorry, but what's the command prompt? :confused: Yes, I know this may be a silly questions in this forum, but I would like to test it. Are you talking about the .exe file? :(

Just another thing. I manipulated all my save files to erase some dangerous enemy armies. I used the notepad. Thy work normally but they look different now, thery are indeed notepad files. Can it be the reason it doesn't work? :confused: :(

Thank you very much in advance.
 
hochmeister said:
I'm very sorry, but what's the command prompt? :confused:

Start -> All programs -> Accessories -> Command Prompt

This start 'ye old dos prompt. ;)
 
For the happyness of Solmyr, I added a -m option to remove just the minimum of characters: dead, childless, without any parents.
This remove less the 2% of characters, anyway.
 
Kliwarrior: I downloaded and followed your instructions (syntax identical to your example), but for some reason, I keep gettting this message:

"In file ck-reader.c, in function read_savegame:
CKlib: Couldn't open the save game file."

Any idea what I'm doing wrong? I'm on Windows XP using the 11/18 beta patch.

Thanks in advance for your help.
 
curtwine said:
"In file ck-reader.c, in function read_savegame:
CKlib: Couldn't open the save game file."

Is the savefile in the same directory of ck-purge ?
Did you use the "..." if the name of the savegame contains any spaces ( i.e. "King of France_1253_December_22.eug" ) ? The ".." are mandatory in that case.