Star Hype News.

Premium celebrity moments with standout appeal.

general

Why are only some savegames compressed?

By Sophia Vance

I've just noticed that some .ck2 savegames take more or less 10x of some others, during the same match (~45MB vs ~4.5MB).

I've tried to compress them, and the bigger one compresses down to a little smaller than the smaller one (~4MB), while the smaller one stays the same. This is a very strong indication that the smaller one is compressed.

Now… why are some of them compressed and some others aren't. Which causes that? Is that a "quick save" vs. "regular save" behaviour?

Can I somehow compress the uncompressed ones, so that they are still directly readable by the game?


I've noticed that the uncompressed ones are text files, while the compressed ones start with the code "PK", so I've listed its content using unzip and it gave a somewhat promising result:

-rw------- 1 lohoris wheel 46122334 Dec 26 16:25 Eire1127_08_25.ck2
-rw------- 1 lohoris wheel 4498940 Dec 26 16:25 Eire1125_08_17.ck2
lohoris@Pirenne:/tmp$ unzip -l Eire1125_08_17.ck2
Archive: Eire1125_08_17.ck2 Length Date Time Name -------- ---- ---- ---- 45466533 00-00-80 00:00 Eire1125_08_17.ck2 109 00-00-80 00:00 meta -------- ------- 45466642 2 files

However I wasn't able to uncompress them from command line:

lohoris@Pirenne:/tmp$ unzip Eire1125_08_17.ck2
Archive: Eire1125_08_17.ck2 skipping: Eire1125_08_17.ck2 need PK compat. v4.6 (can do v2.1) skipping: meta need PK compat. v4.6 (can do v2.1)

At this point I got lost trying to uncompress it, so before investigating further I'll just wait to see if someone already has some answer.


So, let's recap, questions:

  • in which circumstances does the game sometimes create compressed files, sometimes uncompressed?
  • can I turn the uncompressed ones into compressed, so that the game natively reads them correctly (obviously I can compress and decompress them, that's not what I'm asking)
7

1 Answer

By default Crusader Kings 2 compresses (a) ironman games and (b) non-ironman games saved using the "Save Game" menu item. There is an unlabeled checkbox (checked by default) that controls the latter.
CK2 manual save UI showing unlabeled checkbox

It does not compress non-ironman games saved by other means. That is, games saved using "Quick Save", "Save & Quit" and auto saves aren't compressed. Enabling "Compress Autosaves" setting in the "Game" options will compress any future auto saves, but "Quick Save" and "Save & Quit" will still create uncompressed saves.

To compress an existing uncompressed save simply load it in the game and then save it again using "Save Game". You can also create compressed save files on the command line, but you'll need a a version of the zip command that supports bzip2 compression. Something like this:

zip -m -Z bzip2 -X mysave.ck2 autosave.ck2

The -m option causes zip to delete autosave.ck2 after it compresses the file. Don't try give the compressed save game the same file name as the uncompressed save. If you want it to have the same name just rename it after compressing it. The -X option tells zip not to include file meta data (eg. permissions) that seem to confuse Crusader Kings 2, at least on Windows.

Another option, if you're using Windows, is to enable NTFS folder compression on the game's save game directory. Windows will then automatically compress all files in the folder automatically, though not as well the game would. There might be similar functionality available for Mac OS X and Linux.

2