goatfungus / NMSSaveEditor

No Man's Sky - Save Editor
1.91k stars 240 forks source link

Game timestamp location may have changed #1111

Open the-bloke opened 3 days ago

the-bloke commented 3 days ago

NMS may have changed the way they record date/time and this could be causing issues with the Save Editor. The below refers to PC, both Steam and GOG. After the Worlds1 update, I noticed that NMS had added a "TimeStamp" to the save game files. I believe the game now uses this new "TimeStamp", not the Windows "Date Modified" timestamp as previous. See here


JSON save.hg/ BaseContext/ PlayerStateData/ "TimeStamp"


Date/Time is in Unix format, E.g. 1728973718 (15 Oct 2024, 17:28) I use http://www.timestamp-converter.com/ for conversions...

the-bloke commented 3 days ago

Added screenshot of NMSSE and JSON NMS_Timestamp-changes_In-Game_20241015

ihleslie commented 2 days ago

The TimeStamp entry corresponds to the NMS save time, but is not updated by the save editor upon saving. You may well be right that this is the source of inconsistency. UPDATE: I opened up the save, edited the TimeStamp to the current time, and then saved it. This did not effect the time shown on the NMS game selection window, nor seem to have any obvious effect. It would seem that the time is kept elsewhere.

the-bloke commented 2 days ago

ihleslie is correct, I've since checked and the game timestamp does seem to be elsewhere. Well done ihleslie.

I also had a long look at the save.hg and I can't find anything that could be a "Save Game" timestamp. If it's not in the save.hg it may be in the mf_save.hg (I can't open that). I doubt if it would be in accountdata and mf_accountdata as they are not always saved with the save game.

What I did find was 1,000 "Timestamps" to do with "BaseBuildingObjects" & "PersistentPlayerBases". 1,591 timestamps shown as "TS" to do with "DiscoveryManagerData". And, these: "MaintenanceInteractions": [ { "InventoryContainer": { "LastUpdateTimestamp": 1696816759, "LastCompletedTimestamp": 1696816368, "LastBrokenTimestamp": 0, "DamageTimers": [

I hope the above is of some use...

ihleslie commented 1 day ago

I thought that maybe NMS was just reading the Creation date/time, rather than the Modified date/time that corresponded to saving with the editor. I use Total Commander which allowsed me to change the Creation date time to match the Modified date/time. I had my hopes up, but no joy. The old time was still there in the NMS save select window.

I have some old saves that a copied in and NMS got their date/time but save some names were missing. That might be some sort of incompatibility. Bottom line is that I have no real idea where that save select window info is kept, nor what triggers NMS to update it.

wkitty42 commented 16 hours ago

Bottom line is that I have no real idea where that save select window info is kept, nor what triggers NMS to update it.

i suspect there is a specific JSON field for these timestamps... the trick seems to be figuring out which field NMS is using...

what triggers it to update is easy... every time a save is made, the timestamp for that event is updated in the JSON... this applies to both manual and automatic saves... NMS loads the newest file for the Slot from the Game Slot Selection screen...

as an old coder, i'm guessing that NMS opens each Game Slot's two save files to read the saves' default save name, the player's custom save name, the player's location in the save, and the timestamp of the Slot's save files... it selects the newest save file for each Slot and then sorts the list of Slots by timestamp, newest to oldest, to present to the player...

using file system timestamps is generally fine but in some cases, is not a GoodThing because they can be modified outside of the game/application which may lead to timing related bugs depending on how/where they are used... NMS apparently did use the file system timestamps at one point but it looks like it is now using internally stored timestamps from the JSON files...

HG could be having a poke at us, too, by not using an obvious field name for the timestamp of the save... where ever it is stored, i would think it would be near where the save's in-game name is stored...