Deweh / CyberCAT-SimpleGUI

A simplified offshoot of SirBitesalot's CyberCAT.
MIT License
232 stars 44 forks source link

Cannot revert appearance to Female Gender body after changing to Male-crashes game #30

Closed INsaneyAC closed 3 years ago

INsaneyAC commented 3 years ago

I was trying to figure out the Panam romance and it only works with a male Gender body type. I used this editor to make the change which works fine. However if you save into another save file after changing from female to male, then try to use the save editor to load your original female body preset the game will just crash on attempting to load the altered save file. I tried this again on a save file from a different playthrough with the same result. Steps:

  1. Load save file in the save editor with Female V playthrough.
  2. Edit appearance of Body Gender from Female to Male (customized or default made no difference).
  3. Load this altered save file in Cyberpunk 2077 game.
  4. Save this in game onto a new save file (or overwite an existing save).
  5. Open this new save in the save editor, edit the appearance back to Female V (I used my unique Female V preset from each playthrough to same result).
  6. Save the altered file in the save editor.
  7. Load this new altered save file in game.
  8. Game crashes.
Deweh commented 3 years ago

I went through your reproduction steps with multiple saves on my machine and didn't run into any crash. Could you attach your save file & preset?

INsaneyAC commented 3 years ago

Here are 2 different saves I used as starting points. You can just save a preset from the save file and switch to default male and back, but here are the preset files I got out of the Save Editor. Cyberpunk 2077 saves.zip Saved Presets.zip

(Save 56 will take a while to load the first time as it is affected by the crafting bug file size bloat from 1.06)

INsaneyAC commented 3 years ago

If it matters, I have Cyber Engine Tweaks installed along with Brain Dance Protocol, Simple Menu and Toggle Vehicle Summon mods for CET. The only texture mods I have are a no nude texture replacer and female feet texture replacer along with some vehicle retextures. Edit: I removed all these mods and tried to reproduce the issue and it still flatlines the game when I reproduce the steps, so it has nothing to do with having the mods installed. Perhaps some alteration to my game has affected things, but the save file loads fine after changing to Male body, it only has issues after changing back.

INsaneyAC commented 3 years ago

Cyberpunk 2077 altered saves.zip Just figured I would also send the save files altered by save editor. Save 139 is after changing to a Male body-all defaults. This save loads fine for me. Save file 154 is after reloading the female preset from 144. This is the save that flatlines the game. You can compare 154 to 144 to see what the difference is. Technically these 2 save files should be identical.

Deweh commented 3 years ago

This is quite an oddity. All the gender fields are changing properly, but it is crashing with those saves for some reason. Perhaps changing to male in that part of the storyline causes some quest facts to be flipped, but when you switch back to female the game gets confused and crashes? Not sure. I'll need to look further into it.

INsaneyAC commented 3 years ago

Ok, I tried it on a brand new playthrough and the switch back to female worked just fine. So I guess there is something else in the later game save file that doesn't change properly during the switch back. I will try some more experimenting to see if I can't narrow it down. But literally the only change I made in those previous save files was swapping between the original character, to default male and back to the preset of the original character. Whatever gets flipped seems to miss changing an item back to the way it was, or it changes something it shouldn't.

INsaneyAC commented 3 years ago

I found the 2 manual saves on my current playthrough between which the glitch is applied to the save file. Unfortunately they are 30 hours apart, but I will try to run through all the missions and gigs again that occurred between the 2 save files to see if I can find the facts that are causing the issue.

INsaneyAC commented 3 years ago

Ok, I found that the gender change glitch occurred after completing Gig: Radar Love. I've attached the save files before Radar Love (153), after radar love (155) and a broken save with a conversion to male and back to female after Radar Love (154). I included the female appearance preset I used (male was just all defaults). I created the quest facts text files and included those for saves 153 and 155. I created a excel file to catalog the differences in the quest facts. I don't think the facts with just value changes matter, but I included them. I will try tomorrow just manually adding each quest fact to see if I can narrow it down to the fact that is causing the problem, if it is indeed a quest fact that is the problem.

Quest facts created by radar love -- | -- Hash | Quest fact name | value 100367346 | ina_09_start | 1 365484973 | #ina_04_car_down | 1 430050354 | ina_04_car_segment_start | 1 1475492243 | #ina_04_v_in_car | 1 2525625649 | ina_04_finished | 1 3005445114 | #ina_09_ready | 1 3018386939 | ina_04_cars_in_chase | 1 3242921261 | ina_04_combat_started | 1 4019915525 | ma_bls_ina_se5_18_start | 1

Quest facts with value changes: -- | -- | -- Hash | Quest fact name | old value | new value 403605544 | bls_achievement | 12 | 13 449039703 | ma_resource_tutorial | 93 | 94 2209736921 | holo_dakota_calls_v_end_count | 15 | 17 3855223748 | holo_dakota_calls_v_start_count | 15 | 17 Radar Love breaks.zip

INsaneyAC commented 3 years ago

Well, I don't think it is specifically the presence of any facts that breaks the save file. I started with the broken save file after "Radar Love" and removed each fact that was new one at a time to isolate its effect on the file, to no effect. So I removed all the facts that were new and reverted all the changed values so the quest facts were now identical to what they were before Radar Love but the file still won't load. I had previously removed all inventory from my player and that didn't prevent the glitch. I can't rule out cyberware as I can't remove that, but it didn't cause the glitch before Radar Love was played through.

So it seems the presence of the "Radar love" quest facts has an effect on the save editor program when it rebuilds the save file with a female gender body type after having been changed to male. (If you change a fact as a female body type and save the changes, the file loads just fine). That is my best guess as I can't think of anything else to test, and I am no programmer.

For now I will just use a male body type to find the quest facts for Panam's romance and then add those facts to my save file without altering the gender.

Thanks for looking at this.

INsaneyAC commented 3 years ago

Here is the final broken save (154) I made after Radar Love but with all new quest facts removed. It should be identical (except some inventory) to save 153 which is the save before Radar love was played through. Radar Love.zip

Deweh commented 3 years ago

I don't believe it's CyberCAT.Core (the library that handles parsing & rebuilding save files, developed by the WolvenKit team) causing this issue, as changing gender only requires a simple CName change. However, the save file in its entirety is not yet parsable (things like questContent, etc. can still only be read as raw binary data), so the game could very well be changing anything which is in turn causing a crash.

With the currently available knowledge of CP2077's save structure, this issue seems to be unresolvable. However, I'll keep this open for future reference if any new developments are made. Thank you for the report, and the plethora of additional information.