Talk:Stats File Formats (AMX Mod X)

From AlliedModders Wiki
Jump to: navigation, search

I am looking for the calculation used by WinCSX.exe to establish its "rank" order for each entry in the csstats.dat file.

My csstats.dat file was damaged recently, forcing me to restore an older file. Even though only a few days worth of stats changes were lost, data loss is data loss... This got me thinking about the entire stats process and what I could do to better protect this data the next time the server crashes in a way which leaves the csstats file damaged.

To that end, and based on the code presented in this artical, I wrote a validation program. I noticed the default record ordering in the physical file is not the same as the "rank" ordering displayed by WinCSX.exe. This makes sense as I imagine the overhead to constantly (physically) reorder the csstats.dat file is not worth it to the server. If I was the server I would only ever physically reorder the file on startup, but I digress... So, there must be some calculated value which represents the "rank" value.

I hope I am doing this discussion thing correctly, as I do not intend for this post to be part of the article. The results of this discussion should be added to the article however.

You can find this calculation in csstats.sma, it is kills - deaths - tks I think. (FYI, bumping is as insidiously bad etiquette on a wiki as it is forums, and next offense will result in a ban.) -- BAILOPAN 19:20, 10 October 2006 (CDT)

I am not sure what bumping is, but thanks for the information. I assume we should delete this now?

If are calling "bumping" merely accessing this page to see if you or anyone else has added to it, then I am not sure how to use this system.

Anyway, it seems their must be more to this as the calculation specified does not completely account for the rank ordering presented in WinCSX.exe. Of note is the differing index values from the sma listing:

public get_score(stats[8], body[8]) return stats[0] - stats[1] - stats[3] // kills - deaths - teamkills

Versus the actual file layout presented in this article. I imagine the game engine commit process must be writing out in the indicated order (else none of this would work).

Is it possible to get a listing of the WinCSX program or its calculations?