Wonitor - Server-side statistics tool

BruteBrute Join Date: 2009-06-10 Member: 67778Members, Squad Five Blue, Reinforced - Shadow, WC 2013 - Shadow
edited January 2016 in Modding
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:
dlotD35.png

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

  • Locke504Locke504 Join Date: 2010-04-23 Member: 71511Members, NS2 Map Tester
    This looks awesome. I'd like to know more about how to get this running on another server and how best to consume the data.
  • NordicNordic Long term camping in Kodiak Join Date: 2012-05-13 Member: 151995Members, NS2 Playtester, NS2 Map Tester, Reinforced - Supporter, Reinforced - Silver, Reinforced - Shadow
    @Rusty @Wyzcrack @ZEROibis and any other server admins. You all need this and should all share your link to statistics here.
  • BruteBrute Join Date: 2009-06-10 Member: 67778Members, Squad Five Blue, Reinforced - Shadow, WC 2013 - Shadow
    Maybe I should write a readme file, but "getting this running" should be simple.
    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.
  • Saffron_bakerSaffron_baker Sweden Join Date: 2015-06-09 Member: 205352Members
    I Love how maps like derelict, eclipse and hydra are told to be some of the most unbalanced maps but acording to this they are one of few balanced maps...
  • Locke504Locke504 Join Date: 2010-04-23 Member: 71511Members, NS2 Map Tester
    edited January 2016

    Thanks, you have been super helpful. =D
  • NordicNordic Long term camping in Kodiak Join Date: 2012-05-13 Member: 151995Members, NS2 Playtester, NS2 Map Tester, Reinforced - Supporter, Reinforced - Silver, Reinforced - Shadow
    I Love how maps like derelict, eclipse and hydra are told to be some of the most unbalanced maps but acording to this they are one of few balanced maps...

    Do note that is on a 32 and 42 player server. Balance is very different than in vanilla.
  • woozawooza Switzerland Join Date: 2013-11-21 Member: 189496Members, Squad Five Blue
    Don't forget to mention that besides the slotsize everything remained vanilla (despite for one more IP for marines) :P
  • ZEROibisZEROibis Join Date: 2009-10-30 Member: 69176Members, Constellation
    Where is the link to the downloads and setup instructions?
  • CalegoCalego Join Date: 2013-01-24 Member: 181848Members, NS2 Map Tester
    Brute wrote: »
    Got multiple request from people who want this for their servers. So I made it a stand alone mod and wrote a readme that will hopefully cover everything.

    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.
  • CalegoCalego Join Date: 2013-01-24 Member: 181848Members, NS2 Map Tester
    Mendasp wrote: »
    If you want more stats I can easily make NS2+ dump the round stats in a json file server-side too so you can use that too.

    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.
  • MendaspMendasp I touch maps in inappropriate places Valencia, Spain Join Date: 2002-07-05 Member: 884Members, NS1 Playtester, Contributor, Constellation, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow, WC 2013 - Shadow, Retired Community Developer
    Ok, here's a sample output from a quick round with cheats on (so autobuild, gave myself res to build some more, etc):

    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.
  • FursFurs Join Date: 2013-09-20 Member: 188365Members, NS2 Playtester, Reinforced - Shadow
  • woozawooza Switzerland Join Date: 2013-11-21 Member: 189496Members, Squad Five Blue
    Great to see that other server op's are also interested.

    @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
  • Locke504Locke504 Join Date: 2010-04-23 Member: 71511Members, NS2 Map Tester
    Brute wrote: »
    Got multiple request from people who want this for their servers. So I made it a stand alone mod and wrote a readme that will hopefully cover everything.

    https://github.com/eBrute/wonitor

    Obligatory name dropping: @wooza @Locke504 @SupaFred @ZEROibis

    Boss sauce man. This is great!
  • MendaspMendasp I touch maps in inappropriate places Valencia, Spain Join Date: 2002-07-05 Member: 884Members, NS1 Playtester, Contributor, Constellation, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow, WC 2013 - Shadow, Retired Community Developer
    Ok, added a few more data points to the info available in NS2+. I added what the fields mean in the readme at github, in case there's any doubts.
  • SupaFredSupaFred Join Date: 2013-03-03 Member: 183652Members, NS2 Playtester, Squad Five Blue, NS2 Map Tester, Reinforced - Supporter, Reinforced - Silver, Reinforced - Shadow, WC 2013 - Silver
    Brute was kind enough to help me set up my own web server with wonitor. Stats from The Thirsty Onos can now be found on http://thirstyonos.com/wonitor

    Now that I run my own web server I can host a wonitor page if any other server op wants to run it.
  • BruteBrute Join Date: 2009-06-10 Member: 67778Members, Squad Five Blue, Reinforced - Shadow, WC 2013 - Shadow
Sign In or Register to comment.