Server Help

General Questions - *.scr files?

Qndre - Sat Apr 10, 2004 4:00 pm
Post subject: *.scr files?
*.scr files contain scoring information of specific arenas. How can I read their contents?
wEaViL - Sat Apr 10, 2004 9:26 pm
Post subject:
Theres a program i think on subspacedownloads.com that converts scr files into dat files... "i think"
Gravitron - Sat Apr 10, 2004 10:40 pm
Post subject:
Talk to catid, I believe he has done some research on them.
Mine GO BOOM - Sat Apr 10, 2004 10:57 pm
Post subject:
From FAQ: How can I decode the .scr files?

Quote:
To get stats from subarenas, you'll need a premade list of player's and their userid's. The subarenas record the following data:
Userid, kills, deaths, points (from kills), points (from flags), and flag games won.

The akward stat in here is the flag games won. This # increases everytime that player wins a flag game. So everytime he sees a Team Victory (### points), this number goes up one. Does NOT count if they are in spec on winning team. Have to be in a ship.

The formating for the .scr file is 18 bytes per data. First 4 bytes is the player's userid. The next two are for kills. 2 more for deaths. 2 more for number of victories player has won. 4 more for points from kills. And the last 4 for points from flags.

Code: Show/Hide
01 00 00 00 14 00 03 00 00 00 61 1a 01 00 00 00 00 00
^^^^^^^^^^^ ^^^^^ ^^^^^ ^^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^
userid      kills death victs points      flag points


For those of you not well known with programming, a normal format for when people save data into a binary format, the bytes are reversed sort of. Like take example for the normal points, it is saved as 61 1a 01 00. To decode this into normal decimal, you would 'reverse' the bytes, so it would end up being 00 01 1a 61. Then you would convert hex into decimal, and get 72289 for points from kills.

CypherJF - Sat Apr 10, 2004 11:38 pm
Post subject:
I don't save my binary backwards o.o ... have i been missing something my entire life :X *lol*
Qndre - Sun Apr 11, 2004 4:52 am
Post subject:
CypherJF wrote:
I don't save my binary backwards o.o ... have i been missing something my entire life :X *lol*

It's called Little-Endian! It's the way your CPU processes data and the way it's stored in memory. Your whole hardware works this way. If you build network packets, you also have to do it this way.
I can download the *.scr files using ?getfile, can't I?
Cyan~Fire - Sun Apr 11, 2004 10:11 am
Post subject:
Qndre wrote:
It's called Little-Endian!

Hey! You had no clue what this meant the first time you came here, so don't yell!
But Qndre's right, your whole system reads it 'backwards' so you don't have to worry about it.

And it's *getfile, not ?getfile, this isn't ASSS icon_razz.gif
CypherJF - Sun Apr 11, 2004 10:40 am
Post subject:
Qndre wrote:
[..]


It's called Little-Endian! It's the way your CPU processes data and the way it's stored in memory. Your whole hardware works this way. If you build network packets, you also have to do it this way.
I can download the *.scr files using ?getfile, can't I?


yes yes i know; and the only reason u know is because ekted told you about it.. hehe
Mine GO BOOM - Sun Apr 11, 2004 8:46 pm
Post subject:
Cyan~Fire wrote:
reads it 'backwards'

Its like this so if you want to read a number, in binary form, the least significant digits are all at the location where the pointer points to. Thus, if you read the number 32 from a pointer, in char, short, int, or int64, it will all return 32. Very useful in languages with pointers, such as C.
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group