I wanted to sort my stash. After I was done I deleted several categories that were obsolete. After a while I noticed multiple tabs being in the wrong category - somehow they switched categories automatically after deleting completely unrelated categories. I tried to move them to the correct one but I was neither able to select/open them nor could I open the tab menu in order to move them. I also noticed when selecting certain tabs the game highlighted multiple different ones without actually giving my access to those tabs. So, I ended up with losing access to roughly half of my items while the other half was a total mess.
I was able to use an old backup I made of my saves. Still quite frustrating to lose all those items.
But yes… sounds like you have the corrupted stash problem… Seems to happen more often with removing categories or moving tabs to other categories using the mouse and mistakenly drag dropping…
Best advice I can give you are already doing… I tend to make backups before each playsession so the worst I can lose is that progress… and I definitely make a backup if I am planning a stash cleanup…
Yeah, I updated my backup script to do backups more frequently. Today I got the time to tinker around with the JSON files and most likely identified the cause for the problem and found a way to fix it.
First I reproduced the problem by randomly deleting some categories until I noticed some tabs behaving weirdly. Then, when I looked in the files I didn’t immediately see the culprit. But after a bit of trial and error I found the game being unable to properly parse the data from the file if either the categories or tabs aren’t consecutively numbered. By deleting a category you break that consecutiveness while they game doesn’t automatically fix it. Or even worse, it assigns the same ID for multiple different tabs in a single category.
Here are some examples (from my repaired file):
When I started the categoryID and displayOrder entries were all over the place. So I started with renumbering them like 0, 1, 2, 3, etc. First I brought the categoryIDs and displayOrders in the “categories” section in line. Then I started on the “tabs” category by matching their categoryID entries with those I altered in the “categories” section. And finally I also brought all the tabIDs in line.
That took a while but the stash file I was testing with works properly again.
Conclusion: I guess I shouldn’t have deleted my broken stash file. Oh well…
Yip… consecutive numbering is key… If there are missing numbers in the sequences things go off the rails… another thing that sometimes happens is that tabs end up floating without linked categories too.
While the same, your explaination is simpler than that in the other threads about the issue… Am going to link it so that those less technically minded might understand it better…
I just had an idea. If I have some more spare time I’ll try to work on a script that automates that process of fixing broken stash files. That could take a while, though.
There would probably be more than a few takers for this kind of thing if you wanted to do it, but obviously its usefulness will be time limited as the devs have to fix the cause of this before MP goes live or they are going to have the headache of corrupted stashes on the server based saves…