RimWorld

RimWorld

Save File Compression
47 Comments
AmCh  [author] 8 hours ago 
RimSort Update: You can now import mod lists by "File -> Import -> From Save File" on RimSort v1.0.48 or later. This is via a change I submitted to RimSort's side. Other supports have been included since v1.0.44.
---
RimSort更新:现在使用RimSort v1.0.48以上版本可以通过"文件->导入->从游戏存档导入"来加载模组列表了。我给RimSort提交的编辑申请已经通过。其余功能支持已经在v1.0.44添加。:steamhappy:
https://github.com/RimSort/RimSort/pull/1388
pillbug2 28 Sep @ 8:56pm 
Very nice work. This is essential.
VitaKaninen 13 Sep @ 4:01pm 
Nice! Thanks so much!
AmCh  [author] 13 Sep @ 3:22pm 
@Starempire42
Yes, I wrote a patch for them and they've merged it, now RimSort v1.0.44 is compatible with saves from this mod :steamhappy:
-----
我给RimSort那边添加了编辑修改,v1.0.44以后版本的RimSort完全兼容这个模组压缩的存档了。
Starempire42 13 Sep @ 2:26pm 
Do correct me if I am wrong though
Starempire42 13 Sep @ 2:26pm 
I do believe they have added compatibility with this mod after the newest rimsort version :D
AmCh  [author] 13 Sep @ 2:25pm 
@Tyrant
That is planned! I will add it at some point.
Tyrant 13 Sep @ 1:51pm 
I'm hoping to see a batch compress/uncompress feature like RimKeeper at some point.
AmCh  [author] 12 Sep @ 11:35pm 
Mod updated to version 1.0.1: Attempted to fix some multi-threading issues I suspect.
模组已经更新至1.0.1版本:尝试修复了一些我怀疑存在的多线程崩溃错误。
Consho 12 Sep @ 8:50pm 
@AmCh Thank you bro!
AmCh  [author] 12 Sep @ 8:30pm 
@Consho
Glad to hear that it worked! :steamhappy:
AmCh  [author] 12 Sep @ 8:29pm 
@Consho
About the crash: I have been suspecting there being a crash due to RimWorld 1.6's multithreading, and while I was never able to reproduce it myself, I tried fixing it in Version 1.0.1... hopefully that's solving the problem. I will upload it to the workshop soon.
About different format: RimWorld only searches for and processes .rws save files, while I can try to save it with a different file extension name, that means patching a lot of RimWorld code that risks breaking things, so I figured that keeping it as .rws is the safer option. Even though it's in .rws, you can still open it with right-click - open with [file archiver] if they support the compression format.
Consho 12 Sep @ 8:25pm 
Okay, I understand a few things now. The mod seems to be working fine, thank you mod author!
AmCh  [author] 12 Sep @ 6:43am 
模组1.0.1版本已经上传 GitHub [github.com]供测试!如果没人报新错的话我24小时内更新创意工坊。
存档兼容(这个模组设计一开始就准备了一直往回兼容存档的)。
尝试“修复”了几个可能由于1.6多线程而出现的“错误”,同时添加了更多错误日志记录选项。但如果评论区的大家只说“用不了”却不给错误日志的话,我只能盲猜着去修……
AmCh  [author] 12 Sep @ 6:43am 
Mod version 1.0.1 is now available on GitHub [github.com] for testing! I will update to workshop in ~24 hours if no error is found.
Save-file compatible (this mod is designed to always be save file back-compatible).
Tried to "fix" a few “errors” that I suspect may exist due to 1.6's multi-threading, also added more logging. But without logging from you all, I am basically blind when it comes to trying to fix anything...
AmCh  [author] 12 Sep @ 6:17am 
@ghostyboo29
Any log messages?
ghostyboo29 12 Sep @ 5:14am 
I think my game broke
AmCh  [author] 11 Sep @ 7:30pm 
@Consho
I don't play with that mod so I cannot guarantee it, but it should be compatible, as that mod seem to remove data while in game normally, while this mod only runs while saving/loading the game.
Consho 11 Sep @ 5:23pm 
this is compatible with Better GC: Mothballed and World Pawns? ( https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=2982026860 )
AmCh  [author] 11 Sep @ 1:59am 
@2974356490
有报错日志吗?看一下
2974356490 10 Sep @ 5:27pm 
添加这个模组后,读取之前的存档会崩溃,移除后又恢复正常了。
AmCh  [author] 10 Sep @ 10:59am 
@Corpse
好耶ヽ(✿゚▽゚)ノ
Corpse 10 Sep @ 7:37am 
好东西!尤其对于我这种存档癌患者:steamhappy:
AmCh  [author] 10 Sep @ 12:00am 
@Revolus
Ahh that's good to hear! TIL if you switch to Gzip, RimSort already works.
Python 3.14 is scheduled to be released on Oct 1st, or they can introduce a dependency for zstd.
I can look into submitting a PR to them for zstd.
Revolus 9 Sep @ 5:29pm 
RimSort already understands gzip compressed save files: https://github.com/RimSort/RimSort/blob/d7b5e38e757b24733416f813425ac503b449579a/app/utils/xml.py#L165C5-L192 . Python 3.14 added zstd support, so maybe the RimSort devs would be willing to add support for zstd compressed save files.
AmCh  [author] 9 Sep @ 2:20pm 
@Starempire42
Unfortunately, RimSort won't be able to import the modlist from a compressed save file, so you'd have to save it as RimSort's text modlist instead.
That is something I can't do anything about (unless I submit code edit requests to RimSort's devs directly) because a mod can only change what's in the game, not an external tool like RimSort.
Starempire42 9 Sep @ 12:36pm 
Got a question, is this compatible with rimsort mod manager? (from what I have seen it mostly Is compatible, it just has a problem with grabbing the modlist from a save file that has been compressed) Not sure if thats something I am supposed to ask you or them about it.
AmCh  [author] 9 Sep @ 5:51am 
@狼雨歌
好的~我自己猜着改了改代码,但如果没法复现问题的话,也就暂时没法确认我是不是改好了/w\
狼雨歌 8 Sep @ 9:12pm 
非常抱歉,无法给出错误log,今天开电脑测试了下,现在反而正常保存了,尝试按照昨天的环境(包括mod列表等)进行操作,没有复现昨天出现的一直保存中...甚至闪退或白屏的问题:steamfacepalm:
debug我会一直开着,哪天遇到了这个问题时再提交log,可以吗?
AmCh  [author] 8 Sep @ 2:57pm 
@狼雨歌
那应该可以排除我引用的库的问题了,大概率是我写的代码有什么特定情况出现的BUG。方便的话还麻烦分享一份报错记录~(方便的话在模组设置里面先打开“详细日志”再尝试保存)
(有一个可能是我这个模组为了支持显示统计数据,会用模组设置文件保存一份存档压缩的统计数据,如果存档保存完了,但保存统计数据因为什么原因卡住了的话……就会出现你遇到的情况)
狼雨歌 8 Sep @ 2:14pm 
Windows 11 IoT 企业版 LTSC 24H2,已经测试了,你说对了,只要用了这个mod,三种保存方式都会出问题(奇怪的是,Gzip和原版保存方式,多等一会儿就已经保存下来了,但仍然会显示保存中...并且依然会闪退或白屏无响应),卸载此mod反而能正常保存,没有其他问题
AmCh  [author] 8 Sep @ 8:42am 
@狼雨歌
你用的是什么操作系统/什么架构呢?之前看到过另一个类似模组在ArchLinux上面会出错,我自己不了解这个但只能从这块先怀疑一下了。我自己在Windows 11和Ubuntu 24.04上面测试都没发现问题……
如果不是操作系统跟引用的压缩库冲突的话,如果出现zstd保存不了的错误,那Gzip / 原版应该也会一样出错才对……
狼雨歌 8 Sep @ 4:20am 
没整明白到底哪里会让游戏无响应,zstd格式,无论调最高的17还是最低的1,只要保存就会一直在保存中...等10分钟仍然是保存中...,动一下鼠标会闪退或白屏并提示无响应,错误log的话,那就是保存设置时会弹红字...但应该跟这个没关系吧,如果有需要,我会发过来
AmCh  [author] 8 Sep @ 4:19am 
@keepercraft It did!
Thank you (and Revolus) for your works and the original idea.
keepercraft 8 Sep @ 12:46am 
I hope my code help :hardhat:
VitaKaninen 7 Sep @ 6:28pm 
Thanks!
Revolus 7 Sep @ 6:19pm 
@VitaKaninen, yes, the compression can be disabled and re-enabled in the mod options.
VitaKaninen 7 Sep @ 5:30pm 
If I want to edit my save file, is there a way to disable the mod while the game is running and then make a normal save file?
PKPenguin 7 Sep @ 4:57pm 
I suppose this would come with the downside of making manually editing your save more difficult
PAMPERS 7 Sep @ 1:14pm 
900 mods daaum wow
AmCh  [author] 7 Sep @ 11:16am 
@PanicOregon281
While I can't share my personal modlist (it contains some mods that I've edited for compatibility, performance, etc.), I can recommend you this mod collection that's been working fairly decently! and my own mod list shares a lot with this one: https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3507289931
nil 7 Sep @ 11:13am 
yrol i really hope that's a joke lolllll
PanicOregon281 7 Sep @ 10:04am 
can you throw me your personal modlist? fiddling with mine to dig out some performance issues, and 32+GB ram allocations.
Yrol Akiyama 7 Sep @ 9:51am 
"...but they can get to hundred(s) of Megabytes in size."

°grins°

HUNDREDS of MEGABYTES?

Good Lord! Do you mean they won't fit anymore onto a Floppy-disk?

Oh...
wait...
Games are commonly 50+ GIGAbytes big these days, some even 150+.
And you can buy 16 TERAbyte hardplates for 200 bucks.


°winks° and i use 7-Zip anyways, 45 MB RWS savefile > 5 MB 7Z-file, took 5 seconds.
Plus, i can compress multiple folders. So all my customized content (Configs, Ideologies,
Scenarios, Blueprints, CharacterEditor files, Xenotypes, Prepare-xy files can go to the
savefilezipfile that use them.


"4. Free and open source."

I am sorry, i _must_ take that as a joke and/or a hint to the Skyrim-Mod-Selling-Disaster. :o)
It feels like a Game being advertised with "Free updates!"

This is not an assault, i just stumbled about a few things that made me think :oD
It is ALWAYS good to have many options, many mods and possible ways to do things.
AmCh  [author] 6 Sep @ 5:26pm 
@Revolus @тетеря, блин
Thank you both for the nice words, and thank you Revolus for the mod idea! :steamhappy:
Revolus 6 Sep @ 4:07pm 
30 % smaller and quite a bit faster than my mod (Savegame Compressor)! Thank you for the mod, very well done!
тетеря, блин 6 Sep @ 7:38am 
potentially good for saving SSD's life.