Jacsmac Posted April 21 Report Posted April 21 I recently crashed my world with a buggy item in my hotbar, reloading the world gives the same crash, and running the world in Recovery mode didn't seem to fix the issue. After going through things that require immense patience and trust in my own computer skills (iffy at best given I chose to be a mechanical engineer instead of a computer engineer) (also got to a couple dead ends), I found the player's (I know the player is mine based on the UID) hotbar data in a hex code editor and tried to make a subtle edit to the hotbar to replace what I thought might be the item in question. This obviously didn't work and corrupted the save file (Not the worst thing because I made a backup after the crash but still frustrating). I'd be happy to get the world back, even if my player has to lose items. I just wish there was a program I could run to open my .vcdbs file or something and change player/block data without getting half a degree in information technology. P.S. Does anyone know a good SQLite crash course I can follow to try another approach (and how to download and use the elusive SQLite Tools)? Or. even better, a way I can get the hex editor to actually work? Any help is immensely appreciated. 1
Jacsmac Posted April 21 Author Report Posted April 21 (edited) I DID IT! I found the slot and edited it in DB Browser for SQLite, restoring functionality to my world. The index that was giving an IndexOutOfRange exception was stored as an integer which was super easy to change. Steps (Windows 10/11): Back up your save before opening it in a file editor!!! Download and install DB Browser for SQLite Right click the save file in \VintageStoryData\Saves (or an equivalent backup folder) and open with DB Browser Open the 'Browse Data' tab and switch the view to the PlayerData table There should be multiple records with all of the UIDs of players who have joined the world, or a single entry for singleplayer worlds. I think you can find the right UID entry to edit by going to \VintageStoryData\Playerdata\playerdata.json where UIDs are listed with player names. The player data is in BLOB format, which means it is raw binary. Look for data that resembles hotbar slots or character clothing slots (by having the binary window open) based on what you want to change. Be careful! Changing the number of bytes in the file can corrupt the save. Make sure you are backed up before you apply any changes, and try not to make drastic changes if you don't know what you are doing. You can change attributes by changing the values of existing bytes (keep mind of data types such as strings, integers, and floating-point numbers). Since the data is a BLOB, you have to avoid accidentally changing bytes that tell Vintage Story how to use the data or the file may be corrupted. You might be able to use this method to even delete or replace entire items that cause crashes, but always tread carefully when editing raw binary. This method gives you direct control over raw data, something a dedicated Vintage Story save editor would likely not due to risks. If you see this post and hear computer science alarm bells going off in your head, please notify me ASAP and I will edit or delete it to keep people's computers safe. Edited April 21 by Jacsmac
Recommended Posts