Here’s a small script to extract maybe interesting data from Psychostats 3. Mostly a reminder for myself but anyone else who is interested about PS3 stats can use this method too. Blog interprets : D as smiley so “K : D” is written with space, same as with “K : M”.



limit=250
echo “# Rank Kills Deaths K : D K : M Online Skill”

lynx -source “http://css.setti.info/psychostats3/index.php?limit=$limit” | # Get Psychosts 3 HTML source
grep “<td class=.text. align=.center.>\|<td class=.text.>\|<td class=.text. nowrap>” | # Find stat lines from HTML
cut -f 2- -d “>” | # Parse stats
sed ’s/<\/td>//’ | # Parse stats
cut -f 1 -d “&” | # Parse stats
sed -e ‘N;s/\n/ /;N;s/\n/ /;N;s/\n/ /;N;s/\n/ /;N;s/\n/ /;N;s/\n/ /;’ # Parse one player’s stats in one line
#| sed -e ’s/,//g’ -e ’s/\./,/g’ # Replace periods (.) with commas (,)

Output should look something like this:

# Rank Kills Deaths K : D K : M Online Skill
1 13141 5482 2,40 0,69 317:55:50 15319,84
2 2247 908 2,47 0,95 39:25:18 15194,82
3 1665 754 2,21 0,67 41:21:15 14996,65
4 6149 2466 2,49 1,05 97:22:15 14715,97
5 21162 11396 1,86 0,61 582:14:46 14640,08
6 8672 4509 1,92 0,77 187:35:11 14638,51
7 6207 3721 1,67 0,58 178:41:34 14475,05
8 7245 4069 1,78 0,49 246:23:09 14378,98
9 1660 1200 1,38 0,50 55:40:32 14178,03
10 4375 2496 1,75 0,70 104:45:04 14150,38

That in turn can be handled with GNUPlot.

Something like comparing skill to K : D could be done to draw nice graphs.

GNUPlot script:

reset
set xlabel “Skill”
set ylabel “K : D ratio”
set title “Skill vs. :D
set terminal png color;
set output “demo-plot.png”;
plot ‘ps3data.txt’ using 7:5 with points

That will result into a image which looks like this:

Skill vs.  <img src='http://css.setti.info/blogs/k1ller/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  ratio” /></a></p>
<p>Comparing players’ K : D ratio to K : M ratio to skill to online time could be interesting. Some players succeed with rushing playstyle. Others succeed with slower pace. In the graph players who are near right border are good players. Players near bottom and top borders are special cases.  Even though one player can be seen near top border his skill isn’t very good. Maybe that player has stopped playing and his skill just slowly decays near 10000.</p>
<p>For better sample it would be possible to  make SQL query to PS3 database to only include active players. However the method shown above is available for all visitors - not only for system administrators.
</p>
		</div>

		<div class= Posted by k1ller @ 6:27 pm :: General
:: Comment RSS