Savefile Pruner

A fix for a bug causing savefiles to be excessively large (hundreds of megabytes or gigabytes). This bug will also cause long save/load times.

License: MIT

Game Version: 0.1.3.1

Downloads: 11,744

Author: Tortoise

Followers: 5

Outdated Mod

This mod is not known to work with the latest version of Kerbal Space Program 2. Proceed with caution.

ksp2-savefile-pruner

As of KSP2 v0.3.0, this issue has been patched by the developers of KSP2. However, if your save file is inflated from a pre-0.3.0 version, this program will still work.

This simple Python program is designed to solve a Kerbal Space Program 2 bug that makes the save file size balloon to hundreds of megabytes if not gigabytes, which can cause the save/load times to become very long. This issue is caused by repeated logging of the same event. This program deletes the repeated entries.

Disclaimer

Creating a savefile backup is strongly recommended before running this program. While I do my best to make this program safe to use, it is not guaranteed to be stable. The best way to prevent this is to keep a save of the game before this program is ran. If you encounter any issues after running this program, open a GitHub issue.

Running the Program

Prerequisites

If you haven't already, install Python 3.11 at python.org.

Then, download the code by clicking on Download. Finally, extract the zip file.

Inside Kerbal Space Program

Launch Kerbal Space Program 2. Open the save with the ballooning save file, and press F5 to quicksave. This will be the save to modify.

Then, press escape -> load and take note of the two circled values.

The upper circle highlights the campaign name, and the lower circle shows the name of the save you just created. You will need these values for the next step.

Prune the savefile

Run main.py and type the name of the save file to prune (this will be the quicksave created in the last step). Then, click the "Prune" button and the program will lower the save file size.

An example input to the program to prune a save file named quicksave_1035 with a campaign named Default:

Error: Could not find savefile name inside campaign

If you encounter this error, it is likely the name or capitalization of either the campaign name or the save name is incorrect.

This error will also occur if you are not on Windows.

If both of these values are correct, please open an issue.

Final Steps

Finally, load your pruned savefile and you're done.

Contributing

Contributions are welcome, just make a pull request.

Loading changelog...

Stats for Savefile Pruner

Downloads over time

Downloads per version

New followers per day

Top Referrers

  1. spacedock.info
  2. www.google.com
  3. forum.kerbalspaceprogram.com
  4. www.reddit.com
  5. sd-prod-live.52k.de
  6. duckduckgo.com
  7. sd1b.52k.de
  8. www.google.de
  9. yandex.ru
  10. www.google.ca

Export Raw Stats

Export Downloads

Export Followers

Export Referrals

Raw stats are from the beginning of time until now. Each follower and download entry represents one hour of data. Uneventful hours are omitted.