I have been developing a Savegame editor for the last couple of weeks. I’m a professional Software Engineer and I wanted to make the transition from C++ to C#... and this seemed like a good way to mix business with pleasure.
I have written my own Parser for CK game files, partly to help with the learning process and partly because I wanted more control than a third-party parser could bring. The Parser converts the savefile into a class library representing the game entities, and it writes it all back in the CK format (incorporating any changes made to the data).
I heard that some people were having problems with Character Pruners in 1.05, so tonight I thought I’d extend my library and create some pruning functionality. I managed to complete it, and lo and behold it seems to work. I pruned a file, and it ran in CK without any problems (I let it run on for a bit).
This is what it does:
1/ Deletes any character who is dead, and never produced any children
2/ Deletes characters who’s only children are those that have been deleted during the processing
3/ Deletes marriages involving the characters deleted
4/ Retains characters who are Attackers or Defenders in any wars stored in global data
I’m not sure about this final rule. The game may remove any wars involving dead characters, and if anyone knows if this is the case then please let me know. If no-one knows I will try and work this out myself by examining the files. I do not check Alliances and Truces because I assume the game removes them when a character dies.
Does anyone know of any other potential cross-references that I may not have accounted for?
I reduced a savegame file I had that was 22mb down to 13mb (I don’t wipe out white space) and pruned about 8000 of the 14000 dead characters. It’s pretty quick too… taking about 12 seconds on my pc (that includes the parsing of the file... the pruning on it's own takes about 2 seconds).
I haven’t written an interface for the Pruner yet, and when I do I will add an additional feature that allows you to exclude any characters belonging to a particular dynasty. This will allow your own Dynasty within the game to remain intact, in case you want to create full family trees (it will still destroy characters descending from the female line though… sorry but that would be very tough to implement).
The bad news with all this is that when I release this application (after some more testing) anyone who wants to use it will need to have the .NET Architecture version 2.0 installed on their machine. It’s a massive download… but useful for more than just this app I guess.
If anyone is interested in this application, let me know and I will try and get a verstion released. You might also like to provide some suggestions for some features you might find useful.
I have written my own Parser for CK game files, partly to help with the learning process and partly because I wanted more control than a third-party parser could bring. The Parser converts the savefile into a class library representing the game entities, and it writes it all back in the CK format (incorporating any changes made to the data).
I heard that some people were having problems with Character Pruners in 1.05, so tonight I thought I’d extend my library and create some pruning functionality. I managed to complete it, and lo and behold it seems to work. I pruned a file, and it ran in CK without any problems (I let it run on for a bit).
This is what it does:
1/ Deletes any character who is dead, and never produced any children
2/ Deletes characters who’s only children are those that have been deleted during the processing
3/ Deletes marriages involving the characters deleted
4/ Retains characters who are Attackers or Defenders in any wars stored in global data
I’m not sure about this final rule. The game may remove any wars involving dead characters, and if anyone knows if this is the case then please let me know. If no-one knows I will try and work this out myself by examining the files. I do not check Alliances and Truces because I assume the game removes them when a character dies.
Does anyone know of any other potential cross-references that I may not have accounted for?
I reduced a savegame file I had that was 22mb down to 13mb (I don’t wipe out white space) and pruned about 8000 of the 14000 dead characters. It’s pretty quick too… taking about 12 seconds on my pc (that includes the parsing of the file... the pruning on it's own takes about 2 seconds).
I haven’t written an interface for the Pruner yet, and when I do I will add an additional feature that allows you to exclude any characters belonging to a particular dynasty. This will allow your own Dynasty within the game to remain intact, in case you want to create full family trees (it will still destroy characters descending from the female line though… sorry but that would be very tough to implement).
The bad news with all this is that when I release this application (after some more testing) anyone who wants to use it will need to have the .NET Architecture version 2.0 installed on their machine. It’s a massive download… but useful for more than just this app I guess.
If anyone is interested in this application, let me know and I will try and get a verstion released. You might also like to provide some suggestions for some features you might find useful.