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

Beauclerc

Captain
37 Badges
Aug 26, 2004
398
5
  • Crusader Kings II: Reapers Due
  • Sengoku
  • 500k Club
  • Cities: Skylines
  • Crusader Kings II: Holy Knight (pre-order)
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Crusader Kings II: Conclave
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Res Publica
  • Cities: Skylines - Mass Transit
  • Crusader Kings Complete
  • Cities: Skylines - Green Cities
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Parklife
  • Cities: Skylines Industries
  • Cities: Skylines - Campus
  • Crusader Kings III
  • Deus Vult
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II
  • Europa Universalis III Complete
  • Europa Universalis IV
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • Heir to the Throne
  • Europa Universalis III Complete
  • Europa Universalis III Complete
The ckTrim application is now available: http://forum.paradoxplaza.com/forum/showthread.php?t=258610

This is a beta version so please be patient if there are one or two teething problems. I've tested the application on my own savegames and have yet to have CK fail on me as a result... so things are looking good and hopefully all will be well. The biggest question mark is the actual running of the application... always fraught with danger in a Windows environment.

There are two versions of the readme which has more detailed instructions.

I'd appreciate it if anyone who tries it and manages to run the application with no problems could just post and let me know.

It's worth noting that the summary of the old file size and new file size within the application is not yet working. So don't worry if it doesn't do anything!

I strongly advise that you Trim to a different file rather than overwrite the file you're trimming. While the trimming seems stable, I'd hate any of you to lose much loved campaigns. This is most certainly the case in the beta version

Happy Trimming...

Thanks
Beauclerc
 
First of all, the tool looks nice.

I used your tool on a number of may savegame files and it was unable to parse some of them. All of the files that couldn't be parsed are from the same game saved at different times during my campaign. I use several files to have a backup if savegame becomes corrupted.
 
Excellent - so it ran then. That's a good start. :D

Naturally, when I was testing the parser, I only had my files to go by and I did wonder if a certain game condition may cause a problem (didn't really expect it to though). For example, I found a problem at the very end of the file recently where the script was { { type = 12 id = 123 } }, so basically an object without an identifier.
 
Yes, it runs nicely and with the savegames that can be parsed and trimed, it's all over within seconds.

Anway, here is the popup window, if it helps:
ckTrim_err1.jpg


Oh, and if I click continue, it remains stuck (progress bar not moving).
 
Hmmm a duplicate key... that certainly would explain the problem. My parser assumes that duplicates are not allowed within types (so no characters with the same type and same id for example).

It'd be interesting to see which of your characters (or other game objects) break this rule.

Either way, I should have trapped the error... thanks for posting the message, as it gives me something to go on.

Edit: Having pondered I think the most likely problem area could be relations. I wonder if it's at all possible that a character may have an alliance, truce or marriage to the same person twice?
 
Last edited:
Fat: Thanks for sending the file. I have found the problem. You have a character (type = 4712 id = 382629) who was married twice to the same person... on the same day (type = 4712 id = 371142) :eek:

The character is called Zeno and he is the Count of Chandax. He was married to someone called Marium, and she died in 1192. I opened the savegame in CK and it's true... she's there... twice. In the file the marriages are right next to each other so I don't know what happened there.

Anyway, I removed one of the marriages from the file and the parser worked fine and it all trimmed down nicely too: trimmed down from 38mb to 19mb and wiped 22,000 characters. :)

Rather than me send you back the file, just open yours up, find the marriage with the above characters and delete one of them manually. Of course, if you want me to send the file back edited and pruned let me know.

As for the error... well, I'm not sure if I can count it as a bug in my parser - although I should provide more informative error messages for the full release.
 
No reason to send the file, I'll remove one of the marriages myself.
:cool:
 
I did what you suggested and it worked like a charm. New file is half the size of the old one and it loads in CK without problems. :cool:

This is definetely a bug in the game. There is one when a character gets two (or even more) wives if two marriage proposals are accepted on the same day. But with the same woman? Only AI can do that, because the player can send only one diplomatic proposal to another court, wait for the answer and then send another one. I wonder how often does this happen...
 
****UPDATE***

A new version of the ckTrim has now been completed. This fixes the bug in Crusader Kings (discovered by Fat) where characters can have multiple marriages to the same person, plus a couple of minor bugs found by me.

If you have the original version then download the new zip in the Download thread. Details of this new version are in the 2nd post.
 
So, what did you decide? Does ckTrim removes the duplicate marriage or leaves it in?
 
My trimmer works by marking the characters and marriages for deletion, and these are then excluded when writing back to the file. So for this problem the parser simply marks the duplicate for deletion before the trim process. So whatever happens the duplicate is removed.

So to answer the question... it deletes the duplicate marriage.
 
Beauclerc said:
Errrr no you don't, so maybe it was too troublesome for you to read the instructions properly. :rofl:

It's a zip, you copy the files to a directory... which ironically is precisely what you asked for.
I need the Windows Installer thingy to install the .NET framework. Incidentally, I'm a CCNA so no, I'm not a computer n00b. :rofl:
 
Beauclerc said:
Errrr no you don't, so maybe it was too troublesome for you to read the instructions properly. :rofl:

It's a zip, you copy the files to a directory... which ironically is precisely what you asked for.
It was me who asked for it. Anyway this tool works wonderfully. Great work.
 
mib said:
I need the Windows Installer thingy to install the .NET framework. Incidentally, I'm a CCNA so no, I'm not a computer n00b. :rofl:
I didn't say you were a computer noob tbf... but I did say that .NET 2.0 would be required in the prerequisites and in my original thread about my intention to do a character removal tool. It's not like it was a major surprise! :p

And I got you confused with ECLogo... who hates installers but put it aside to get .NET to run the tool. ;)