Wonitor - Server-side statistics tool
Brute
Join Date: 2009-06-10 Member: 67778Members, Squad Five Blue, Reinforced - Shadow, WC 2013 - Shadow
A while ago, @wooza asked me to write a mod that allows for some basic statistics and game analysis.
Well, it's finished, deployed, and we are have been collecting data for over a week now, over 300 rounds so far. So I figured it is a good time to ask for some feedback, and also announce it to the broader public.
Thanks to @GhoulofGSG9, who made me realize that I want a Shine Mod instead of a regular one, and thus saved me from a world of pain.
Currently, it's only running on Wooza's servers, and the stats page is hosted at http://apheriox.com/wonitor/
It looks like this:
Similar to other tools like this, i.e. Ghoul's NS2Stats or the game's own sponitor system, the game sends its data to some web server, where it is used to make some fancy graphs. For the moment we are collecting data only at the end of a (successfully finished) round. The data itself is quite limited, barely more than what sponitor collects itself. Most notably, the mod does not gather any data during the live game, since I was not sure about the performance impact. So some information, like the number of hives killed, or the number of resources spent, is not available at this moment, although that might change in the future.
I opted to make the plots fully(?) configurable, which allows you to make your own and frees me of making a hard wired chart for every possible scenario someone might be interested in. So the next time some persons claims that a shift hive never wins on ns2_veil on a thursday, I got you covered. (Disclaimer: never do statistics with less than 20 data points). While being quite flexible, there are certain charts the configurator cannot create, even if the data is theoretically available. There are some basic functions available that operate on one field (i.e. you could sum up all kills from all games or calculate average game length per map), but everything that requires arithmetics on multiple fields (i.e. number of marine players divided by number of kills) is out of scope for the moment (although I could still do a hard-wired plot for that).
Which brings me right to the point. What kind of statistics would you like to see? Which kind of data should we record and what do you hope to learn from it? No promises though.
One obvious thing missing are the researched upgrades. But I have a feeling that only little information can be extracted from that, since we only log at the end of a round. For questions like 'is armor 2 available before lerks', 'are jetpacks more popular than exos' or 'when on average is the second hive dropped' you ultimately need timestamped data, which is a territory I don't necessarily want to dive into.
Edit: instructions on how to set this up can now be found here
Well, it's finished, deployed, and we are have been collecting data for over a week now, over 300 rounds so far. So I figured it is a good time to ask for some feedback, and also announce it to the broader public.
Thanks to @GhoulofGSG9, who made me realize that I want a Shine Mod instead of a regular one, and thus saved me from a world of pain.
Currently, it's only running on Wooza's servers, and the stats page is hosted at http://apheriox.com/wonitor/
It looks like this:
Similar to other tools like this, i.e. Ghoul's NS2Stats or the game's own sponitor system, the game sends its data to some web server, where it is used to make some fancy graphs. For the moment we are collecting data only at the end of a (successfully finished) round. The data itself is quite limited, barely more than what sponitor collects itself. Most notably, the mod does not gather any data during the live game, since I was not sure about the performance impact. So some information, like the number of hives killed, or the number of resources spent, is not available at this moment, although that might change in the future.
I opted to make the plots fully(?) configurable, which allows you to make your own and frees me of making a hard wired chart for every possible scenario someone might be interested in. So the next time some persons claims that a shift hive never wins on ns2_veil on a thursday, I got you covered. (Disclaimer: never do statistics with less than 20 data points). While being quite flexible, there are certain charts the configurator cannot create, even if the data is theoretically available. There are some basic functions available that operate on one field (i.e. you could sum up all kills from all games or calculate average game length per map), but everything that requires arithmetics on multiple fields (i.e. number of marine players divided by number of kills) is out of scope for the moment (although I could still do a hard-wired plot for that).
Which brings me right to the point. What kind of statistics would you like to see? Which kind of data should we record and what do you hope to learn from it? No promises though.
One obvious thing missing are the researched upgrades. But I have a feeling that only little information can be extracted from that, since we only log at the end of a round. For questions like 'is armor 2 available before lerks', 'are jetpacks more popular than exos' or 'when on average is the second hive dropped' you ultimately need timestamped data, which is a territory I don't necessarily want to dive into.
Edit: instructions on how to set this up can now be found here
Comments
There are two parts to it. The mod and the web server.
The mod is currently part of Wooza's Potpourri, but I can make it its own mod, or you could integrate it into something you have, no problem. It's just one file and a config you need to ... configure. Shine administration mod needs the be installed.
For the webserver, I am not hosting any (well I do, but I don't trust my rasperry pi to handle lots of requests). So either you bring your own, or you start flirting with wooza, so you can use the existing one. Technically everything is prepared to handle multiple servers, but if you just start sending data it will be ignored since your server needs to be whitelisted first. For using your own server: it's just php+sqlite3 and some html+js+css files. Should be trivial to substitute sqlite with sql or something else, if you want to.
As of now, performance looks ok so I do not see any necessity for that at the moment. Bottleneck at the moment seems to be plotly.js, which is 1MB minified(!). So the first visit is kind of slow, but once it is cached by the browser, it's fine. It should be possible to slim that down somewhat, since plotly comes with a lot of features I don't need (3d plotting), but it's tedious work that is yet to be done.
Not sure what you mean by "how best to consume the data". If you don't want to use the existing configurator, you can just use the query interface which spits out json. I.e. this chart is build with this dataset. The query interface is not well documented, buy you can see the request in the browser console when using the configurator. Of course, you could always just directly query the sqlite file yourself.
If you mean how to best make the statistics available through the game itself, I have semi-bad news. Wooza currently has the statistics site linked in-game via the message of the day entry, but the problem is that the in-game webview supports only a weird subset of javascript, and Plotly does not like that (nothing is shown). So we currently need to fallback to the steam browser. It's a little bit annoying but works.
Thanks, you have been super helpful. =D
Do note that is on a 32 and 42 player server. Balance is very different than in vanilla.
https://github.com/eBrute/wonitor
Obligatory name dropping: @wooza @Locke504 @SupaFred @ZEROibis
Awesome! Can't wait to trawl the stats. Been hoping for something like this since the Hive was announced.
Such stats, much want.
Tieing all the individual player stats to tech path stats to round wins, etc.
Many interesting and altogether useless conclusions could be drawn from such a cache. I very much hope the new hive has stuff like this.
http://pastebin.com/fPseSUR7
Some of the stats may be redundant because of how I structure it, as it's meant to be sent to the players.
Have in mind that this would be saved with the epoch time for round end in the config folder under NS2Plus\stats\ so each round would generate a new file. And it'd be disabled by default.
I haven't published it yet, just in case someone needs something formatted in a different way or this will work for them, etc.
I also added hiveSkill and score to the things that it tracks per-player.
@Brute Eternal thanks for creating this mod. I almost gave up finding a modder that actually listen to me.
I hope I'll find your name later on the squad5 page
Boss sauce man. This is great!
Now that I run my own web server I can host a wonitor page if any other server op wants to run it.
There are many new features, mostly tiny stuff. I.e. it is now possible to add multiple constraints (i.e. select all rounds where the map is tram OR docking), there are new constraints for "is not", and globbing support (i.e. select all maps that match "ns2_*"), a correct handling for some unexpected values (i.e. there were rounds with 0 players that had strange average skill) and a better landing page that auto updates server names.
Also it is possible to save NS2+ stats now. They will be saved in a separate database, and you cannot make fancy graphs with it, but if you need it for further analysis, the option to store them is there now. It is kind of large (50MB/1000 rounds) so I set the defaults to not save it and keep it 100% optional. On the other hand, that is not too big, so you may want to start recording now to have the data available later. There are many things you could possibly do with the NS2+ data, since it contains so many useful things. Personal stats, hive like rankings, alternative skill systems (separated by team and commander), etc. But currently there is only one tool that makes use of it and I have no plans for other things.
I was told that mappers could make good use of a map that shows all death locations, so here it is:
Using the filters, you can also use it so answer questions like "who keeps killing my lerk", "where are all those onos getting killed", or "does anyone ever use stab as a fade". Or you can kind of replay that one round you won as a commander, over and over again.
If you are upgrading from the old version, you can keep all your records. Here is what you need to do
[1]:
http://apheriox.com/wonitor/deathMap.php