goatfungus / NMSSaveEditor

No Man's Sky - Save Editor
1.63k stars 229 forks source link

Clone/Transfer Base? #319

Open Infinality opened 3 years ago

Infinality commented 3 years ago

So, I have heard that NMS stores other players' bases in your XML when you visit them. I have an old account on my PS4 that has a ton of bases I'd like to transfer to my PC account. If I visit my PS4 bases as a "friend", I'm wondering if there is a way to use the XML data from that save to copy/clone the base to my PC user. It's not clear to me where the base data is stored in the JSON editor, otherwise I'd tinker with it myself. Base backups appear to be in binary format, so it wasn't helpful in trying to determine the location in the XML.

ukmerlin commented 3 years ago

The bases are only stored while in a system with other users or if they were uploaded, they are not persistent. In the editor you can go to edit local JSON and scroll down to persistent player bases.

Infinality commented 3 years ago

So, I visited my PS4 base as my PC user, and saved the file on PC. With the editor, I found the "PersistentPlayerBase" spot in the JSON, and the PS4 base I want to take over. I changed the LID, UID, USN, and PersistentBaseTypes (and not TS) to match an existing base I own on PC. Saved and loaded it, but the base still appeared to be owned by my PS4 user when I checked the base computer. Also, I noticed that the base is missing most of the objects that are supposed to be there. I'm wondering if NMS servers "know" that the base is supposed to be owned by my PS4 user and somehow override it.

"RID":"", "Owner":{ "LID":"REDACTED", "UID":"REDACTED", "USN":"REDACTED", "PTK":"ST", "TS":REDACTED }, "Name":"REDACTED", "BaseType":{ "PersistentBaseTypes":"HomePlanetBase" },

Infinality commented 3 years ago

I'm wondering if I could somehow get the full PS4 base to save in my PC XML file, then I could delete the base on PS4, create a new base computer in the same spot on PC, and fill the contents of the PersistentPlayerBases[n] with the saved XML objects.

Novoca1n3 commented 3 years ago

It wouldn't make sense for that to work otherwise it would allow people to steal your bases. What you could do is use Blender and the NMS Blender Plugin (NEXUSMODS) to copy items between bases. You would still need to delete the PS4 base if you wanted the new base in the same location

ukmerlin commented 3 years ago

I am not sure how they amalgamated the server activities between platforms but the other user is correct that you would not be able to just relabel all the parts to be the PC user. Also, there are many places that references are made and stored for construction and for user base information, for example it is used in a separate place to keep track of places to teleport to. Honestly after my own gaming experience in NMS it is well worth abandoning and starting over somewhere else with new ideas.

ukmerlin commented 3 years ago

Another approach would be to find the base in the JSON, copy it out to blender and combine it with the new base computer. Easily done in PC, not so sure about other platforms.

Infinality commented 3 years ago

Yeah, the first problem for me is getting the whole PS4 base to actually get saved in the PC JSON. Only a handful of objects were visible. I was hoping that with the Next Generation update, that they would let you port your saves to any platform, but it looks like it is only to their next-gen equivalents.

Infinality commented 3 years ago

I know there are tools to extract out the PS4 save file, but from the looks of it, it's an extremely complex process that makes me question how much porting these bases over is really worth. Would be nice if HG let you "gift" or sell bases to each other.

Devilin-Pixy commented 3 years ago

Your initial approach to copy the JSON for a specific base while 'visiting' is correct, 'if done right'. You should be able to basically create a new copy of the base at the exact same location with the required data to match your PC user account. However, and I can't recall from testing as it has been a while, but I believe there are checks in place for a base to render. This means your new PC base at the exact same location will likely not show as long as your PS4 base still exists. It likely requires the PS4 base to be deleted first if using the exact same location. Deletion can only be done by the owner (you) in-game using your PS4 account.

As a check, you could alter the Base Computer coordinates to be out of 'base range' (like 1000u or so) and see if it then renders nearby. It will not quite render correctly though. as orientation gets messed up and it may end up inside terrain.

If parts are missing when visiting, this will of course be reflected in the JSON. Maybe fire up your PS4 and join yourself through PC to see if the data fully loads. Else, the use of the Blender Base Builder plugin as suggested, may certainly be of use in that case, as you might be able to add the missing parts.

I'd suggest to first get the base data complete, before deletion with your PS4 account. On the other hand, if the base is finished, I would likely leave it as is, as it will save you space in your current PC save(s). As an avid Base builder myself, I find having multiple accounts very useful ;-)