Sign in to follow this  
Dark Wun

view players inventories from files in MyDediServer folder

Recommended Posts

Dark Wun    8

Hello all,

I've been successfully running a dedicated server for a couple of years now -off and on. Unfortunately, as we all know, griefing is something we all have to deal with along with the enjoyment DST brings us. As a server administrator, I mostly have this under control, via the usual commands through the console or the server itself (c_save, c_rollback, net_kick/ban, dropallitems, powerwordkill, etc).

One more tool that would really help combat griefers is the ability to see their inventories for the case where they steal things. If I suspect someone is stealing valuable items, they generally can be caught provided they stick around to be searched/powerkilled by the console commands. It's the clever griefers that grab things and instantly leave that are difficult to deal with.

My question is: when this happens, is there anyway to tell which items they made off with from the files in the MyDediServer directory? If so , it would amount to simply spawning in what they took and calling it a day. Even better if there's a way to do this in-game.

Apologies if this has already been discussed at length. I did some good key word searches and nothing came up.

Many thanks in advance!

Share this post


Link to post
Share on other sites
Redakted    27

Yes it's a full list and kind of hard to read but definitely doable.  If you want to spawn back in what they took you could just copy their inventory to your Id and when you log back in you will have the stuff they had.

Share this post


Link to post
Share on other sites
Dark Wun    8

Ok , glad to hear this is within the realm of doable. Any chance  you can point me in the right direction of the files and/or locations I'd be looking for -assuming these aren't encrypted areas and this is not against the ToS or anything like that?

Edited by Dark Wun

Share this post


Link to post
Share on other sites
Daniel86268    410

Linux: ~/.klei/DoNotStarveTogether/<your server>/<your cluster>/<your shard (master)> [somewhere here]

Windows: c:\Users\<your user>\Documents\.klei\DoNotStarveTogether\<your server>\<your cluster>\<your shard (master)> [somewhere here]

The files themselves are not really encrypted, but not saved in a easily readable way, so I'd agree with Redakted that it'd be the easiest to copy over their inventory to your user ID, and then log into the server. (You should be able to do that without shutting down the server, but you'll probably have to log out before copying the files, cause otherwise they'll ger overwritten.)

Pretty sure that that's not agains any ToS, cause you are not accessing any more data than if you'd drop their inventory.

Just make sure you'll backup your data before doing anything, cause these kinda actions can very easily trash your data.

Share this post


Link to post
Share on other sites
Dark Wun    8

Okay so I did some more research on this and it looks like you go to the session folder for shard the griefer logged out in. For example the master shard path below:

Documents\Klei\DoNotStarveTogether\MyDediServer\Master\save\session\(~10-15 character alpha numeric session ID)

The folder will contain a set of folders that all seem to begin with A7________ , where the blank is a ~8-10 alpha numeric that is unique to each player present in that shard.

e.g., for a session where a total of 4 players joined the Master shard, you should see 4 unique folder ID's all beginning with A7:

[Session ID Folder]

-> [A7ABC12341]

-> [A7ABC12342]

-> [A7ABC12343]

-> [A7ABC12344]

 

The "A7" folder names are a lot more random with respect to the alpha numerics.

 

Now the tricky part is identifying which folder belongs to the griefer. Each one of those "A7" folders has a *.meta file. If you open it, it let's you know which character the corresponding player was using. Other than that, you have to do some old fashioned detective work and by using things like deduction and what you know of the other players, work out which folder belongs to the griefer. This could be really tricky if dozens of players have come and gone on the dedicated server, each leaving a unique "A7" folder in the session folder. The process would be incredibly simplified if the Klei ID or even Steam name was included in the data file, but unfortunately it's not.

 

After going through this painstaking process, you can open the other data files in their folder and decipher what was in their inventory.

 

I was able to determine who took what and how many in a game I'm currently hosting, then log in with an admin and spawn in the stolen items with c_give.  Again, would be much faster if Steam/Klei ID's were in the data files, but it was still possible.

 

 

Share this post


Link to post
Share on other sites
Daniel86268    410

Glad to hear that you managed to figure it out.

Small tip for the future: The Klei_IDs show up in the server console, whenever a person joins or leaves the server, which should give you a headstart. Alternatively you should be able to extract them from the banlist, if you've banned a player.

Share this post


Link to post
Share on other sites
Dark Wun    8

Yes, thanks again !  I may do that and actually make a list of which folder belongs to which Klei ID on the fly. My server isn't very high traffic, so it might be manageable. Wishlist: Klei ID's or player names in those inventory files...

Share this post


Link to post
Share on other sites
cezarica    521

On your Master and Caves shards inside the server.ini make sure you have:

[ACCOUNT]
encode_user_path = false

so you don't see those A7ABC12344 and so on but an actual Klei unique id. I don't think it will work for current world, so most likely will at next regeneration.

To help you in your detective work I highly recommend Fileseek, as it helped me track stuff a lot faster. For example, i knew a base was burned at day 259, so i set the program to find me the files with 259 in their names and instead of looking in like 200 folders for who had a save on that day this returned 2-3 results in seconds. Copy/paste their profile to my own I could quickly find the culprit and ban them.

Edited by cezarica
  • Thanks 1

Share this post


Link to post
Share on other sites
Dark Wun    8
20 hours ago, cezarica said:

On your Master and Caves shards inside the server.ini make sure you have:


[ACCOUNT]
encode_user_path = false

so you don't see those A7ABC12344 and so on but an actual Klei unique id. I don't think it will work for current world, so most likely will at next regeneration.

To help you in your detective work I highly recommend Fileseek, as it helped me track stuff a lot faster. For example, i knew a base was burned at day 259, so i set the program to find me the files with 259 in their names and instead of looking in like 200 folders for who had a save on that day this returned 2-3 results in seconds. Copy/paste their profile to my own I could quickly find the culprit and ban them.

Perfect, removing this item from my wish list... seems the feature was staring me in the face the whole time. Thanks for pointing this out. Will give fileseek a try.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this