ck3-save-updater

Thinning a save’s population (a diagnostic)

tests/one-offs/thin_population.py writes a copy of a save with fewer characters. It is a diagnostic, not an update rule: the copy is for testing, not for playing. It answers questions like “does this hitch, or this slowdown, get smaller when the save has fewer people?”. It is not part of migrate, and it never changes the save you give it.

python -I tests/one-offs/thin_population.py "Campaign.ck3" "Campaign__no-prunable.ck3" --mode prunable
python -I tests/one-offs/thin_population.py "Campaign.ck3" "Campaign__few-dead.ck3" --mode dead
python -I tests/one-offs/thin_population.py "Campaign.ck3" "Campaign__half-commoners.ck3" --mode living-half --seed 1

With the optional tools add-on, ck3update tools run thin_population "Campaign.ck3" "Campaign__no-prunable.ck3" --mode prunable runs the same script.

The modes

In dead and living-half, a character is also kept when a section of the save mentions them whose references this tool does not know how to remove, such as secrets, schemes or wars. Each run lists how many were kept, and why.

What goes with a removed character

Every reference to them goes too, so the copy has no links to people who are not in it:

The tool prints the counts: characters removed per section, characters kept per reason, records deleted, and references dropped per field. It then runs the lint’s checks on the copy and prints the number of errors, which should be 0.

Limits