Author Topic: Plugin: L4D2 Playing Stats - Much improved version/replacement of Survivor MVP  (Read 23840 times)

Tabun

  • *
  • Posts: 523
    • View Profile
Plugin
L4D2_playstats: download compiled - source on github (version: 0.9.30)
L4D2_skill_detect: download compiled - source on github (version: 0.9.19)


What?
You all know the "survivor mvp" plugin that tells you how much damage to SI you did, how many common you killed, et cetera (Artifacial's version shows quite a bit more). This new plugin still does that and much more:
  • It can track and show: skeets, levels, crowns, drawcrowns, boomer pops, accuracy per weapon time, headshots per weapon type, tongue cuts, deadstops and m2s on SI.
  • It shows the total round time, time of the tankfight and the time paused. It tracks the time that players were present/active in a round.
  • It can show data for either team at any time, or for the entire game up until the current round, if so desired.
  • It allows server-side configuration for what is automatically printed at round end. It also allows clients to choose what they want to see, overriding the server default (and not bothering other players with spam)
  • All in (much more) neatly organized tables at round end, or on demand.
  • It is compatible with campaign mode (because why not).


Example output
Code: [Select]
| Survivor MVP Stats -- This Round -- Team A                                                             |
|--------------------------------------------------------------------------------------------------------|
| Name                 | Specials   kills/dmg  | Commons         | Tank   | Witch  | FF    | Rcvd | Time |
|----------------------|-----------------------|-----------------|--------|--------|-------|------|------|
| Ubi                  |    9     5089     59% |       8     10% |    270 |        |       |   45 | 100% |
| Aar                  |    4     1349     16% |      32     42% |    375 |        |    20 |   52 | 100% |
| ErboLarde            |    3     1316     15% |      19     25% |     91 |        |    29 |  111 | 100% |
| Krupola___           |    4      861     10% |      18     23% |    470 |        |       |  141 | 100% |
|--------------------------------------------------------------------------------------------------------|
| Round Duration:  4m 24s          Tank Fight Duration:  39s             Pause Duration:  56m 5s         |
|--------------------------------------------------------------------------------------------------------|


| Special -- This Round -- Team B            skts(full/hurt/melee); lvl(full/hurt); crwn(full/draw) |
|---------------------------------------------------------------------------------------------------|
| Name                 | Skeets  fl/ht/ml | Levels    | Crowns    | Pops | Cuts / Self | DSs / M2s  |
|----------------------|------------------|-----------|-----------|------|-------------|------------|
| Runar                |    1 /   0 /   0 |           |           |    2 |             |    0 /   7 |
| Pit                  |                  |           |           |    1 |             |    0 /   1 |
| Qruumk               |                  |   1 /   0 |           |    2 |             |    0 /   3 |
| Trambol___           |                  |           |   1 /   0 |      |             |            |
|---------------------------------------------------------------------------------------------------|


| Accuracy Stats -- This Round -- Team A            hits (pellets/bullets);  acc prc;  headshots prc (of hits) |
|--------------------------------------------------------------------------------------------------------------|
| Name                 | Shotgun buckshot    | SMG / Rifle  acc hs | Sniper       acc hs | Pistol       acc hs |
|----------------------|---------------------|---------------------|---------------------|---------------------|
| ___ _______________  |     369       63.6% |                     |                     |                     |
| Brop                 |     243       74.0% |                     |                     |    84  98.0%  50.0% |
| Ruarn                |     222       82.2% |   512  88.8%   7.0% |                     |                     |
| Hoppor               |                     |                     |    38  88.3%  13.7% |   118  84.2%  42.8% |
|--------------------------------------------------------------------------------------------------------------|


Options and commands
Commands:
  • /stats <type> <arguments> ( /stats ? for help )
    show various stats tables in console
  • /stats_auto <flags> ( / stats_auto ? for help )
    sets client-side automatic round end printing preference
For legacy reasons, /mvp still works, too.
Full information here: https://github.com/Tabbernaut/L4D2-Plugins/blob/master/stats/README.md


why?
First, because the old survivor mvp plugin was a horrible mess. Second, because I'm a nerd and I kinda like stats, especially stuff that wasn't in the survivor mvp plugin before. Third, because I felt the configuration options and presentation of the older plugins were too limited and clunky.


replacing survivor_mvp
If you leave everything at default settings, it will do pretty much what the old survivor mvp plugin did, with the same chat print. The console tables will be slightly different (but better IMO). Server owners can check the documentation on github if they wish to customize the stuff that is shown by default.

Note that I left out quite a few of the stats that Artifacial added, feeling that others were more interesting. I'm open to suggestions, so if any are removed that you feel should be in there, let me know.


'skill detect'
Other plugin coders may be interested in this 'detection' plugin, which sends out global forwards on the stuff it detects (skeets, crowns, levels, etc.) so other plugins can make use of this without having to bother with (double) tracking. Any requests for (better) tracking options in l4d2_skill_detect are welcome.

The stats plugin will work fine without skill_detect, but it will lack a bunch of data.
« Last Edit: February 01, 2014, 07:08:02 am by Tabun »

THyroXIN´-

  • *****
  • Posts: 519
    • View Profile
    • InnerSphere - we are not a clan we are a syndicate
its just AWESOME bro!!!!

current mvp do show a shit of the real skill.

Tabun

  • *
  • Posts: 523
    • View Profile
Updated playstats to 0.9.14

For those using the wonderful custom map transitions, it turns out that when it swaps teams (to preserve the correct play order), the logical teams get mixed up, so playstats can't tell team A from team B. If you're using this and CMT at the same time, you may want to use this version of CMT (until such time as an official update has been made). Using this version will also make playstats able to tell when games start and end when using CMT.

custom map transitions: download compiled - source on github (version: 11b)


Not doing so won't cause errors or anything, but full game stats may be wrong when using CMT. You'd never really know which team is "A" and "B".

epilimic

  • *****
  • Posts: 742
  • Sexy: 9001
    • View Profile
    • buttsecs
Thanks Tab. Unfortunately a side effect of CMT is that team A always goes first. Maybe in the future this can get sorted out but thanks for the update in the meanwhile!
what what, in the mutt

Map 1

  • ***
  • Posts: 151
    • View Profile
I get this in the console when I type sm_stats_auto or sm_stats_auto 1
Code: [Select]
sm_stats_auto 1
L 10/27/2013 - 05:42:33: [SM] Native "PrintToChat" reported: Client index 0 is invalid
L 10/27/2013 - 05:42:33: [SM] Displaying call stack trace for plugin "l4d2_playstats.smx":
L 10/27/2013 - 05:42:33: [SM] [0] Line 1404, l4d2_playstats.sp::Cmd_Cookie_SetPrintFlags()
 
 
sm_stats_auto
L 10/27/2013 - 05:42:53: [SM] Native "PrintToChat" reported: Client index 0 is invalid
L 10/27/2013 - 05:42:53: [SM] Displaying call stack trace for plugin "l4d2_playstats.smx":
L 10/27/2013 - 05:42:53: [SM] [0] Line 1427, l4d2_playstats.sp::Cmd_Cookie_SetPrintFlags()


blablabla

  • **
  • Posts: 96
    • View Profile
Wow great!

just a question, stats csv.txt file is for ? It should upload it or this is an example of what the plugin returns?

Tabun

  • *
  • Posts: 523
    • View Profile
Oh, that's just an information file that shows you what output is generated when using the statswrite option. This is not very interesting for now, so ignore it. It doesn't need to be on the server, in any case. :]



I get this in the console when I type sm_stats_auto or sm_stats_auto 1
Code: [Select]
sm_stats_auto 1
L 10/27/2013 - 05:42:33: [SM] Native "PrintToChat" reported: Client index 0 is invalid
L 10/27/2013 - 05:42:33: [SM] Displaying call stack trace for plugin "l4d2_playstats.smx":
L 10/27/2013 - 05:42:33: [SM] [0] Line 1404, l4d2_playstats.sp::Cmd_Cookie_SetPrintFlags()
 
 
sm_stats_auto
L 10/27/2013 - 05:42:53: [SM] Native "PrintToChat" reported: Client index 0 is invalid
L 10/27/2013 - 05:42:53: [SM] Displaying call stack trace for plugin "l4d2_playstats.smx":
L 10/27/2013 - 05:42:53: [SM] [0] Line 1427, l4d2_playstats.sp::Cmd_Cookie_SetPrintFlags()

If you're typing it in the server console, that makes sense (I'll fix the error, but the command wouldn't work). It's a client-side command. If it happens client-side, that'd be super weird and I'd have to look into it. :]

Note: use the cvars if you want to set server side preferences.
« Last Edit: October 27, 2013, 09:46:47 am by Tabun »

stabs

  • ****
  • Posts: 323
    • View Profile
Thanks Tab. Unfortunately a side effect of CMT is that team A always goes first. Maybe in the future this can get sorted out but thanks for the update in the meanwhile!

I've got an idea that might fix it but not much free time to try it out.

Artifacial

  • ***
  • Posts: 209
    • View Profile
Looks awesome! I'll throw it in active config on my server and report back if there are any problems.

Tabun

  • *
  • Posts: 523
    • View Profile
Thanks. :]

Updated playstats to 0.9.16:
  • solved problem with garbage print output on large automatic print batches
  • fixed incorrect team/all players selection on automatic prints
  • solved some minor print problems with sm_stats_auto

Tabun

  • *
  • Posts: 523
    • View Profile
Updated playstats to 0.9.19:
  • added infected stats table (type /stats inf)
  • fixed some issues with infected dmg and time tracking
  • now listens for deathcharges


Updated skill_detect to 0.9.4:
  • added death charge detection, now sends forward
  • added death charge reporting to default report flags
  • fixed issue with sniper headshot skeet forwards

Tabun

  • *
  • Posts: 523
    • View Profile
Updated playstats to 0.9.21:
  • updated forwards and added avg. clear time to (file-written) stats (table display will be added later).
  • fixed some problems with specs showing up in infected player lists


Updated skill_detect to 0.9.5:
  • added special clear detection, tracking the time it took (OnSpecialClear() forward)
  • added 'instaclear' reporting (and cvar for configuring it)

Tabun

  • *
  • Posts: 523
    • View Profile
updated playstats to 0.9.23 and skill detect to 0.9.7.
  • Some minor bugfixes and table printing issues.
  • Also added OnBoomerVomitLanded() forward, which may be used to fire code on quadbooms etc.

Also included a l4d2_skill_detect.inc for coders on my github, with all the details concerning the skill detect forwards.
« Last Edit: November 06, 2013, 05:12:40 pm by Tabun »

fig newtons

  • *
  • Posts: 1882
    • View Profile
    • configs

3yebex

  • *****
  • Posts: 1285
  • All of the above!
    • View Profile
    • Steam Profile
This is incredible Tabun. I don't play much on configs but this is definitely an improvement.

That must have been some game though you tested...
Quote
Pause Duration:  56m 5s
Surely, I wouldn't wish that on my worst enemy.

EDIT: Another thing I noticed. There is no "pinned" category.
« Last Edit: November 11, 2013, 01:15:37 pm by 3yebex »

 

A dedicated community website to competitive L4D and L4D2, ran by the community, for the community. L4DNation supports all continents of play and focuses on bringing together the community as a whole to a central hub of information.