Save files are corrupted

+
Code:
Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

00800AF0  95 43 6F 6D 70 6F 6E 65 6E 74 73 53 74 61 74 65  •ComponentsState
00800B00  53 79 73 74 65 6D FF FF FF FF 2E 03 00 00 F9 70  Systemÿÿÿÿ....ùp
00800B10  A4 01 13 01 00 00 8E 43 6F 6D 70 6F 6E 65 74 73  ¤.....ŽComponets
00800B20  53 74 61 74 65 2F 03 00 00 FF FF FF FF FD 70 A4  State/...ÿÿÿÿýp¤
00800B30  01 D1 00 00 00 9A 43 61 6D 65 72 61 43 6F 6D 70  .Ñ...šCameraComp
00800B40  6F 6E 65 6E 74 52 65 6E 64 65 72 4C 61 79 65 72  onentRenderLayer
00800B50  FF FF FF FF FF FF FF FF CE 71 A4 01 3E 00 00 00  ÿÿÿÿÿÿÿÿÎq¤.>...
00800B60  21 83 7F 00 45 4E 4F 44                          !ƒ..ENOD

800B60 = 8391520 which is greater than the original file size limit of 8388608 :)

That said there is absolutely nothing you can do about the corrupted saves, they are gone because the end of the file actually contains a lot of critical shit (which is kind of a bad design tbh) so there will be no way to recover these saves.
That is clear but what i mean is, as we Edit the values of the save sizes can anybody say that they are work as intended?
 
If someone could make a video tutorial of what @zorba1138 is saying to do that'd be really helpful. If I make the .ini file with the code from above, I should be able to create saves over 8.192mb and be able to load them properly correct? Please let me know if I'm understanding this right.
 
To solve this issue create a new ini file in \game_dir\engine\config\platform\pc

And add the following section

Code:
MaxProfileSize = 4194304
MaxSaveSize = 8388608
MaxSaveSizeTotal = 12582912
MaxSettingsSize = 4194304

I've doubled all the values to:

Code:
MaxProfileSize = 8388608
MaxSaveSize = 16777216
MaxSaveSizeTotal = 25165824
MaxSettingsSize = 8388608

Hey,
I created a new .ini file (named save.ini) with the header [GameServices] and I pasted the new values below, I restarted the game and I loaded an "old" save before the corruption (sav.dat was at 8.189Kb, this save works) and then I crafted some things, I saved and tried to load this new save => Corrupted.

I also tried to delete my new .ini (save.ini) and add the code directly on gameservices.ini and I did the same test (load the old save, craft, save, load new save) and the new save was corrupted too.

So this seems not to work for me, maybe I did something wrong.
 
user.ini



[GameServices]

;
MaxProfileSize = 8388608

;
MaxSaveSize = 16777216

;
MaxSaveSizeTotal = 25165824

;
MaxSettingsSize = 8388608

The user config need to be placed here:

steamapps\common\Cyberpunk 2077\engine\config\platform\pc

How big is your save right now? and could you provide it to me so i can test around?
 
That is clear but what i mean is, as we Edit the values of the save sizes can anybody say that they are work as intended?

This is the hex dump of the end of a save larger than the limit that works, so yes it does.

As far as working as intended goes the bigger the saves are the longer the black screen you get before the loading graphics loads anyhow, so I have no idea how big the saves can get before there are problems outside of the files being corrupted due to the cut off there might be an actual reason behind the limit other than this was simply the limit all RED engine games had in the past.
 
user.ini



[GameServices]

;
MaxProfileSize = 8388608

;
MaxSaveSize = 16777216

;
MaxSaveSizeTotal = 25165824

;
MaxSettingsSize = 8388608

The user config need to be placed here:

steamapps\common\Cyberpunk 2077\engine\config\platform\pc

How big is your save right now? and could you provide it to me so i can test around?
This was tested like, 15, 20 pages ago. It does not work. Neither does manually editing the cyberpunk exe to change the same variables.
 
Well, PixelRick yesterday checked the corrupted save and his tool showed that it's corrupted in items node so I don't believe you can restore corrupted save files.
 
This is the hex dump of the end of a save larger than the limit that works, so yes it does.

As far as working as intended goes the bigger the saves are the longer the black screen you get before the loading graphics loads anyhow, so I have no idea how big the saves can get before there are problems outside of the files being corrupted due to the cut off there might be an actual reason behind the limit other than this was simply the limit all RED engine games had in the past.

Right now i couldnt test, what works and not my savegame is 3,9mb right now and yestarday i tried to get it bigger and i reached the hardcap of the inventory and the file went to 4,9mb and the only thing that happens the loading times of the inventory was over a Minute. The question right now is what in the game does the save game bload?

This was tested like, 15, 20 pages ago. It does not work. Neither does manually editing the cyberpunk exe to change the same variables.

I didnt read the full topic so thanks to bring this up. So it seems its definetly deeper into the code of the game
 
This was tested like, 15, 20 pages ago. It does not work. Neither does manually editing the cyberpunk exe to change the same variables.

Yes indeed I did the test and published the offset to edit, I have bumped the Max* values up to 100MB in the exe fie directly because it had no effect on the *.ini file, this was indeed correctly interpreted in the game but unfortunately the save stop at 0x800000 octet. You can find the informations in my post history if you want to give a try
 
@zorba1138
Doesn't work for me. Still caps at 8 388 608 Bytes.
Do you have steam or gog version? Do you run the game from the launcher or directly through exe? Do you have other custom ini files? What's the name of your text editor? Notepad++? Character encoding UTF-8?
P.S. Weird thing, I crafted a lot of katanas in a save from previous posts and it decreases the size.
 

Attachments

  • ManualSave-99.zip
    5 MB · Views: 89
Yes indeed I did the test and published the offset to edit, I have bumped the Max* values up to 100MB in the exe fie directly because it had no effect on the *.ini file, this was indeed correctly interpreted in the game but unfortunately the save stop at 0x800000 octet. You can find the informations in my post history if you want to give a try
Yes and it's good that this doesn't work, because this is something only CDPR can provide a fix for and once they do, the change on the ini-file or executable (if it was effective) could cause an incompatibility problem with CDPR's officiall solution/patch, causing your safe files to be stuck compatible only with the old patches.

They will surely investigate the bloating issue as well, at least I hope so. We have to be patient at this moment.

Cheers
TalentX
 
Here is my temporary solution.

The issue is that the save files are cut off at 8MB which means that they are corrupted because the data is cut off and you basically get no EOF. It is not the load that corrupts the files, it is definitely the save.

Bad save:

Code:
Offset(h)
007FFF50  61 74 61 80 01 00 00 FF FF FF FF 9F DE BF 00 EC  ata€...ÿÿÿÿŸÞ¿.ì
007FFF60  00 00 00 88 69 74 65 6D 44 61 74 61 81 01 00 00  ...ˆitemData....
007FFF70  FF FF FF FF 9A DF BF 00 1C 00 00 00 88 69 74 65  ÿÿÿÿšß¿.....ˆite
007FFF80  6D 44 61 74 61 82 01 00 00 FF FF FF FF C5 DF BF  mData‚...ÿÿÿÿÅß¿
007FFF90  00 1C 00 00 00 88 69 74 65 6D 44 61 74 61 83 01  .....ˆitemDataƒ.
007FFFA0  00 00 FF FF FF FF F0 DF BF 00 59 00 00 00 88 69  ..ÿÿÿÿðß¿.Y...ˆi

Good save:

Code:
007FBE40  78 B9 A4 01 13 01 00 00 8E 43 6F 6D 70 6F 6E 65  x¹¤.....ŽCompone
007FBE50  74 73 53 74 61 74 65 C0 02 00 00 FF FF FF FF 7C  tsStateÀ...ÿÿÿÿ|
007FBE60  B9 A4 01 D1 00 00 00 9A 43 61 6D 65 72 61 43 6F  ¹¤.Ñ...šCameraCo
007FBE70  6D 70 6F 6E 65 6E 74 52 65 6E 64 65 72 4C 61 79  mponentRenderLay
007FBE80  65 72 FF FF FF FF FF FF FF FF 4D BA A4 01 3E 00  erÿÿÿÿÿÿÿÿMº¤.>.
007FBE90  00 00 A1 74 7F 00 45 4E 4F 44                    ..¡t..ENOD

Besides the rest of the save that might be missing all good saves must end with 45 4E 4F 44 which represents the end of the file.

To solve this issue create a new ini file in \game_dir\engine\config\platform\pc

And add the following section

Code:
MaxProfileSize = 4194304
MaxSaveSize = 8388608
MaxSaveSizeTotal = 12582912
MaxSettingsSize = 4194304

I've doubled all the values to:

Code:
MaxProfileSize = 8388608
MaxSaveSize = 16777216
MaxSaveSizeTotal = 25165824
MaxSettingsSize = 8388608
Well, I suggested this about 20 pages ago and it didn't seem to work for those that tested. I'm curious now why it works for you.
 
December is really the worst time to release a game or buy a newly released game. People will have to research, experiment and speculate in the darkness while a reply or fix is postponed till January due to holidays.

I came to regret for my hasty purchase as I come visit this thread daily to see if CDP talked about it or it people found a workaround while my game waits and my hype languishes. We're truly living in the era of "buy a year later with no bugs at a massive discount".
 
Last edited:
user.ini



[GameServices]

;
MaxProfileSize = 8388608

;
MaxSaveSize = 16777216

;
MaxSaveSizeTotal = 25165824

;
MaxSettingsSize = 8388608

The user config need to be placed here:

steamapps\common\Cyberpunk 2077\engine\config\platform\pc

How big is your save right now? and could you provide it to me so i can test around?

Just to add to the pile:

I've tested this by increasing all these values to 16MB and 24MB respectively.

I've used a savegame from this thread (can't remember which post it was from, I'm really sorry) that was near the 8MB mark, around ~7.94MB. I then crafted a bunch until I was at 7.99MB and saved again.

Now I tested every method of altering these values that I could find in this thread.

Editing the .exe itself, using ini files and I tried to force it ingame with the "Cyber Engine Tweaks"-tool from nexus/yamashi.

First I tried every method separately, then I tried to mix it up, using two different methods at once and finally everyone at the same time.

Every single time new saves that had reached the 8MB mark got corrupted and couldn't be loaded anymore.
 
Okay, I started a fairly extended testing that's gonna take me forever to do (but I'm having fun, so, don't worry about it).
Basically, I restarted a NG but this time, I'm keeping a very close track on the savefiles for every steps (I broken it down to quests).

I'm doing minimum inventory management and dismantling/selling to keep a relevant pace.

My idea here is to see what happens if you play the game by following all the theory we've established in this topic and see if it helps.

So, here are the rules:

I copy reproduced the build and difficulty level of my previous run (that's an important part since I still have the savefile of my previous game to compare. this is also the reason why I'm trying to follow the same quests in roughly the same order).

-I'm not doing any crafting.
-I'm only picking up uncommon and higher rarity items. In fact, I'm always picking those items up unless it breaks the next rule.
-I never stack more than 20 units of any consumable (in fact, I'm trying to keep it up to 10 but it's sometimes difficult to do since the game sometimes throws 3-6 items of a kind and I kinda need to survive here lol).
-I get rid of everything I don't want immediately after I complete the quest and wait 48h to purge the memory. I keep my inventory as clean as possible.
-I'm not doing any NCPD mission/random events for 2 reasons: a/Because I did barely any in my other run and b/Because it's extremely easy for those quests to go into full chaos, allerting the NCPD and killing civilians, thus increasing the random factor which I want to keep to an absolute minimum.
-I kill every enemies, if possible.
-I do my best to do a quest as soon as I reveal it (if I got a call from the person who give it to me? Consider it done).

Just in case it matters but I don't think it does:
Difficulty: Hard
Lifepath: Corpo
Female V

Now, here's what I've got so far (in the future, I'll make a link to the previous "episode" as I update my progress).

-Beggining (saved after character creation, as soon as I could control V).
savefile: 1069kb
Inflation: 0kb...Or +1069kb, depending on the point of view
Playtime: 0

-First quest (up to Jackie waiting for me eating outside)
Note: I skipped the tutorial
savefile: 1459kb
Inflation: +390kb
Playtime: 0:57

-The pickup part 1 (up to meeting Jackie in front of Maelstorm's)
Note: Includes meeting both Stout and Evelyne
savefile: 1633kb
inflation: +174kb
Playtime: 1:18

-The pickup part 2 (Finished the quest)
Note: Gave the virused shard and took out Royce
savefile: 1795kb
Inflation: +162kb
Playtime: 2:43

-Sidequest "Many ways to skin a cat"
Note: I died once. I was attacking from the roof and didn't expected the IA to use the staircase to flank me XD
savefile: 1847kb
Inflation: +52kb
Playtime: 3:24

-Sidequest "Paid in full" (I walked around to pick up a few items)
savefile: 1872kb
Inflation: +25kb
Playtime: 3:37

- Sidequest "Burning desire"
savefile: 1896kb
Inflation: 24+kb
Playtime: 4:02

-Sidequest "Fight for the Cheetah"
savefile: 1930kb
Inflation: +34kb
Playtime: 4:20

This testing can be used to compare savefile with different playstyles, even though it's impossible to be accurate since everyone is gonna do things in a different order, it can serve as a base.

It can also be used to test different section while following different behaviours (at least you know how much my file grown during each step).
 
Last edited:
Hey there peoples :D

Just hopped in here to say I did receive a short but reassuring reply on the ticket I sent in.

Thanks for your message.

Really appreciate dedicating so many resources for tests and analysis. Thank you for that!

I can assure you that we are aware of this issue and looking into it, but I'm afraid I'm not able to share any details for now.

There you go! :) Some appreciation to everyone here doing their bits to get this attention and to get this problem as clear as we possibly can. And a "We know and are looking into it".

Cheers,
 
Hey there peoples :D

Just hopped in here to say I did receive a short but reassuring reply on the ticket I sent in.



There you go! :) Some appreciation to everyone here doing their bits to get this attention and to get this problem as clear as we possibly can. And a "We know and are looking into it".

Cheers,
Good news! Thanks!
 
@Azulath @FlorettaV I've skimmed about halfway through this thread and have yet to see any mentions of the fact that the save files are compressed so I'll outline my findings here.

They've got a short fixed header, a list of chunk extents, and then LZ4-compressed chunks each representing 256 KiB of decompressed data.

Direct measurements of file size are unfortunately not indicative of how the actual decompressed save may change in size, as small variations in game state may affect the compression ratio. You would have to sum up the decompressed size of the chunks to determine how large the decompressed payload actually is.

For example, I looked at the uploaded saves of @Duskguy and @EnnyRose earlier in this thread:
EnnyRose's file is just shy of 8 MiB and contains 32298362 bytes (30.8 MiB) of payload across 124 chunks.
Duskguy's file is truncated at 8 MiB and should contain 46313601 bytes (44.2 MiB) of payload across 177 chunks of which only 61 are intact. Those 61 chunks represent just 16252928 bytes (15.5 MiB) of payload.

While EnnyRose gets a nice 4:1 compression ratio, Duskguy has just around 2:1. Something about their dataset is quite a bit less compressible.

What really baffles me though is that as they're compressed, it's not the size of the actual save that is necessarily limiting here, but the size of its compressed representation.
 
@Azulath @FlorettaV I've skimmed about halfway through this thread and have yet to see any mentions of the fact that the save files are compressed so I'll outline my findings here.

They've got a short fixed header, a list of chunk extents, and then LZ4-compressed chunks each representing 256 KiB of decompressed data.

Direct measurements of file size are unfortunately not indicative of how the actual decompressed save may change in size, as small variations in game state may affect the compression ratio. You would have to sum up the decompressed size of the chunks to determine how large the decompressed payload actually is.

For example, I looked at the uploaded saves of @Duskguy and @EnnyRose earlier in this thread:
EnnyRose's file is just shy of 8 MiB and contains 32298362 bytes (30.8 MiB) of payload across 124 chunks.
Duskguy's file is truncated at 8 MiB and should contain 46313601 bytes (44.2 MiB) of payload across 177 chunks of which only 61 are intact. Those 61 chunks represent just 16252928 bytes (15.5 MiB) of payload.

While EnnyRose gets a nice 4:1 compression ratio, Duskguy has just around 2:1. Something about their dataset is quite a bit less compressible.

What really baffles me though is that as they're compressed, it's not the size of the actual save that is necessarily limiting here, but the size of its compressed representation.

It would be nice to figure out which parts are easier to compress/compress more. I can imagine that either the items or the actual game state are easier to compress and could therefor take more actual space.

Though in the end I think it's to be expected that, when you are using a limited buffer to store data in, you compress the data before you actually feed it to the buffer. Otherwise you'd end up with a very weird situation.

Am I overlooking something very important here?
 
Top Bottom