Project Zomboid

Project Zomboid

74 평점
Fix "Rip Clothing" Character Corruption
4
2
   
어워드
즐겨찾기
즐겨찾기됨
즐겨찾기 해제
파일 크기
게시일
업데이트일
229.668 KB
2023년 11월 16일 오후 12시 11분
2023년 11월 18일 오후 8시 48분
업데이트 노트 4개 (보기)

다운로드 위해 구독하기
Fix "Rip Clothing" Character Corruption

설명
When you favorite a recipe, the game saves the recipe name, outputs, and all possible ingredients to an identifier string on your character's save file.
If you have too many mods that add clothing items, the recipe to rip clothing can generate a string larger than 32767 bytes, which makes the game unable to load your save file, if you set it as a favorite recipe.
This generates an error on the log such as
java.lang.RuntimeException: invalid lua table type 99

This mod runs every identifier string through a simple hashing algorithm, which makes sure each identifier is of a predictable size, and, most importantly, smaller than 32767 characters. Your save file might even shrink by a couple Kb.
There will be a performance hit from running the algorithm, no clue how much though.


You should be able to safely add and remove this mod from a running save, and you should only lose your favorite recipes.
Note that this does not fix an already corrupted character.

This mod appends to the
ISCraftingUI:getFavoriteModDataString
method. If any other mod overwrites it, simply move this one later in the load order and it should keep working.

I've made a bug report here: https://theindiestone.com/forums/index.php?/topic/69331-favoriting-the-rip-clothing-recipe-if-you-have-too-many-clothing-mods-can-corrupt-your-character-data/
This mod is just a band-aid until this is fixed.

Workshop ID: 3085491446
Mod ID: fixRipClothingCorruption
댓글 22
cznorton2 2025년 7월 25일 오후 6시 10분 
Strange reply but ok...
Trigg  [작성자] 2025년 7월 15일 오전 11시 24분 
Thank you for the informative report, now I know exactly how to make it work!

...On a less ironic note, I have not tested this at all in B42 beta and it likely won't do anything at all.
Also, if you're on B41, make sure the mod is actually enabled.
cznorton2 2025년 7월 14일 오후 8시 44분 
mod doesn't work
Alyx 2025년 7월 4일 오후 3시 48분 
OMG you literaly save me! i have a big modpack testing, it works but cant load the character propely, u know the game tells you to make a new one, and your mod fix that, you my hero :8bitheart: thanks so much! :mbnyufufu:
123 2025년 2월 2일 오전 5시 38분 
这是做什么的 可以查看其他mod冲突吗
jeetrix 2024년 12월 28일 오전 3시 17분 
ty
Chertolet 2024년 12월 15일 오전 2시 45분 
It seems that it was the common sense mod, so this patch had nothing to do with it in the first place
Come and See 2024년 12월 10일 오후 12시 47분 
Ran into this same issue on my current save. I favorited rip clothing, reloaded, and bam I'm a NoneNone.
Trigg  [작성자] 2024년 12월 7일 오전 6시 37분 
The patch I did shouldn't be specific to just clothing, so if food cans are causing a similar problem then it must be something somewhere else; I'd need a save file to look for it, though.

Really, the root cause of the issue lies in the Java part of the code, which can't be patched with mods as far as I know.
Chertolet 2024년 12월 7일 오전 4시 39분 
For me there is also the same stuff going on with cans of food, no matter if they require an opener or no. It fixed the bug with clothing for me, but doesn't help with cans. Any idea on how to fix that without disabling all food mods as they didn't use to cause the bug before?