One of the impulses for initially building RTools was that I had a bit of a breakthrough; I knew pretty well how Reporter v3 handled it’s tournament files from some past work, and I knew _where_ v4 was storing information, but I didn’t know _how_ it was. The file in question ended with “.dat”, and gave no hints in a text editor as to how to decode it.
Then, one day I randomly looked in that folder during a tournament, and saw the key to answering that. Actually, it was the lock, as there was an additional file in that folder with the same name as the storage file, but with “.ldb” as the extension. Immediately, I was able to get into the file and figure out how to get info from it, as “.ldb” stands for “database lock” and is used solely in relation to Microsoft Access databases. (which normally have “.mdb” as an extension rather than “.dat”, which somewhat implies either encrypted or binary data)
So, enough with that, here’s how DCI Reporter stores your information.
DCI Reporter v3
v3 (and v2/v1, though the format is different) stores all tournament information in datasets called flat files. These are simple text files with information stored like an Excel spreadsheet, separating the columns by either a tab character or a comma. When you have a tournament in v3, it gives you a 4-letter code for each tournament; this is the prefix that all data files use. In the folder where these files are stored, there will be several for each tournament. The ones you will usually see are:
301.dat – Tournament information
302.dat – Player information
303.dat – Round & Match information
305.dat – Condensed version of 303.dat (though this gives the match points for a round and 303 doesn’t)
308.dat – Pod information (note – this info is also stored in 302.dat)
320.dat – Event log
DCI Reporter v4
v4 is a work from the ground-up in more ways than the UI; the entire structure of how it stores tournament information is reworked, now taking the form of a Microsoft Access-formatted database stored way in the back of your computer at:
C:/Documents and Settings/[username]/Application Data/Wizards of the Coast/Event Reporter/TournamentData.dat (Windows 2000, Windows XP)
C:/Users/[username]/AppData/Roaming/Wizards of the Coast/Event Reporter/TournamentData.dat (Windows Vista, Windows 7)
The database itself is pretty straightforward from an architectural perspective, and pretty much follows the style that v3 had, though taking advantage of many of the cool things dedicated databases can do for both space saving and enabling the UI to be much simpler. The one interesting note is that every tournament is a team tournament in the database architecture; if it’s 1v1, the team size is simply one; however, if it’s 2HG, almost nothing needs changing from the database perspective. (and, nothing really changes currently in the UI as well, as multiplayer events are currently handled in all aspects as team vs. team, and never player vs. player)
What’s Not in the Databases…
The major thing is that tiebreakers are always programmatically generated by DCI Reporter, so any standings RTools produces must also be generated. It’s also an issue with v3 that there can be several areas holding the same piece of information, which has caused issues in RTools for handling things such as pod seating and drops, where initially the location I chose for accessing that information turned out to be the incorrect one.
Backing up your Databases…
v3 is easy; you just copy the files where you want them backed up to. v4 is the same method, though the file can be quite large with a bunch of tournaments in it. RTools v.1.1 will have a simple backup/restore tool for v4 databases, just so you won’t need to go in through hidden folders and copy that one file over.