PDA

View Full Version : Stats Revival



iammitch
21st May 2013, 12:23
Hey guys,

I'm looking into reviving the stat tracking that has been lacking/missing for a while now, and am currently looking to see how many would be interested in participating/submitting stats to this project.

As it is, I've got 2 methods of retrieving information; the first being a SourceMod plugin, and the other being a log processor (Using either the files or the logaddress_add method). I'm also in the process of refining how I've been collecting/processing the stats from my servers to better handle larger amounts of data per player (Since my old viewer code was starting to get a bit slow from the growing amount of data I've been collecting).

You can see the web front-end of this project here (There are still parts missing/buggy since I'm still working on adding the functionality needed to view all the data):
http://stats.bitswit.ch/

Server Status

http://bitswit.ch/hidden_stats_status.php
http://eu.bitswit.ch/hidden_stats_status.php
http://us.bitswit.ch/hidden_stats_status.php

What's in it for the Admins?

Rankings/Stat Collection (Rankings can be disabled if required on a per-server basis).
Usage statistics & playtime counters on maps/weapons/players.
Heatmaps (In progress).
Admin tools (In progress).


Want to Participate?

Add the following line to your valve.rc file:


log 1
logaddress_add <LOG_SERVER_ADDRESS>:44336

For <LOG_SERVER_ADDRESS>, you have 3 choices:


http://stats.bitswit.ch/images/flags/au.png stats.bitswit.ch (Australia)
http://stats.bitswit.ch/images/flags/eu.png eu.bitswit.ch (EU)
http://stats.bitswit.ch/images/flags/us.png us.bitswit.ch (US)

Ideally, you should pick the server that has the lowest ping from your server. This will prevent log messages from being received out of order/lost in transit.


If you have any problems with doing this, or aren't sure what to do, let me know.

Once added, and your server is restarted; your server should show up in this list (http://bitswit.ch/hidden/stats/servers) after a couple of minutes.
A country flag won't show up by default, but it'll be added once I go in and make the necessary changes. And a web address can be added upon request.
If it doesn't, don't panic! It should show up eventually.

In Game Commands (SourceMod Plugin)

For users, these are the commands that are available on the servers who install my plugin:


rank - Shows a players ranking. The name is optional, and if left out will show your ranking.
rank [name]

stats - Shows a players stats (Kills, Deaths, TKs, Suicides). Like rank, the name is optional, and can be left out to show your own stats.
stats [name]

timeplayed - Shows a players playing time (In hours). Name can be left out to show your own value.
timeplayed [name]


For Server Admins

Stats Kill Location Reporter SourceMod Plugin
There are 2 ways to grab this plugin, either via downloading the source code yourself, or grabbing the pre-compiled copy of the plugin.

The source code for the plugin can be acquired from here:
https://bitbucket.org/iammitch/hidden-stats-death-location-reporter/src

The compiled copy of the plugin can be acquired from here:
http://stats.bitswit.ch/files/hsm_stats_kill_log.smx

Stats SourceMod Plugin
Please Note: You'll need to PM me about getting access to the database to pull the stats before the plugin will work.

The source code for the plugin can be acquired from here:
https://bitbucket.org/iammitch/hidden-stats-sourcemod-plugin/src

Issues/Requests for this plugin can be added here:
https://bitbucket.org/iammitch/hidden-stats-sourcemod-plugin/issues

The compiled copy of the plugin can be acquired from here:
http://stats.bitswit.ch/files/hsm_stats.smx

ConVars
There are some ConVars that you can set to change what the plugin does:

hsm_stats_query_type: Controls the type of query the plugin will perform against the database.
Default Value: 1
Possible Values:
1 - Query global stats.
2 - Query region stats.
3 - Query server stats.
4 - Query cluster stats.

hsm_stats_server_id: Sets the server ID that is used when querying region/server/cluster statss
Default Value: 0

hsm_stats_block_rank: If set to 1, the plugin cannot show a players rank, only their score.
Default Value: 0
Possible Values: 1 (On), 0 (Off)

Example:

Enabled: [Rank] Mitch has 10000 points
Disabled: [Rank] Mitch is ranked #9999 (10000 points)

hsm_stats_hide_tks: If set to 1, the plugin cannot show a players TK count in game.
Default Value: 0
Possible Values: 1 (On), 0 (Off)

Example:

Enabled: [Rank] Mitch: 99/99/99 (K/D/S)
Disabled: [Rank] Mitch: 99/99/99/99 (K/D/S/T)

If you've got any feedback/ideas you think would make this better. Leave a comment below.

phit
24th May 2013, 09:37
i would be interested to add my 4 servers, looks good so far!

Nova
25th May 2013, 12:28
Looks like a pretty neat website, I'd be interested in adding the AteaMD servers to it.

iammitch
25th May 2013, 17:10
The log listener is now up and running partially (It'll accept the logs, but it won't process them into the stats just yet, still a few issues to iron out on that end).

The 2 lines that you need to add to valve.rc are (If 'log 1' is already there, don't add it again):

log 1
logaddress_add bitswit.ch:44336

Once added, and your server is restarted; your server should show up in this list (http://bitswit.ch/hidden/stats/servers) shortly afterwards.
If it doesn't, don't worry about it yet (There is a slight bug where the listener isn't getting a response to a query from time to time).

I'll get into more detail about some of the other parts of the stat tracker once the processing of logs to stats is done.

iammitch
25th May 2013, 17:11
The log listener is now up and running partially (It'll accept the logs, but it won't process them into the stats just yet, still a few things to iron out on that end).

Refer to the first post for information on how to setup the logging.

The 2 lines that you need to add to valve.rc are (If 'log 1' is already there, don't add it again):

log 1
logaddress_add bitswit.ch:44336

If you have any problems with this, or aren't sure what to do, let me know.

Once added, and your server is restarted; your server should show up in this list (http://bitswit.ch/hidden/stats/servers).
If it doesn't, don't worry about it yet (There is a slight bug where the listener isn't getting a response to a query it does back to your server from time to time).

I'll get into more detail about some of the other parts of the stat tracker once the processing of logs to stats is done.

phit
25th May 2013, 21:00
added 2 servers so far, two more to follow tonight :)
servers are showing up almost immediately on the website, but country flags are not working

one question
how can I change the webadress for the server listed on your site?

iammitch
26th May 2013, 00:10
Country flags don't appear by default, they're added manually for the time being (I've gone in and set them to what I could see they should be from a server browser). If the flag needs to be something different, let me know.

And as for the web address, it's another thing that is manually set (For the time being). You can PM me what you'd like it to say.

Also, if you have server logs on your server, they can be used to add stats into the database as well, PM me for more information about that.

phit
26th May 2013, 05:14
im not sure if the PM system is working but i send you a message :)

iammitch
27th May 2013, 02:44
All good, I got the messages :P

If I don't run into any serious problems, I should be able to start processing the stats I'm receiving later on today.

iammitch
28th May 2013, 15:55
Quick update:

As it is, I'm nearly at the stage where I'm happy enough with the log processor to move it over to the real server and have it start crunching the data (Just need to fix an issue where it loses its state if the processor stops unexpectedly); The processor is able to replay the log events it receives properly and generate the SQL queries needed to populate the various tables (The latter part is more or less a rehash of my file based log processor).

So provided I don't run into any serious issues (Which at this stage I don't expect to), I should hopefully have this all up and running properly by the end of the week at the latest, if not sooner.

iammitch
30th May 2013, 14:54
Update #2:

The processor is now parsing the log files, and generating the required data for the rest of the system.

Next up on the list of things to do is get per country/server/server group leader boards working right, and then after that work on refining the rest of the site.

Update:
Added a crude per country leader-board... still needs a bit of work to make it match the global one.

Links are as follows:

Australian Servers: http://bitswit.ch/hidden/stats/leaderboard/au
Germany Servers: http://bitswit.ch/hidden/stats/leaderboard/de
US Servers: : http://bitswit.ch/hidden/stats/leaderboard/us

Paegus
30th May 2013, 23:08
European servers are a fair mix of players. For example, my server (uk) used to be in Germany.

Perhaps a region board would be better. Using the steam region codes.

iammitch
31st May 2013, 01:14
European servers are a fair mix of players. For example, my server (uk) used to be in Germany.

Perhaps a region board would be better. Using the steam region codes.

By region codes, are you referring to using the players country code from their Steam profile, or something else?

phit
2nd June 2013, 19:55
the leaderbord is awesome!
if you need help with getting screenshots for every map pm me :)
edit: i think he is referring to the server cvar
sv_region 3 // Server region (0 = Eastcoast, 1 = Westcoast, 2 = South America, 3 = Europe, 4 = Asia, 5 = Australia, 6 = Middle East, 7 = Africa, 255 = World)

iammitch
3rd June 2013, 02:18
the leaderbord is awesome!
if you need help with getting screenshots for every map pm me :)
edit: i think he is referring to the server cvar
sv_region 3 // Server region (0 = Eastcoast, 1 = Westcoast, 2 = South America, 3 = Europe, 4 = Asia, 5 = Australia, 6 = Middle East, 7 = Africa, 255 = World)

Ah, that'd make more sense ;)

If you could get some images of the maps, it'd be appreciated (Currently aiming for 2-3 images of each map), since I don't have all of the maps that are being tracked.

phit
3rd June 2013, 19:38
Gallery (http://files.universaldings.de/image/hiddenmaps/)
ZIP File of every screenshot (http://files.universaldings.de/image/hiddenmaps/hiddenmapscreens.zip)

here you go!
made at least 3 screenshots from every map, im using on my servers

thanks to DaLargeOne for helping me :*

iammitch
4th June 2013, 00:52
Gallery (http://files.universaldings.de/image/hiddenmaps/)
ZIP File of every screenshot (http://files.universaldings.de/image/hiddenmaps/hiddenmapscreens.zip)

here you go!
made at least 3 screenshots from every map, im using on my servers

thanks to DaLargeOne for helping me :*

Thank you! I'll start adding them later on today.

Per server stats are now available to be viewed. They can be found by clicking the icon (http://bitswit.ch/hidden/stats/img/icons/application-list.png) to the far right of each row on this page:
http://bitswit.ch/hidden/stats/servers

Example:
http://bitswit.ch/hidden/stats/servers/leaderboard/12

iammitch
6th June 2013, 15:40
Quick update:

Most maps in the list now have an associated image with them, and can be accessed here (http://bitswit.ch/hidden/stats/maps). I'm still working on adding the rest of them.

I've spent the last few days restructuring the database that stores all of the stats... which in turn broke some parts of the site. I've fixed up most of the problems that have arisen, but there are still a few places that are giving 'Internal Errors'.

And finally, I've almost got a SourceMod plugin that'll allow you to pull the processed back out into the game via commands such as 'rank'/'stats' working.. I just need to test it before I release it. If I don't run into any difficulties, it should be done in the next day or so.

phit
7th June 2013, 19:37
some more work for you :P
Maps Part 2

Gallery (http://files.universaldings.de/image/hiddenmaps/part2/)
ZIP Download (http://files.universaldings.de/image/hiddenmaps/part2/maps-part2.zip)

looking forward for the plugin! great work so far :)

edit: please change european union to europe
not every country in europe is in the union^^

also it seems like you logs processor stopped working or the stats are bugged :/

iammitch
8th June 2013, 09:26
also it seems like you logs processor stopped working or the stats are bugged :/

Yeah, it's a known issue (Since the log parser and score processor use transactions to work with the database, it occasionally locks up and crashes); and the only way to fix it at the moment is to restart the program (A simple fix).

I've updated more of the maps, there's only a few left that haven't gotten a thumbnail (I should be able to get the rest of them).

And I've gotten the stats plugin working to the point where I'm happy with how it's working. It can only query global/server stats at the moment, but grouping servers together or using region specific stats should be coming soon.

More information about the plugin below or in the first post.

Please Note: You'll need to PM me about getting access to the database to pull the stats before the plugin will work.

At the moment, there are 2 ways to install the plugin:

1. Download the source from here (https://bitbucket.org/iammitch/hidden-stats-sourcemod-plugin), and compile the plugin yourself.
2. Download the compiled copy of the code from here (http://bitswit.ch/hidden/stats/files/plugin/hsm_stats.smx).

There are some Cvars that you can set to change what the plugin does:

hsm_stats_query_type: Controls the type of query the plugin will perform against the database.
Default Value: 1
Possible Values:
1 - Query global stats.
2 - Query region stats (Not implemented).
3 - Query server stats.
4 - Query cluster stats (Not implemented).

hsm_stats_server_id: Sets the server ID that is used when querying region/server/cluster statss
Default Value: 0

hsm_stats_block_rank: If set to 1, the plugin cannot show a players rank, only their score.
Default Value: 0
Possible Values: 1 (On), 0 (Off)

Example:

Enabled: [Rank] Mitch has 10000 points
Disabled: [Rank] Mitch is ranked #9999 (10000 points)

hsm_stats_hide_tks: If set to 1, the plugin cannot show a players TK count in game.
Default Value: 0
Possible Values: 1 (On), 0 (Off)

Example:

Enabled: [Rank] Mitch: 99/99/99 (K/D/S)
Disabled: [Rank] Mitch: 99/99/99/99 (K/D/S/T)


There's still a lot of things that need to be added to the plugin, but it's a start! :D

iammitch
19th June 2013, 15:25
Status Update:

Things are slowly progressing, I've been somewhat preoccupied with other things over the last couple of weeks.

Most of the changes that I've made are mostly to the database side of things (Moving tables around, renaming things..); but having said that, I have made some small changes around the frontend as well ;)

It's now possible to get a graphical representation of a servers "player load" for the past 24 hours:
http://bitswit.ch/hidden/stats/server/9999/usage

And a more smaller version, with more information on it:
http://bitswit.ch/hidden/stats/server/9999/signature

And it's also possible to group multiple servers together to aggregate their combined usage:
http://bitswit.ch/hidden/stats/cluster/1/usage

And the same for groups:
http://bitswit.ch/hidden/stats/cluster/1/signature

They're still being worked on, but the format shouldn't drastically change.

I'm also aiming to have the rest of the functionality of the stats plugin finished by the end of this week (So that it can query regions/server clusters), provided that nothing comes up :)

o_O
2nd July 2013, 04:41
Would be great if you add a Top Players List for all Weapons...

I mean not all Players are using Knife..

Like a little piece of the old Hidden Ranks you can choose between Physics/Fn2k/Pistols e.c.t all Weapons in the Game a top list for Physic Players (most kills) and something like that you know what i mean :P

iammitch
3rd July 2013, 14:00
Would be great if you add a Top Players List for all Weapons...
I mean not all Players are using Knife..

Currently, a players score is determined by all weapons that they use. Or to be more specific:

Score = 1000 + WeaponKillScore - ( ( Deaths + Suicides ) * 5 ) - ( TKs * 15 )

Where 1000 is the players starting score, and WeaponKillScore is determined by the number of kills you've done with certain weapons multiplied by a number depending on what weapon was used; which as it stands is:


Physics kills give 25 points per kill.
FN303, World, Grenade and Explosion kills give 10 points per kill.
Everything else is 5 points.



Like a little piece of the old Hidden Ranks you can choose between Physics/Fn2k/Pistols e.c.t all Weapons in the Game a top list for Physic Players (most kills) and something like that you know what i mean :P

Per weapon stats is being worked on, it should be available soonish.

iammitch
11th July 2013, 16:08
Update:

The bugs in the SourceMod plugin that queries the database have been fixed, and stats can now be correctly pulled out for use in-game.

If admins would like to be able to use the plugin on their servers, send me an PM with your server's IP address and I'll grant access to read the stats from the data (Along with how to setup the plugin).
As it is, only my source code (https://bitbucket.org/iammitch/hidden-stats-sourcemod-plugin/src/) of the file has the updated changes to the plugin (Website copy will be updated over the next couple of days).

iammitch
30th July 2013, 00:59
Yet Another Update:

Things have been running smoothly in terms of collection/showing data. The log reader has had a few hiccups along the way (Nothing too serious, though).

The web front-end is in the process of getting a rework done to most parts of it.
For the curious, you can see the newer site here (http://stats.bitswit.ch/).

The SourceMod plugin hasn't had any serious issues with it, some new commands are going to be added to it to allow viewing of 'physics' kill rankings and other similar ones.

As always, if there's something that you'd like to see done, let me know.

iammitch
10th August 2013, 05:52
Just a quick screenshot of what's being worked on at the moment. I'll update with more information once there's more to show.

http://i.imgur.com/nN1L8RXl.jpg (http://i.imgur.com/nN1L8RX.jpg)

Paegus
10th August 2013, 06:39
Is that a kills based heat map?

iammitch
10th August 2013, 07:32
Is that a kills based heat map?

Yeah, it's showing all kills from both teams (Yellow being low, and blue being high) at the moment.
As it is, the data for that is coming from another SourceMod plugin that simply logs a players position to the log-file when they are killed.

Edit: Progress! Finally got the program to match the map image with the kill-location data properly:
http://i.imgur.com/RdNaETp.pnghttp://i.imgur.com/A4fg9SK.png
http://i.imgur.com/ZtxBr8x.pnghttp://i.imgur.com/szkyBEx.png
http://i.imgur.com/K8XDovT.pnghttp://i.imgur.com/a0WD9dF.png

iammitch
24th August 2013, 04:59
Continuing on from the last post, for the data that's needed to be generate the heat-maps, another plugin must be loaded that logs the relevant death information to the log file for the processor to gather.

Much like the stats plugin, this is completely optional; but having the plugin installed will mean that I can generate heat-maps that are specific to your server.

This plugin can be acquired in the same way as the other one, by either downloading the source file and compiling it yourself; or by grabbing the pre-compiled copy of the plugin.

The source code for the plugin can be acquired from here:
https://bitbucket.org/iammitch/hidden-stats-death-location-reporter/src

The compiled copy of the plugin can be acquired from here:
http://stats.bitswit.ch/files/hsm_stats_kill_log.smx

iammitch
24th August 2013, 16:40
I've pushed an update to the "new" stats site, mainly to get it ready for the heat-map images, more on that tomorrow.

In the meantime, here's another image from the heatmap side of things, with much more data in it (Old -> New):

http://i.imgur.com/RdNaETp.pnghttp://i.imgur.com/UrD2bBQ.png
http://i.imgur.com/A4fg9SK.pnghttp://i.imgur.com/UM3vCai.png

iammitch
26th August 2013, 02:47
Heat maps are good to go!

When you look at the map list (http://stats.bitswit.ch/maps), if a map has an icon like this in the lower corner:
http://stats.bitswit.ch/images/heatmap.png

Example:
http://i.imgur.com/hHbwn1H.png (http://stats.bitswit.ch/map/hdn_castle_b4/heatmaps)

Then that map has heat maps available for viewing.

As it is, it'll only show the last days worth of data on the maps. More longer data-sets are being worked on, and will be made available when ready.
Per-server/per-weapon heat maps are also getting there, they'll be up-and-going in a few days.

iammitch
2nd September 2013, 12:21
The stats server is currently doing a score rebuild to fix some changes/errors that appeared recently, so everyone's scores are currently being rebuilt.

This process should take a few hours to complete, so if you're wondering why your score is not what it was yesterday.. it'll be fixed shortly.

Edit: The rebuild process is 50% complete for scores, round timers and damage totals will take a lot longer to get back to normal.
Edit #2: Looks like someone didn't apply the bonus for killing the Hidden properly, and was handing it out to everyone left right and center. So that's been fixed, and we're back to the start.
Edit #3: The processing is still underway, hit a slight snag with the main server running out of space, which caused the MySQL server to crash.. that's been corrected now (The EU mirror is still down though, as I'll need to repair that database first).
Edit #4: And the scores are back! The EU mirror is still out of sync, since I'm waiting for the database to catch up to the damage done before I attempt to setup the mirror again.
Edit #5: The EU mirror is back up now, everything is back to normal database-wise.
Edit #6: The Log Parser is currently offline until later on tonight, since it's not reporting some things correctly. Log data is still being collected, however.
Edit #7: And finally, everything should be back to normal!

iammitch
4th September 2013, 15:50
Looks like there will be another score rebuild tomorrow to fix another issue that's cropped up (Coding while tired isn't the best idea), seeing as how points for physics/fn303_bolt weren't being applied properly (5 instead of 25):

http://i.imgur.com/VPQKgt0l.png (http://i.imgur.com/VPQKgt0.png)

This should hopefully be the last time I need to do a complete score rebuild, and should only take 2 hours while it goes over everything (again).

Edit #1: The rebuild has started (at 8am AEST).
Edit #2: Points have been rebuilt. Rounds played, time played, and damage dealt are still being rebuilt (About 1/2 way though those ones).
Edit #3: All back to normal now.

iammitch
9th September 2013, 23:11
I've added more servers to which logs can be sent to. This should help to reduce the amount of problems I've been getting with log messages being received out of sync or lost due to network issues.

Refer to the first post of this thread to see what's available.

Paegus
10th September 2013, 01:30
Awesome re the local log servers.

And sorry to keep raining on your parade but for the kill location plugin the playerdeath event doesn't trigger if the kills are not announced in-game.

It still does the log output but the interceptable event doesn't fire off for sourcemod to process.

iammitch
10th September 2013, 02:24
Awesome re the local log servers.

And sorry to keep raining on your parade but for the kill location plugin the playerdeath event doesn't trigger if the kills are not announced in-game.

It still does the log output but the interceptable event doesn't fire off for sourcemod to process.

I can probably get around that by making the logger behave differently if hdn_deathnotices is set to 0, since the damage events still fire I think.

iammitch
14th September 2013, 09:44
I've pushed a change to the Stats Processor that will prevent players from getting points for killing the "Bot Player" (BOT). They will still get all of the other stuff recorded, just no point change will occur from that.

Claybro
16th September 2013, 00:36
I've pushed a change to the Stats Processor that will prevent players from getting points for killing the "Bot Player" (BOT). They will still get all of the other stuff recorded, just no point change will occur from that.

That's awesome. I looked more into that guy who I had reported to you and noticed that a huge majority of his kills were on bots.

iammitch
17th September 2013, 01:47
I've now got the 3 types of heatmaps generating (24 hours, 2 weeks, and all).
http://i.imgur.com/eS6wSbq.png

Their schedule is setup like this (All times are local server time (AEST)):

The 24 hour images generate every 6 hours; at 12AM, 6AM, 12PM and 6PM.
The 2 week images generate every day; at 1AM.
The all-time images generate every week on a Monday; at 3AM (These images take a long time to generate).

ado921
17th September 2013, 03:18
Does this map record bot kills as well? I ask because of the concentrated area around the vehicles, and assume that it is the spawn point.

iammitch
17th September 2013, 04:46
Does this map record bot kills as well? I ask because of the concentrated area around the vehicles, and assume that it is the spawn point.

Ooh, forgot about that. I'll change the script to ignore BOT deaths.

iammitch
24th September 2013, 15:24
I can probably get around that by making the logger behave differently if hdn_deathnotices is set to 0, since the damage events still fire I think.

I've made the appropriate changes to make the location reporter behave differently if hdn_deathnotices is set to 0. It'll check the victims health, and if it's below 0, it'll fire off the appropriate events.
I've updated the pre-compiled copy of the plugin, and pushed the changes to VC.

Something to note (Not that this is overly important, since this stuff is only for the heat-map data), if you do have hdn_deathnotices set to 0, suicides from the Hidden will not be recorded, since it would seem that it reports this if it's set to 0:

L 09/24/2013 - 23:59:21: "totally not-mitch<4><STEAM_0:1:17556518><Hidden>" killed "totally not-mitch<4><STEAM_0:1:17556518><Hidden>" with "knife"
Which means that I'll never see the event from the plugin (Since no damage is done this way, and the kill event won't fire).

And this if it's set to 1:

L 09/25/2013 - 00:00:20: "totally not-mitch<4><STEAM_0:1:17556518><Hidden>" committed suicide with "knife"

Paegus
24th September 2013, 16:37
errmm.. if when deathnotices is 0 and the hidden tops himself results in the server logging
L 09/24/2013 - 23:59:21: "totally not-mitch<4><STEAM_0:1:17556518><Hidden>" killed "totally not-mitch<4><STEAM_0:1:17556518><Hidden>" with "knife" then doesn't that itself imply a suicide? if attacker = victim then suicide no? The log interpreter should be able to compare the two ids on any attach.

Alternatively you can use the plugin to hook the log output and if it sees the self-kill, it replaces it with a suicide message.

Doing it with the log interpreter is probably the better option.

iammitch
24th September 2013, 23:09
errmm.. if when deathnotices is 0 and the hidden tops himself results in the server logging
L 09/24/2013 - 23:59:21: "totally not-mitch<4><STEAM_0:1:17556518><Hidden>" killed "totally not-mitch<4><STEAM_0:1:17556518><Hidden>" with "knife" then doesn't that itself imply a suicide? if attacker = victim then suicide no? The log interpreter should be able to compare the two ids on any attach.

Alternatively you can use the plugin to hook the log output and if it sees the self-kill, it replaces it with a suicide message.

Doing it with the log interpreter is probably the better option.

Whoops, I didn't phrase that properly. The plugin that logs where players die (For the heat-map images) to the console log won't pick up that specific death (Since no damage/kill event is fired).

Paegus
25th September 2013, 09:55
No worries. Even if you hook the log output, I think it'd be too late to get coordinates by the time the server outputs the log...

You could use OnPlayerRunCmd(?) and track their locations live within the plugin. Then if you intercept the server log to see a self-kill, you can look up the player's last known location and feed that to the stats engine.

But that's quite a lot of work (both for you and the server since OnPlayerRunCmd fires every game frame for every player whose pressing a button or moving his mouse) for such a small piece of the data pie.

If you take a look at the SMAC plugins for anti-wallhack/eye-angle etc I think they have coordinate recordings along those lines. No point in writing the same code twice after-all.


As a completely side note:
Any chance of having the log interpreter (etc) monitor the Visibility plugin log output? I, for one, am curious to see how much time players spend visible.

"ClientName<ClientUserId><ClientAuth><Hidden>" Appeared!
"ClientName<ClientUserId><ClientAuth><Hidden>" Vanished!

iammitch
25th September 2013, 14:57
Any chance of having the log interpreter (etc) monitor the Visibility plugin log output? I, for one, am curious to see how much time players spend visible.

"ClientName<ClientUserId><ClientAuth><Hidden>" Appeared!
"ClientName<ClientUserId><ClientAuth><Hidden>" Vanished!

Should be fairly easy to track, I'll see what I can do.

iammitch
30th September 2013, 09:31
The changes for tracking hidden visibility are almost done, just need to make sure that everything's working in the test environment before I push those changes to the real server.

I've also been playing around with using a rating system to rank players against, instead of using a point based system (It should make it so a player is ranked on their skill level, and not on how many points they can accumulate). It's still got a bit of work to be done to it, but progress on that is looking good.

o_O
21st October 2013, 17:34
Physics
Physics_respawnable
physbox

Possible to stick them together as a Weapon?

Physics_respawnable = 25Points?
physbox = 25 Points?

Because if you kill someone with a Box it counts as Physics_respawnable or Physbox i dont know it now exactly.

iammitch
22nd October 2013, 04:31
Possible to stick them together as a Weapon?

Physics_respawnable = 25Points?
physbox = 25 Points?

Because if you kill someone with a Box it counts as Physics_respawnable or Physbox i dont know it now exactly.

That's how it works at the moment, I group all of those into the same group. This is how it works at the moment:

int pointsAwarded;
if ( cause.equalsIgnoreCase("physbox") || cause.equalsIgnoreCase("physics") || cause.equalsIgnoreCase("physics_multiplayer" || cause.equalsIgnoreCase("physics_respawnable")|| cause.equalsIgnoreCase("fn303_bolt") ) {
pointsAwarded = 25;
}
else if ( cause.equalsIgnoreCase("sonic") ) {
pointsAwarded = 15;
}
else if ( cause.equalsIgnoreCase("fn303") || cause.equalsIgnoreCase("pistol") || cause.equalsIgnoreCase("pistol_2") ) {
pointsAwarded = 10;
}
else {
pointsAwarded = 5;
}

The web interface will show them as a separate weapon though, I'll look into that one.

Also, I've got a bit of spare time now, so I should be able to finish up the visibility stuff over the next couple of days, along with improvements to the stability of the back-end processors.

iammitch
22nd October 2013, 12:16
That was intentional, I only disabled the ability to score points from a Bot.. I might change it so the Bot can't alter your global/weapon/map kills/deaths, but you'll still see kills/deaths from them in the PvP section.

o_O
22nd October 2013, 12:17
Sounds nice but one more Problem:

First:

http://s1.directupload.net/images/131022/temp/dcvm5rat.jpg (http://s1.directupload.net/file/d/3418/dcvm5rat_jpg.htm)

Second:


http://s1.directupload.net/images/131022/temp/5c3wsc68.jpg (http://s1.directupload.net/file/d/3418/5c3wsc68_jpg.htm)


Third:



http://s7.directupload.net/images/131022/temp/si8x97aq.png (http://s7.directupload.net/file/d/3418/si8x97aq_png.htm)



Well i know Bots doesnt give you Points anymore, but the Problem is it adds you Kills and increases your K/D


Edit: Now your Post is on Top of mine :p Btw are you looking in your Notifications?

iammitch
22nd October 2013, 12:36
Edit: Now your Post is on Top of mine :p Btw are you looking in your Notifications?

Yeah, just sorted it out.

o_O
28th October 2013, 18:23
Isnt the Stats Site adding Points? Because its Tracking and it doesnt add Points..

phit
28th October 2013, 23:11
Isnt the Stats Site adding Points? Because its Tracking and it doesnt add Points..

look in the first post.. server status

xXG4∑3RXx
29th October 2013, 10:18
I believe that the pvp section is still "coming soon." It would please me a lot to see who beats me up the most :P

o_O
29th October 2013, 16:51
I believe that the pvp section is still "coming soon." It would please me a lot to see who beats me up the most :P

http://bitswit.ch/hidden/stats/

iammitch
31st October 2013, 04:00
I believe that the pvp section is still "coming soon." It would please me a lot to see who beats me up the most :P

I'll try and get that section done over the weekend, it's something that I'm trying to get right (As there's a lot of data there if you've been playing for a long time, so having a massive list doesn't work really well..).

iammitch
17th November 2013, 07:58
Some updates!

I've finally gotten around to making the data regarding 'Hidden Visibility' visible. It can be seen as a leaderboard on the frontpage ("Anti-Hidden Hidden") and on the users profile (There's a dedicated section for it, along with the counters for per-map, and per-sever). I'll update the server/map pages soon.

I've also tweaked the view profile page slightly; the style has changed, and the PvP section is getting a update (Currently it only shows your best and worst. It'll show more soon).

ado921
17th November 2013, 09:46
Hooray! I'm a top ten now!

This is though very impressive what you are doing, and I thank you. I also hate you, because now I'm competing with several other people for higher spots.

iammitch
17th November 2013, 10:57
:(

I might try and add some things to allow for opting out of stuff (IE: Not appearing on leaderboards, not being visible on the site at all, etc).

Also, one thing that I forgot to mention is that the global leaderboard is now being calculated using a players "skill level", as opposed to their score. I'll perform resets of this leaderboard periodically (Every 6 months, I think. The ranking will be saved however for historical use), to prevent people who did really well early on from holding onto their score by not playing (Since you can't lose points unless you get killed).

ado921
17th November 2013, 20:47
I'm seeing a flaw as you mentioned, there are several people that have played less than a day and who are inactive filling up the Combined Scores Leaderboards. I don't understand how they are being ranked because it seems random.

Paegus
18th November 2013, 11:14
Awesome re the visibility tracking!

Would it be possible to... idk... weight the results?

Straight seconds doesn't mean that much if you just play a lot. The current leader has 1.45 hours visibility out of 1.65 days game time as the Hidden. That's 3.7% visibility. Har! There's a pun in there I'm sure...

Also, being visible vs 1 player is nice and all but being visible vs 8 is a tad different, since there's no way to detect a "hey lets practice stuff".

If visibility counts toward you ranking the perhaps scale it relative to how many sets of eyes you're visible to. Every minute of visibility vs 1 iris being worth bugger all. Every minute of visibiliy vs 8 iris being a nice chunk of change?

But please don't feel like you need to do any of this though since it all feels a lot like work... They're just thoughts and just having it tracked at all is just plain cool.

iammitch
20th November 2013, 09:26
Would it be possible to... idk... weight the results?

It should be possible to do weighting depending on how many players are present, since the data about how many players are playing is there (Provided that it's working properly, that is :S).

I'd probably do something like this:


1 Player: 10%
2-3 Players: 40%
3-6 Players: 70%
7+ Players: 100%

Olelikon
24th November 2013, 17:25
Loving all the stuff your doing with the website Mitch! Looking good :D

Olelikon
26th November 2013, 04:01
I'm wondering if bots should actually give you points for killing them, because it seems a bit unfair for a lot of the Australian players seeing as we don't actually have bots in our servers all the time. I've also noticed that one of the top 10 players has 2000+ kills against them, and a few others have 500+ against bots, just seems a bit unfair too me. :P

iammitch
26th November 2013, 08:13
I'm wondering if bots should actually give you points for killing them, because it seems a bit unfair for a lot of the Australian players seeing as we don't actually have bots in our servers all the time. I've also noticed that one of the top 10 players has 2000+ kills against them, and a few others have 500+ against bots, just seems a bit unfair too me. :P

This has been brought up before (http://forum.hidden-source.com/showthread.php?11610-Stats-Revival&p=157599#post157599), and the verdict was that bots would not contribute to a players score. The kills/deaths/tks counter will still rise though as it is.

Olelikon
26th November 2013, 12:24
Hmm, so then how does the 9th ranked player have so much score if he's only got about 2000+ actual kills towards his score? or was it only set to not give score not that long ago?

iammitch
26th November 2013, 12:36
Different weapons give different points. A phys-kill is worth more than a shotgun kill, for example.

This is how it's coded at the moment:


if ( cause.equalsIgnoreCase("physbox") || cause.equalsIgnoreCase("physics") || cause.equalsIgnoreCase("physics_multiplayer") || cause.equalsIgnoreCase("physics_respawnable")|| cause.equalsIgnoreCase("fn303_bolt") ) {
pointsAwarded = 25;
}
else if ( cause.equalsIgnoreCase("sonic") ) {
pointsAwarded = 15;
}
else if ( cause.equalsIgnoreCase("fn303") || cause.equalsIgnoreCase("pistol") || cause.equalsIgnoreCase("pistol_2") ) {
pointsAwarded = 10;
}
else {
pointsAwarded = 5; // Any weapon that is not listed above will only give 5 points.
}

Olelikon
26th November 2013, 13:04
Good coding, but I was wondering like compared to the others who also have 2000+ phys kill? How many points do deaths take away?

iammitch
27th November 2013, 11:22
Good coding, but I was wondering like compared to the others who also have 2000+ phys kill? How many points do deaths take away?

Which profile are you referring to?


How many points do deaths take away?

A death is worth -5 points for any weapon (From any source (Players/Bots/Worlds), doesn't make sense to punish a new player who isn't farmiliar with the game, compared to someone who knows how to use physics/fn303).
Teamkills will result in 15 points being deducted.

ado921
28th November 2013, 00:02
http://gyazo.com/3379ec7f34f3ac6bc1d88f00f904422c

Is anyone else seeing this? I don't understand how it calculates rating and score when the variances between each rank is so large. You have a guy with less kills than half the rounds he's played at the top while 5th has nearly double the kills of his rounds and a K/D of 3+, while nearly 3/4 his overall kills are from physics.

o_O
28th November 2013, 00:17
http://gyazo.com/3379ec7f34f3ac6bc1d88f00f904422c

Is anyone else seeing this? I don't understand how it calculates rating and score when the variances between each rank is so large. You have a guy with less kills than half the rounds he's played at the top while 5th has nearly double the kills of his rounds and a K/D of 3+, while nearly 3/4 his overall kills are from physics.

I got 5,576 kills overall, 639 Knife kills 2,655 Physic Kills 10.20 KD and im Rank 26 :D

iammitch
28th November 2013, 00:53
It's an issue with how the rating is calculated (It doesn't look at how long it's been since you've gotten a kill, rather it compares the 2 ratings of each player involved, and determines how much to change each players rating by), along with the fact that the score can't go down unless you actually play (There's no decay of the skill rating).

It's also a known issue with this sort of rating system, as detailed here (http://en.wikipedia.org/wiki/Elo_rating_system#Game_activity_versus_protecting_ one.27s_rating).

My initial solution to this would be to add a decay factor to the rating, so that after N weeks (2 most likely), the rating would start to go back towards 1000 (The default rating).

Olelikon
28th November 2013, 10:46
Which profile are you referring to?



A death is worth -5 points for any weapon (From any source (Players/Bots/Worlds), doesn't make sense to punish a new player who isn't farmiliar with the game, compared to someone who knows how to use physics/fn303).
Teamkills will result in 15 points being deducted.

Rank 9, Sarandon or W.H.A.T.? At the moment, he has so little kills towards normal players compared to people who have like double his kills, I'm just some what confused at it a little, I'm rank 11 with almost 10k kills about 1k are phys kills as well

o_O
28th November 2013, 16:42
Rank 9, Sarandon or W.H.A.T.? At the moment, he has so little kills towards normal players compared to people who have like double his kills, I'm just some what confused at it a little, I'm rank 11 with almost 10k kills about 1k are phys kills as well

You know that guy Saradin or W.H.A.T? is pushing hisself with Bot Kills..he got nearly 2,6k Bot Kills

Olelikon
29th November 2013, 14:50
You know that guy Saradin or W.H.A.T? is pushing hisself with Bot Kills..he got nearly 2,6k Bot Kills

Yeah, thats why I'm confused at how he's so high in score :l
I find it pointless to kill a bot as well, I've killed a few bots and they just seem so easy to kill hahaha

Also, why don't you try only doing normal knife kills for once? It's so much more fun just screwing around with people knifing them xD

iammitch
30th November 2013, 01:39
From memory, the removal of gaining points from bots was done after a rebuild. So I'll probably end up doing a complete rebuild over the next few days, to fix this issue.

Olelikon
30th November 2013, 12:05
From memory, the removal of gaining points from bots was done after a rebuild. So I'll probably end up doing a complete rebuild over the next few days, to fix this issue.

Alright cool cool, thanks heaps.
One last question, do you think you will be updating the servers anytime soon or not?
Because theres a lot more team killers around lately and no admins to kick them or anything :/
I don't know if there just not playing anymore or if it's because of the update

iammitch
30th November 2013, 13:20
Alright cool cool, thanks heaps.
One last question, do you think you will be updating the servers anytime soon or not?
Because theres a lot more team killers around lately and no admins to kick them or anything :/
I don't know if there just not playing anymore or if it's because of the update

Until there's a patch for the Linux dedicated server, I can't update the servers (Which sucks :/).
As it is, I've setup 2 temp servers that are running on a Windows server, so that should allow those who have patched to play.

Olelikon
1st December 2013, 06:29
Until there's a patch for the Linux dedicated server, I can't update the servers (Which sucks :/).
As it is, I've setup 2 temp servers that are running on a Windows server, so that should allow those who have patched to play.

Ahh yeah, sucks a little bit.
But at least everyone who updated can still play! :)

Claybro
8th February 2014, 19:04
Stats don't seem to be working, I tried streaming to EU, US and AU, none of them work.
Server status says Collector, Parser and ELO is down.

iammitch
13th February 2014, 07:06
My bad, they should be back up now.

iammitch
16th February 2014, 07:01
I've got a few updates that I'm planning to add to Stats over the next couple of weeks/month (Depending on how much free time I have), provided that I can get them all working properly.

Firstly, I'm planning on adding a way to retrieve player specific data about where they've scored kills, or have been killed. Conceptually, it'd look something like this:

http://i.imgur.com/2WkZG0Ml.png (http://i.imgur.com/2WkZG0M.png)

Of course, there's still alot that needs to be done for this (Such as providing a nice way of browsing this data), but it's something that I've wanted to do for quite some time now.

The other thing that I'm playing around with is generating more data for the map pages (With the data coming from various places):

http://i.imgur.com/VByoCZkl.png (http://i.imgur.com/VByoCZk.png)

I'm also trying to see if I can breakdown the kill-location data more and generate totals for in which specific areas people have killed/died the most.

o_O
21st February 2014, 04:48
I've got a few updates that I'm planning to add to Stats over the next couple of weeks/month (Depending on how much free time I have), provided that I can get them all working properly

You should fix the Rating thingy..do it as before, it was definitely fine

Claybro
21st February 2014, 20:01
You should fix the Rating thingy..do it as before, it was definitely fine

Vouch for this, the ELO thing doesn't seem correct.

iammitch
22nd February 2014, 00:55
If you're referring to the "Top 100 Players Leaderboard (http://stats.bitswit.ch/leaderboard)", I've changed it back to the point system.

iammitch
9th March 2014, 05:57
I've written a rather basic script to parse player names and look for "clan tags". It'll need some refining, but currently I'm looking for the following:


[TAG] Player Name
{TAG} Player Name
(TAG) Player Name
TAG| Player Name

The only restriction for the clan tag is that the code has to be at least 3 characters, and no more than 10 characters.

Also, for a clan to show up on the clans page, it needs to have at least 3 users using the tag.

Edit: I've also been playing with writing a plugin to "record" rounds (Basically log the game state to the console periodically), I've written up a quick demo of what it does here:
http://bitswit.ch/ReplayViewer/viewer.html

Claybro
11th March 2014, 21:58
I've written a rather basic script to parse player names and look for "clan tags". It'll need some refining, but currently I'm looking for the following:


[TAG] Player Name
{TAG} Player Name
(TAG) Player Name
TAG| Player Name

The only restriction for the clan tag is that the code has to be at least 3 characters, and no more than 10 characters.

Also, for a clan to show up on the clans page, it needs to have at least 3 users using the tag.


Regarding the clan tags, will the clan stats only be tracked so as long as the user has the clan tag set or can the user set the tag once to get into the system and then have stats tracked without it? Because I'm looking at http://stats.bitswit.ch/clan/2/members and I see that some users don't have have the clan tag but are still in the clan.

iammitch
12th March 2014, 02:47
Regarding the clan tags, will the clan stats only be tracked so as long as the user has the clan tag set or can the user set the tag once to get into the system and then have stats tracked without it?

If the clan is a "managed" clan (Ie: Someone's manually adding/removing members), they won't be picked up by the script. The automatically generated clans have their members wiped every time the script runs.

iammitch
21st April 2014, 01:14
EDIT: Site's back up, working on getting the log collector working again now.

Just to let you guys know, the Stats site is currently down due to a HDD failure. I'm aiming to have it up and running again shortly.

The stats are still being collected however, but I'd ask that you don't send log data directly to stats.bitswit.ch; as it's most likely going to move to a new server.