RimWorld

RimWorld

Savegame Shrinker
123 Comments
.:CHG:. Hope  [author] 11 Jul @ 5:58am 
@sel I believe I fixed this issue. Can you retry?
.:CHG:. Hope  [author] 11 Jul @ 5:56am 
Changes in v1.2.0: Added support for Rimworld v1.6. Added translations for ~4 B people. Fixed the BOM bug. Fixed a crashing bug. Fixed a bug that corrupted savegames if Rimworld had the same corpse listed multiple times in the savegame (only possible via bugged mods).
.:CHG:. Hope  [author] 11 Jul @ 5:52am 
@Mastar: I fixed the BOM issue corrupting some savegames on Windows systems. It took 573 days (1 year, 6 months, 25 days) for this bug to be fixed. It was not easy to find the solution. In the end, CodeRabbit AI found the bug during the code review for v1.2.0. ChatGPT 4.1 found the solution.
.:CHG:. Hope  [author] 10 Jul @ 12:22pm 
@Scorpio. No one has ever donated a DLC to me and I don't own any, so to this very day, I only mod on Core.
Scorpio 27 Apr @ 1:22pm 
dont use this if you have anomaly dlc or biotech it will fuck your save up
Alu 24 Apr @ 3:23pm 
To shrink saves you are deleting stiff from them
So by that fact
Repeatedly deleting stuff from the save makes it more likely to break somrtbing
harrydubois 24 Apr @ 9:00am 
I wonder, could you make multile "layers" of shrinking the same savefile?
Like, shrink a 100 mb savefile to 50, then that 50 mb savefile to 25 and so on?
Is it feasible? Does it break something? Should I even try it? Does it even *work*?
JazzimoX 21 Apr @ 4:31pm 
I just used the options marked as "safe" on a year-6 game and it shrunk the file from 106 MB to 105 MB. So glad I found this!
.:CHG:. Hope  [author] 11 Mar @ 10:51pm 
@Beagle It sounds like you're using Biotech DLC. For whatever reason, I've never bought a single DLC, and I still play Rimworld v1.2 almost exclusively. Afraid I can't help with that :-/
.:CHG:. Hope  [author] 11 Mar @ 10:47pm 
@nemyrol I lost a beloved ancient colonist who had died over 32 years in the past. I didn't realize that they were removed from the sarcophus until after I had deleted the orig savegame backup :-/ I've added this as a bug ticket. https://github.com/BetterRimworlds/RimworldSavegameShrinker/issues/2
.:CHG:. Hope  [author] 11 Mar @ 10:45pm 
@cykonetic Feel free to contribute time code on GitHub. It seems to be quite difficult to parse XML and do the calcs for Rimworld ticks to hours. Not worth it to me.
.:CHG:. Hope  [author] 11 Mar @ 10:44pm 
@Elmiorn: Great to hear! This mod has also fixed numerous peoples' saves when an extensive mod, like Combat Extended, or EPOE, are removed for whatever reason.
.:CHG:. Hope  [author] 11 Mar @ 10:35pm 
@Brad: Delete mothballed is disabled with a big warning by default for this reason. It should only be used in rare circumstances, for instance, when all your original colonists are dead. It basically resets the savegame to the initial state. I would never recommend doing this if you have even 1 colonist. It's meant for backwards compatibility with the original savegame shrinker.
Elmiorn 5 Mar @ 9:51pm 
Thanks, this fixed my save. I had a quest for an ancient complex, but the point (icon) on the map was not created. The quest could not be deleted, but each new similar quest (after the fest, in ideology) also turned out to be empty, without an icon on the map. Now everything works.
cykonetic 4 Mar @ 9:40pm 
"This mod removes every single message that is over 24 hours old. A downside is that these useless messages won’t appear as descriptions of Legendary Art."
Can this be modified to keep X number of events, timestamp ignored. Overtime, more older events will get forgotten but every now and then some artist may evoke some ancient tale?
Brad 16 Feb @ 4:41pm 
Always save before shrinking. Delete mothballed world can delete your pawns aswell
nemyrol 9 Feb @ 10:32am 
getting many errors/second after my sarcophagus' get emptied with the shrinking. any way to exclude colony pawns from getting deleted when erasing world pawns?
zlataribar 8 Feb @ 6:38am 
you're a saint sir, gave me back 300 tps of game speed on a 11 year colony
sadly some graves became empty but keeping tales and historical archives made sure most of the colony history remained intact, keep up the good work, will update if there happen to be problems
wizardofmagicmemes 27 Jan @ 11:17am 
I think this mod broke my save. I've had pawns that were perpetually stuck in labor because a pawn can't be generated to birth and I've never had this issue before using this. After saving and reloading this last time I got the notification that my colony is now dead despite my pawns still being alive. I went to the main menu and shrunk my save and when I went to reload it I got the screen that shows that mods have been added and removed even though I never added or removed mods. There have also been a few times where after shrinking my save there's just red "???" where the version should be in the menu. I also had an issue after the 2nd time I shrunk my save where all of my colonists constantly had the negative thought "My friend (insert their own name) died" so they were always sad about their own death. In the mod settings I only enabled the options that were labeled "safe". Does this delete data other mods might need to function properly and that caused my save to get messed up?
Megonaut 20 Dec, 2024 @ 1:46pm 
Just want to say THANK YOU!!! This saved a game that was very dear to me but one of my mods that alter a pawn's relationships on death was causing most pawns to not die properly. This fixed that and I'm very grateful.
Egalexandr 14 Dec, 2024 @ 9:43am 
the 'dangerous' option which is responsible for the issue - delete mothballed world pawns. Well its the most decreasing size thing, but it removes essential pawns(
Egalexandr 14 Dec, 2024 @ 9:26am 
mod needs a filter for world pawns (faction leaders). I used it with most options toggled on and factions leaders are gone... And no valid way to regenerate them except load previous save
endospore64 21 Nov, 2024 @ 6:49pm 
Great Mod! Save size down from 269 to 169! No more RimWorld slide show emulator here! Honestly thanks for sharing your mod on steam! Played for around 30 minutes and experienced no issues with the save.

Now, for those who might be having issues understanding how to operate the mod here is a simple walk through that a level 0 intelligence pawn could do it.

1) Subscribe to mod + Enable mod
2) Don't shrink yet
3) Load save, in game mod settings enable what you would like to shrink from your game
4) Save Game + Quit to main menu
5) On the save you are shrinking *HIT SHRINK ONCE* there isn't an indicator that it shrunk (Yet)
6) Go back to Main Menu
7) Go back to Load Game
8) Boom, honey I shrunk the save!

Just for clarity the only thing I enabled was remove dead world pawns. Hope this helps someone
Beagle 18 Aug, 2024 @ 4:00am 
I think I found a strange bug. When my mech still getting resurrect in mech gestator and I use this mod with Shrink Dead World Pawns option it's bug out my mechnitor, The option when you click on pawn were all gone like draft, mech group etc. and become an empty box
麻奥萨玛 6 Jul, 2024 @ 9:11pm 
Thank you, this saved my save. It has been reduced from 44MB to 22MB
Shayne 4 Jul, 2024 @ 12:48pm 
Is it possible to separate the Dead World Pawns into 2 categories: Actual People/Colonists and Animals/Insects/etc? In case we don't want to get rid of actual people? I've also seen people having issues when removing the world pawns.
Arira 16 Jun, 2024 @ 3:56pm 
Experiencing same bug with the colonist bar disappearing. Kinda sucks cause whole point of "shrinking the save file" is in clearing dead pawns.
Nihilus 12 Jun, 2024 @ 5:09pm 
Though, for whatever reason, enabling "Shrink Dead World Pawns" causes the colonist bar at the top of the screen to disappear, even if you have the colonist bar at the bottom right enabled. Not sure how the two are related.
Nihilus 12 Jun, 2024 @ 4:57pm 
CONFIGURE YOUR MOD SETTINGS! For whatever reason, the in-game Savegame Shrinker mod settings are all disabled. Once you enable the ones you want, it'll actually shrink the save (in my case, my save went from 70MB to 46MB)
Alu 21 May, 2024 @ 7:38am 
See theres a reason rocketman and perf analyzer dont remove things from the save
its not reliable
they just optimize functions cause its safe
Phoenix C64 21 May, 2024 @ 6:21am 
This mod has done for me what Rocketman and Dubs Perf couldn't: make the game playable again. I play long games and this is the only mod that fixed my lag problems.
HOWEVER I have a problem now, maybe you could help? When I use the mod now with the same settings than always, 2 things happen and I have to revert to the previous save: 1) character highlighting is turned off for some reason? 2) pawns, animals and enemies are suddenly invisible! if i pause the game and zoom in, i can see them, but otherwise no. what could be the problem?
archlva 16 May, 2024 @ 1:01pm 
You need to change it in the configs to reduce to size.
[REDACTED] 13 May, 2024 @ 2:49pm 
Doesn't work. Creates a smaller save file, upon loading said save file the old sizes appears ,nothing changes.

https://gist.github.com/HugsLibRecordKeeper/b7e0f3a03789119eaeed8e6e74743513
sel 13 May, 2024 @ 9:08am 
I have the same issue as everyone else of this just not working anymore. used to work before the 1.5 update.
Im running all the DLC, im on windows 10, the latest game version. when I shrink the save, it does nothing. it creates the new save that *should* be shrunk, but its the exact same filesize, and the game version is red question marks, and gives you a warning when loading it that it will not work.
Id share my savefile, but it has over 150 mods and more than a few custom-made local mods I run, so it would be of no use.
CloakTheMailman 10 May, 2024 @ 7:12pm 
Hmm so I'm using LTO colony groups and now whenever I do a savegame shrink, and load the shrunken save, the colony bars disappear and when I try to click on the empty bars I CTD, I'll try to provide a log once I launch the game and crash again
DAOWAce 9 May, 2024 @ 8:05pm 
Turns out BGC has the animal/stranger removal feature I wished for: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2982026860

Welp.
DAOWAce 9 May, 2024 @ 11:36am 
Wish this mod had more finer tuning, as something like this is extremely rare and useful.

Specifically I'd like to purge all dead animals without active family history (that chicken problem), similar to the strangers vs colonists. Not having either really sucks, as purging your own colonist history is probably not what players desire.

For the other things, it's just a one-click poof. I'd like to set date ranges, for example history older than x in-game years, notably for the "historical archive" system. 24h is really no time at all. As for keeping art history, is that even possible? Is any of this possible? I see the github #2 issue, so maybe?

Would love to update to 1.5 for the performance improvements Rimworld has desperately needed, but alas, many mods are still broken or won't be updated again, and still wanna continue my 1.4 save...
.:CHG:. Hope  [author] 6 May, 2024 @ 3:47am 
@T-362 Rimworld v1.5?
.:CHG:. Hope  [author] 6 May, 2024 @ 3:46am 
@123 Can you upload your savegame somewhere (original backup copy), preferably GitHub?
.:CHG:. Hope  [author] 6 May, 2024 @ 3:41am 
The only way for me to diagnose this is for people to create GitHub issues and attach their savegames (the backup original copy created by the mod). This mod does extremely advanced XML editing that by definition, the creators of Rimworld never envisioned, and to date, the only savegames I have to debug are my own, which include no DLCs, and relatively few mods that aren’t mine (Colony Manager, Replace Stuff, Wall Lights, and Harmony are pretty much the only mods not created by me that I use).
나일세 2 May, 2024 @ 1:19am 
@Risel96 Check the mod options
If the mod option is turned off, it has to be turned on to work
this comment using by translator
123 29 Apr, 2024 @ 10:27pm 
hi, when i use the remove dead pawn option the colonist bar gets dissapere and i tried everything the save shrunk bugs it...
Risel96 27 Apr, 2024 @ 11:05am 
The same problem as the commenters below
Does not clean up the save, but simply creates a copy
JakeSublime 16 Apr, 2024 @ 2:58pm 
this is also not working for me. it creates a backup of the save, but does nothing to the original seemingly.
T-362 16 Apr, 2024 @ 12:58pm 
Ok, cleaned evetything and tried once again - got this:

++++++++++ Shrinking SaveGame Аредер3.rws +++++++
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Error (string)
BetterRimworlds.SavegameShrinker.Patch_FileList:Prefix (RimWorld.Dialog_FileList,Verse.SaveFileInfo,UnityEngine.Rect)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:RimWorld.Dialog_FileList.DrawDateAndVersion_Patch1 (Verse.SaveFileInfo,UnityEngine.Rect)
RimWorld.Dialog_FileList:DoWindowContents (UnityEngine.Rect)
RimWorld.Dialog_SaveFileList:DoWindowContents (UnityEngine.Rect)
Verse.Window:InnerWindowOnGUI (int)
UnityEngine.GUI:CallWindowDelegate (UnityEngine.GUI/WindowFunction,int,int,UnityEngine.GUISkin,int,single,single,UnityEngine.GUIStyle)
T-362 16 Apr, 2024 @ 12:39pm 
Seems like it does nothing, it creates backup save but its with the same size as original, and iv got some 100+ MB files with many years of ingame time passed. Console also seems like doesnt show any errors related to this mod. Any advices how can i debug it?
Melvinthebirb 12 Apr, 2024 @ 5:33pm 
I was playing w/ this mod on 1.4 version (I'm using the previous version cuz I'm waiting for my fav mods to update) and this broke my game mid-playthrough :(

I had this mod enabled the whole time I was gaming, but after I shrunk the safe for the 1st time, my pawns were unable to haul any food/corpses to storage (it said it didn't have any zone available)
JerrBear888 20 Mar, 2024 @ 4:54am 
@Onframe46
when you encounter save file version is "???" ... for some reason at the beginning of file there are 4 spaces added before the "<" ... just delete the spaces, look at your red error log. only encountered this today while messing with Save Compressor and notepad++.
zeus 14 Mar, 2024 @ 8:19pm 
The tales are kept for the art of the furnitures, sculptures, weapons.
It should be safe to remove tales without reference (in save file, it means tales without <uses>INT</uses>).
Could you add an option to only remove those tales without reference?
.:CHG:. Hope  [author] 14 Mar, 2024 @ 5:51pm 
I’ve updated the mod to Rimworld v1.5.