English Easily modify userstats.dat

8 replies
Goto Page
To the start Previous 1 Next To the start
01.04.19 04:37:42 pm
Up
Goo
User
Offline Off
Is there an easy way to modify
userstats.dat
?

Like turn it into text and then compile it?
01.04.19 05:02:04 pm
Up
Jaller94
User
Offline Off
The forum and downloads list several scripts to extract and package the unformation. Most of them seem to be PHP scripts. Please search for "userstats.dat".

The file format is described here: http://www.unrealsoftware.de/forum_posts.php?post=338621&start=0#post338627
01.04.19 05:15:36 pm
Up
panteon00
User
Offline Off
user Starkkz created a tool for this: file cs2d User stats editor (24)
loading...
01.04.19 05:21:23 pm
Up
DC
Admin
Offline Off
Note that the format changed (more values) since I wrote the post linked by user Jaller94. The introduction of assists, MVP and Steam led to some changes so old tools will NOT work properly anymore unless they have been updated!

The very first line is a string (with line break) describing the format. The latest format string is
userstats steam
and the data set for a user looks like that (it's simply repeated X times in the file after that format line):
Code:
1
2
3
4
5
6
7
8
9
LINE (string with line break) user name
BYTE user type
LONG user ID
INT score
INT frags
INT deaths
INT assists
INT mvps
INT seconds play time on server


depending on user type byte the user ID either represents a Steam ID (1) or a USGN ID (0). I think when a user is using Steam and USGN login the USGN login is used.
Data types as described here.

CS2D can also load the old formats but it will always save the data in the latest format (the one described above).
edited 1×, last 01.04.19 05:32:27 pm
www.UnrealSoftware.de | www.CS2D.com | www.CarnageContest.com | Use the forum & avoid PMs!
01.04.19 06:04:21 pm
Up
Goo
User
Offline Off
When I open the file in notepad++ it looks corrupted, how to properly open it?
01.04.19 06:15:08 pm
Up
DC
Admin
Offline Off
It's a binary format. It's not human readable. You would have to write a program to read the values or use a HEX editor.

If you only want to change a few values a HEX editor is probably sufficient but it's still not trivial and you have to understand the data types / the offsets to be able to find and modify the right values.
www.UnrealSoftware.de | www.CS2D.com | www.CarnageContest.com | Use the forum & avoid PMs!
01.04.19 06:23:56 pm
Up
Goo
User
Offline Off
Hi do you know a good program to read it for noobs
19.04.19 09:12:25 pm
Up
VADemon
User
Offline Off
Thanks user DC for the quick explanation of the new format.

Updated version for Steam support:
file cs2d User stats editor v2 - Steam support (5)
20.04.19 12:06:38 pm
Up
Gaios
Security Supporter
Offline Off
@user VADemon: Updated or new file upload?
To the start Previous 1 Next To the start