-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[KKS][MainGameOptimizations] Avoid error when saving more than 2 GB in the main game #63
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems fairly fragile, wouldn't it make more sense to fix the mentioned hook inside ExtendedSave instead? When I wrote it I assumed that save data would never be larger than a few hundred MB at worst so it is not optimized at all.
The proper fix would be to patch the save lambda with a transplier and write extended data there, like it's done for character data.
I get an exception on MemoryStream in GetBytes, I can't call GetBytes.
I thought it was awesome when I heard that his saved data exceeded 2GB.
Is this the lambda of the save? Maybe you haven't seen the KK version?
Is this? |
Delete the current ExtendedSave.SaveDataSaveHook patch and add a transpiler to add extended save data behind WorldData.cs:272 in KKS?
|
Yes, that would be the best way to do it I think. The issue I had was that different versions of the game (with or without EX) have different names for this lambda ( Edit: Something like this could be used to see what method is called by IllusionFixes/src/KKS_Fix_ShowerAccessories/KKS_ShowerAccessories.cs Lines 27 to 46 in df5a3f0
|
No, that method may not extend the data size limit. I tried it with 500MB of data at hand, and the data stored in the added area was quite small, probably mostly heroine's data. |
Oh, you're right, the data is added to the characters and not to the save file itself. I believe no other plugins other than ExtendedSave patch or use the |
How's that? |
#197) Fixes failing to save the game when used character cards take up more than 2GB in total when serialized. Discussion at IllusionMods/IllusionFixes#63
When saving saved data in the main game, there was a problem with not being able to save the data when there were many characters and the size exceeded 2 GB. If it looks good, merge it.
If the maximum number of characters is set and the number of costumes is increased continuously, 2 GB is reached.
Fixed to bypass the process via MemoryStream and write directly to the file.
This problem only occurs with KKS.
KK does not go through MemoryStream.
This modification was made at the request of a commission from BitMagnet.