codengine / SOTFEdit

A Sons of The Forest Savegame Editor
MIT License
104 stars 6 forks source link

Planter plants mixed up? #21

Closed hatesigningup closed 10 months ago

hatesigningup commented 10 months ago

v0.11.16

Downloaded and installed the .16 update today and used it to finish a structure that was being reported as "unfinished" (no idea why, I couldn't find it in my build!), and set Kelvin & Virginia's health and affinity settings to high.

Saved and loaded the edited game and somehow all the plants in my planter boxes were all mixed up - ie they were all there but the wrong plants were in the wrong boxes (I plant them in a certain order).

Don't know if it's a me problem or not, so if anyone else is seeing this, please drop a line.

Regards.

codengine commented 10 months ago

Hi, can you attach your savegame so that I can have a look?

hatesigningup commented 10 months ago

Hi Stefan, SOTFEdit_2023110100.zip 2023110100.zip

tried to upload the entire folder but GitHub limits it to 25mb. Attached is the backup that SOTFEdit made (SOTFEdit_2023110100.zip), and then the whole folder minus the SOTFEdit backup zip (2023110100.zip).

Regards.

codengine commented 10 months ago

As far as I can tell, I don't see any shuffling of plants after saving through the editor. Can you tell me which plant to look for, maybe with a screenshot?

Moreover regarding the unidentified structure... It is "something" that has stored 5 feathers here: grafik

It does not have a structure ID, therefore it is not identified and probably also not visible in the game: grafik

It is missing an "Id". 479 is the ItemID of feathers.

codengine commented 10 months ago

As an anecdote, one day a player reported that SOTFEdit showed a bench somewhere at the map which was not visible. It turned out that there was a lonely bench flying high in the sky.

The game sometimes does some weird things... signal-2023-11-13-231625_002

hatesigningup commented 10 months ago

Hi Stefan, sorry, it was night here in Europe - hence the delay in replying.

Yes, I was also wondering what that weird unknown entry was - turns out it's a Birdhouse attached to my main base (hence the feathers!). No idea why it's listed as unknown.

I took some before and after screenshots, before is on the left and after on the right hand side -

Before-and-after

I originally planted all my Aloe Vera and Horsetail plants on the top floor, and they seemed to move outside to the "front yard".

I'm not 100% sure if this was caused by SOTFEdit, as you rightly point out - the game does some weird stuff now and then :D.

Regards.

hatesigningup commented 10 months ago

PS - if I remember correctly, the "before" save was on my laptop and the "after" save was after I switched to my desktop computer - maybe something odd happened by switching to another computer?

Anyway, I wouldn't waste too much time or stress on this issue unless somebody else reports the same thing.

And of course many thanks for creating SOTFEdit, I tried a few in the past when SOTF was first released and yours is the absolute best so far and I've stuck with it. Much appreciated.

Regards.

codengine commented 10 months ago

I'm glad you like it :) What boggles me is that the editor should not change anything at the plants as there is in fact no function for it.

Could it be that the savegame was just not synced properly?

Would be nice if you could try to nail the issue down a bit further. During development I tried to be as less intrusive as possible, so that nothing is modified that should not be changed.

hatesigningup commented 10 months ago

Found it!! I managed to recreate the problem 👯‍♀️

I'd completely forgotten - I used SOTFEdit to get rid of a phantom, unfinished Animal hide rug that was annoying me with a "Gather animal hide 5/1" message constantly on the screen -

image

I clicked on "Set all to finish" and saved the game, that's when the plants got re-organised.

Hope that helps, regards.

codengine commented 10 months ago

Good to know. Is the state before "finishing" everything in the savegame(s) that you have attached?

hatesigningup commented 10 months ago

Yes, the file SOTFEdit_2023110100.zip posted above has both the unknown (birdhouse) and the "Gather animal hides 5/1" message on the screen.

I tried the following:

  1. Remove and destroy the Birdhouse ingame, save, edit with SOPTFEdit and clicked "set all to finish" in right pane and saved - Plant swap present.
  2. Remove and destroy the Birdhouse ingame, save, edit with SOPTFEdit and selected "remove" in left pane on the individual unfinished Deer rug and saved - Plant swap still present.
  3. Remove and destroy the Birdhouse ingame, save, manually removed the unfinished Deerhide rug by resetting ScrewStructureNodeInstancesSaveData.json to default, opened game in SOTFEdit and clicked on "set all to finish" in right pane and saved - BINGO! Plants were normal.

So at a guess, I'd say it was that phantom, invisible, unfinished Deerhide rug that was screwing with SOTFEdit, not the unknown Birdhouse or SOTFEdit itself.

Hope that helps, regards.

EDIT: As a side note, Sons had a massive problem right back at the start (or was it update 2 - not sure anymore), in that if you saved a game with an unfinished structure (in my case it was one of those prefab small towers from the book), half your structures and ziplines would vanish from the game! Resetting ScrewStructureNodeInstancesSaveData.json to default helped me back then. Maybe it has something to do with that bug resurfacing?

codengine commented 10 months ago

Thanks, I'll have a look later today. I suspect the issue is because SOTFEdit may not write the structures back in the same order as they appear in the JSON. Usually that should not be an issue, but in that case it might be that the order is important.

As far as I can tell the structures and the gardening data (plants) are stored in separate files. If the editor writes the structures in the wrong order, the mapping to the gardening data (which is based on the ordering) would also be wrong.

I'll check it.

codengine commented 10 months ago

I think I've found and fixed the issue. Could you please try this build? This new version will now preserve the ordering of structures when it writes it back to the savegame.

SOTFEdit_Plant_fix.zip

hatesigningup commented 10 months ago

Seems to work perfectly :D.

I used that new version to delete the unfinished Deer hide rug, also the 4 rotary traps, tons of stuff from my inventory, added blueprints and seeds to my inventory, maxxed out all player stats, maxxed out Kelvin & Virginia's stats, saved, reloaded - all the plants were in the correct order and no other noticable anomalies.

Great work, many thanks for your time and patience.

Kind regards

codengine commented 10 months ago

Thanks for reporting the issue and testing it again. I never thought that the ordering is actually important :D