Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Codex Overhaul (05/11/24)

Author Topic: Save game loads state of many hours before  (Read 629 times)

Seleukus

  • Ensign
  • *
  • Posts: 20
    • View Profile
Save game loads state of many hours before
« on: September 03, 2019, 01:14:17 PM »

    Hello. I have a habit of saving very often, but I actually don't load often, specially on exploration trips.
    I spent the whole of Sunday exploring a big chunk of the sector and now, Monday, I decide to load game again and it's many hours out of date.

    In Main Menu, save game says Level 40, Cycle 210, and I remember I had more than 3 million credits.
    When I load the game, I am at a state of Level 36, Cycle 209 and I have 2,4 million credits.

    I estimate I lost game progress of 50 stars explored plus combat, trade etc.

    • Is there a known issue where the save function can stop saving the game itself, but keep updating some metadata?
    • Any idea how I can prevent this issue in future?
    • Is there even any reason to assume this is mod related?

    Savegame:
https://drive.google.com/open?id=1tHjk5KPYmtw30ervMmcMeelPiK4MYlHq

Modlist:
Quote
{"enabledMods": [
  "$$$_lightshow",
  "anotherportraitpack",
  "istl_dam",
  "diableavionics",
  "sun_fuel_siphoning",
  "GalatiaC",
  "Grand Sector",
  "kadur_remnant",
  "lw_lazylib",
  "leadingPip",
  "ArkLeg",
  "MagicLib",
  "Neutrino",
  "$$rebalanced_pilums",
  "shadow_ships",
  "swp",
  "bonomel_skilledup",
  "speedUp",
  "sun_starship_legends",
  "sd_sundiving_1.1",
  "Sylphon_RnD",
  "vayrasector",
  "vayrashippack",
  "audio_plus",
  "shaderLib"
]}
[/list]
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24248
    • View Profile
Re: Save game loads state of many hours before
« Reply #1 on: September 03, 2019, 01:35:04 PM »

Hi - looking at your save, there's an extra file there: campaign.xml.inprogress. I believe that file contains your actual, latest save data, and if you were to remove (or rename) campaign.xml, and then rename campaign.xml.inprogress to campaign.xml (i.e. just remove the .inprogress part), you would get your latest state, as the date of that file seems to match the date of descriptor.xml, which is the file that's used to store the savegame's metadata.

The way the saving process works is it writes the save data to two files - descriptor.xml.inprogress (for the metadata) and campaign.xml.inprogress (for the actual save data). Then it moves the existing save to descriptor.xml.bak and campaign.xml.bak (so there's a backup of the save before) and removes the .inprogress from the new files, so that they're what gets loaded next time you load.

What this means is that, somehow, the game 1) was able to rename descriptor.xml.inprogress -> descriptor.xml, but then 2) was unable to do the same for the campaign.xml.inprogress file, but also did not generate an error. That's... really odd. There's a bit more error-checking I can do here, but if there's some reason the game is unable to rename files (i.e. the OS is preventing it for some permissions-related reason, say, or something else has it open) what the game can actually do to address this at runtime is limited. Other than popping up an error message, that is.
Logged

Seleukus

  • Ensign
  • *
  • Posts: 20
    • View Profile
Re: Save game loads state of many hours before
« Reply #2 on: September 03, 2019, 02:11:56 PM »

It worked!!! I renamed the file as you said and I was able to restore an entire days worth of progress!
I'm extremely thankful! You're awesome!

Even if it hadn't worked out, I'd still be very thankful for the response. I didn't think the savegame could be fixed!

I wish you the best!
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24248
    • View Profile
Re: Save game loads state of many hours before
« Reply #3 on: September 03, 2019, 02:22:02 PM »

Thank you for your understanding! Really glad you got it working, losing progress like that really feels bad.

Btw - if you do a "save copy" instead of pressing F5, I *think* this sort of issue would be less likely. That said, it's the first time I've seen this specific issue be reported, so I can't be too sure either way.
Logged