Source of the text: http://forums.pvpgn.org/index.php?topic=836.0 ------------------------------------------------------------------------------------- Greetings. Over the last week or two, I've been working on something I'm calling 'd2stats'. This program will extract Diablo II (expansion-only!) character info and display it in XML format. You can see the results here if you like: http://vidya.dyndns.org/cgi-bin/d2stats?character=MelGibson The program can also run in 'stats' mode, compiling statistics for an entire PvPGN server. You can see the results here (be warned, my users tend to have rather vulgar names): http://vidya.dyndns.org/xml/season0.xml I think I have the code solid enough to release it as a beta. It isn't very clean or documented, but I thought people might like to try this out. You can download the latest beta here: http://vidya.dyndns.org/stuff/d2stats_082208.tar.bz2 (updated, with MSVC support and report parsing) In order to get this to work (read, important): You need to change a line near the top of 'config.c' to a file location where you'll put d2stats.conf (included). You also need to edit d2stats.conf, hopefully that should be well-documented enough to figure out. You should also copy every text file in data/ somewhere, and make a note of this location in d2stats.conf ('data') - an ideal spot would be /usr/share/d2stats or /usr/local/share/d2stats. This is data pulled from the MPQ files, and d2stats needs this to be able to display useful output for items. Finally, if you want the stylesheets - so that you don't have to look at raw XML - you'll need to copy everything in xml/ somewhere on your webserver. You'll also need to include the absolute URLs for each stylesheet ('http://yoursite.com/path/to/xml/stuff/blah.xslt') to d2stats.conf ('char_xslt', 'list_xslt'). After you're done setting it up, you should be able to run 'd2stats' to perform the default mode you selected on your entire charsave. There are a couple of command-line arguments: -l will process only ladder characters -h will process only hardcore characters -s forces d2stats to produce stats -c forces d2stats to produce character data Optionally: If you want your users to be able to see characters on-the-fly, without having to generate a bunch of XML files all the time, you can use the included Perl script ('d2stats.pl') as a CGI interface. You'd do this by copying it into /cgi-bin/ of your webserver, then figuring out how to execute that script as user 'bnetd' so that it can access your charsaves. Don't forget to put the URL to your CGI script in d2stats.conf ('cgi_link = http://yoursite.com/cgi-bin/d2stats?character='). You might want to change around the XSLT stylesheets a little bit, so that locations for files included (CSS stylesheets, JavaScript files, JPEG backgrounds) go where you want them to, or maybe to change the formatting. There's a way to get some servers to perform XSLT transformations locally, so that all the user gets is HTML, but my server's rather slow, so I went with this. There's tons of small modifications you can make to the source itself, although it doesn't have any comments at the moment and it's kind of a mess. If you want to change how many entries there are per list, for example, change the numbers yourself in d2stats.h, tally_list.c and xml_list.c, or you can copy-paste some code to generate a new list with new statistics, or ... Hopefully that's enough information for you to deploy this on your website, if you want it. It's a beta so I'd appreciate feedback - ideas for new lists to include, (I'm planning on ear tallying later) modifications to the admittedly awful XSLT stylesheets, extra features to add, bugs that I haven't found yet, questions on how to use this program, or anything else, just post in this thread. Edit - thanks to Riffruff for lending his SVN server for use with this project. Honestly I didn't expect anything like that, I love this.