NS2Stats.com - Statistics for Natural Selection 2

SintSint Join Date: 2007-01-09 Member: 59540Members, Squad Five Blue
edited August 2013 in Modding
http://ns2stats.com

What it is
- Player stats which are saved on database by every round played.
- Every played round can be tracked after and see who was playing and their stats.
- Combined overall data from played rounds per player.
- Cross server stats.
- Balance statistics
- Personal stats using private messages on server when round changes or with stats commands
- Build order stats
- Upgrade tracker, also includes buildings dropped/built

Other features:
- Assists -scoreboard item
- AFK kick (players in serverAdmin.json wont get kicked)
- Unstuck chat command: /stuck
- Tournament mode for private servers
- Votemap console command
- Server MOTD
- Includes Huze's Badges mod support
- Automatic map reload for mods every 30mins (if server empty)
- Game tagging, with console command tag. See 'stats'-console command.
- Heatmaps and minimap overview of round actions
- Auto-arrange by ELO (experiemental, sv_autoarrange to enable, gets enabled when 8 players)
- Round end awards (currently simple)
- Killstreak sounds + text (sv_killstreaks to enable)
- Ingame 'stats'-command:
### ::NS2Stats.com::                                                                                                          
## Available commands (224830):                                                                                                
#                                                                                                                              
# stats help : This help                                                                                                       
# stats rank : Your rank and rating.                                                                                           
# stats stats : Your personal stats                                                                                            
# stats topkills : Top 10 kill counts                                                                                          
# stats login <your code> : Logs you in, required for some actions                                                             
# stats hide : Hide/show your stat page on website (login required)                                                            
#- Commands without stats prefix:                                                                                              
# ns2stats_settings : shows settings menu, currently able to change which browser check command uses.                          
# votemap : Allows you to vote for map change (if enabled)                                                                     
# players : Lists players with their steam name,ranking and rating (if auto-arrange enabled)                                   
# ready : Makes your team ready in tournament mode.                                                                            
# tag : Usage : tag "Exertus vs Archaea", Use during game, resets when game starts. Searchable on web. (soon)                  
#- Chat commands:                                                                                                              
# /stuck or /unstuck: Attempts to free you                                                                                     
# ready or rdy: Makes your team ready in tournament mode.   

How it works
- Data is gathered during round into memory logs which are send to specified website after game has ended. This data is parsed on website and saved to database there.
- Server admins need to install lua mod from workshop and stats are ready to be saved. More specific instructions can be found http://ns2stats.com/site/install. Stats are always cross-server for now, but there is settings to choose servers from where data is shown (filter).

Servers currently running NS2Stats can be found:
http://ns2stats.com/server/index

If you experience bugs please contact synomi66@gmail.com or post here. NS2Stats will get updated weekly so check for new versions now and then, at least after new builds! You should get notifications to server also if you have old version in use.


We are looking for coders to keep making NS2Stats better! If you have interest please contact me with private message or send mail to synomi66@gmail.com.
What we require:
- You should have pretty much free time.
- You need to have experience with lua or making websites. Website uses Yii framework so its coded with PHP and uses MySQL database. So being able to use framework is required if applying for website development.
- You need to be familiar with SVN.
- You should have lot of interest in NS2 and play it regularly.

http://ns2stats.com source code is on Github!
Lua mod is too on GitHub.

What we are planning:
Website:
- Improve round pages and minimap.
- More live stats and live minimaps for servers.
- Awards, kinda like achievements. Can reward badges.
- NS2Stats badges which can be seen in-game on scoreboard.
- Referee system, certain trusted people could control competitive servers as admin if server is set to allow referees.
- New rounds page with search and more detailed and longer list of played rounds.
- Player content, customizable player page. Player videos. Could be attached to rounds.
- Better highlighting for tournament and other competitive games.
- Fix bugs, make website faster and more stable.
- Improve NS2Stats API.
Lua:
- Improve the way data is sent to ns2stats.com.
- New awards. Better display.
- Graphical windows with stats.
- More in-game commands.
- Improve existing features like auto-arrange and tournament mode.
Plus lot more already in todo-list. And new ideas are always welcome.

NS2Stats was created by Synomi(me), Zeikko, zups(supsu) and rantology. Current developers: Synomi and GhoulofGSG9 (looking for more).


You can find us hanging on #ns2stats @ quakenet 24/7. Feel free to drop by and discuss about NS2stats or other programming related stuff.

Special thanks to:
- dmni
- Ryne
- Mendasp
- Team Exertus
- Gamerkatze
- Gohan Zeta
And many more of you who has helped with the NS2Stats.
«13456

Comments

  • GamerkatzeGamerkatze Join Date: 2012-06-27 Member: 153711Members
    it also supports mapvote, a tournament system, unstuck, afk kick and motd ;)
  • Rich_Rich_ Join Date: 2012-11-05 Member: 167152Members
    edited March 2013
    more server need this i only have 2 games statted up
    and they were very. very sexy games.
  • gH0sTygH0sTy Join Date: 2013-02-01 Member: 182727Members, Reinforced - Shadow
    The main problem is that the server will be flagged as modded and modded servers are ghost towns
  • GISPGISP Battle Gorge Denmark Join Date: 2004-03-20 Member: 27460Members, Playtest Lead, Forum Moderators, Constellation, NS2 Playtester, Squad Five Blue, Squad Five Silver, Squad Five Gold, NS2 Map Tester, Reinforced - Onos, WC 2013 - Gold, Subnautica Playtester, Forum staff
    edited March 2013
    UWE is working on more transparancy/beter interface whit the serverlist. So you can see what mods is on a server before joining and stuff.
  • SintSint Join Date: 2007-01-09 Member: 59540Members, Squad Five Blue
    [UPDATE]
    Added ns2stats_settings console command. Enables client side ns2stats settings changes. Currently allows to change which browser check-command uses.
    Usage: ns2stats_settings toggle_browser
  • 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
    Awesome! Much appreciated! :)
  • NominousNominous Baltimore, MD Join Date: 2012-02-18 Member: 146518Members
    This is a must-have mod on any reputable server. Imo, the "Other features" include some of the most important and intuitive features for NS2.

    A question I have regarding this mod is how the ranking is determined. On ns2stats.org, my ranking is currently 124 out of 100,000+, which I'm guessing is out of the total amount of NS2 players. My marine ranking is 58 out of 2,000+, while my alien ranking is 731 out of 1,600+. These rankings can't possibly be out of the total amount of players, though. Also, my recently recorded KDR is a bit higher than quite a few players who are ranked, overall, higher than me. Does this mean that ranks are computed based on how much total time you have played NS2 rather than how well you do with less time played?

    Concerning the recent rounds one has played, I've also noticed that some players ranked within the top 100 have no recent stats recorded. I'm guessing these players keep their high rankings due to old stats. My real question is whether players' total KDRs are recorded and stored, even though this long-term data is not available for viewing.
  • DarkSeraphDarkSeraph Join Date: 2004-06-07 Member: 29174Members
    I truly love this mod and wish every server would run it.

    Sint were you able to fix the mod for combat? I'm dying to get combat statistics again!
  • ScardyBobScardyBob ScardyBob Join Date: 2009-11-25 Member: 69528Forum Admins, Forum Moderators, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, WC 2013 - Shadow
    Would still love the ability to download data in something like a csv or xml format.
  • SintSint Join Date: 2007-01-09 Member: 59540Members, Squad Five Blue
    edited March 2013
    Karnaj wrote: »
    This is a must-have mod on any reputable server. Imo, the "Other features" include some of the most important and intuitive features for NS2.

    A question I have regarding this mod is how the ranking is determined. On ns2stats.org, my ranking is currently 124 out of 100,000+, which I'm guessing is out of the total amount of NS2 players. My marine ranking is 58 out of 2,000+, while my alien ranking is 731 out of 1,600+. These rankings can't possibly be out of the total amount of players, though. Also, my recently recorded KDR is a bit higher than quite a few players who are ranked, overall, higher than me. Does this mean that ranks are computed based on how much total time you have played NS2 rather than how well you do with less time played?

    Concerning the recent rounds one has played, I've also noticed that some players ranked within the top 100 have no recent stats recorded. I'm guessing these players keep their high rankings due to old stats. My real question is whether players' total KDRs are recorded and stored, even though this long-term data is not available for viewing.

    Ranking raises faster if you play better, but its not skill gauge. More you play more it raises usually, you gain more than you lose for example when killing opponent compared to when dying. Its still unfinished and that's why there is that (might reset) -text. Recent games makes use of filter, did you have competitive games selected? But yes rankings and ELO ratings do not degrade over time and filters are not used to them.
  • SintSint Join Date: 2007-01-09 Member: 59540Members, Squad Five Blue
    DarkSeraph wrote: »
    I truly love this mod and wish every server would run it.

    Sint were you able to fix the mod for combat? I'm dying to get combat statistics again!

    It seems that combat mod will break if ns2stats is enabled. NS2Stats lua mod will prob get reworked soonish to be a plugin for framework currently being made by bawNg. This should help with the issue.
  • SintSint Join Date: 2007-01-09 Member: 59540Members, Squad Five Blue
    ScardyBob wrote: »
    Would still love the ability to download data in something like a csv or xml format.

    What kind of data? I can add more stuff to API, and if json is not acceptable, also can make it return xml if that is fine. Were you able to download some .csv file before? There seems to be some old csv file for you in root directory. Dunno what Zeikko made.
  • insane_enufinsane_enuf Join Date: 2003-06-09 Member: 17160Members
    Is there a way to grab all rounds played on a particular server? I'd like to use stats to improve the r/ns2 pug team picking experience
  • SintSint Join Date: 2007-01-09 Member: 59540Members, Squad Five Blue
    [UPDATE]
    http://ns2stats.org source code is now public on Github!
    We are planning to make parts of the database public too, but copy from original. Website code is coded by Zeikko (most) and me. We are still looking for coders. If you can "read" the source code and you are interested in NS2 and stats contact me with private message or mail(synomi66@gmail.com). Other help with the code is also welcome.

  • DarkSeraphDarkSeraph Join Date: 2004-06-07 Member: 29174Members
    edited April 2013
    I know the lua rework will take a while, which is a bummer as I love combat map stats and can't balance my map without it.

    Have you also thought about the possibility of adding some sort of kill heatmap? Some of the things discussed in this thread would be really useful (and you might be able to pick up a new coder).
  • SintSint Join Date: 2007-01-09 Member: 59540Members, Squad Five Blue
    Is there a way to grab all rounds played on a particular server? I'd like to use stats to improve the r/ns2 pug team picking experience
    Sorry I don't know what you mean by this, do you mean API function or something? And what kind of data would need to be returned. Or is it more like normal round list on webpage?
  • SintSint Join Date: 2007-01-09 Member: 59540Members, Squad Five Blue
    DarkSeraph wrote: »
    I know the lua rework will take a while, which is a bummer as I love combat map stats and can't balance my map without it.

    Have you also thought about the possibility of adding some sort of kill heatmap? Some of the things discussed in this thread would be really useful (and you might be able to pick up a new coder).

    I started making death heatmaps per map couple weeks ago, but did not finish it yet. Had some problems with scaling or something, but heard possible solution for it. Yeh checking that post thx.
  • SintSint Join Date: 2007-01-09 Member: 59540Members, Squad Five Blue
    edited April 2013
    NS2 development database is now available for public. Database content is copy taken from live databse at 2nd of April 2013. Only player IPs and server keys are nullified. Database can be browsed with phpmyadmin and can be remotely accessed. Might be slow if there are couple users.
    More info with address + user + pass at https://github.com/Synomi66/ns2stats_web_source
  • Racer1Racer1 Join Date: 2002-11-22 Member: 9615Members
    Question: Is the NS2Stats mod trying to be both a stats collection and admin mod? Over time, It seems to be getting more and more features that normally fall under the administration category (such as auto-kick, map-voting, badges, etc).
  • SintSint Join Date: 2007-01-09 Member: 59540Members, Squad Five Blue
    edited April 2013
    Racer1 wrote: »
    Question: Is the NS2Stats mod trying to be both a stats collection and admin mod? Over time, It seems to be getting more and more features that normally fall under the administration category (such as auto-kick, map-voting, badges, etc).

    It has features which improve playing experience, we do not want stats of idling players getting owned and votemap will help gathers to change map. Goal is to have ns2stats as many servers as possible so we have done simple features which are quite useful and might bring more interest into it.

    Thou i disagree with badges being administration thingy. Badges could be earned through awards and be a display of players skill.

  • ScardyBobScardyBob ScardyBob Join Date: 2009-11-25 Member: 69528Forum Admins, Forum Moderators, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, WC 2013 - Shadow
    Sint wrote: »
    What kind of data? I can add more stuff to API, and if json is not acceptable, also can make it return xml if that is fine. Were you able to download some .csv file before? There seems to be some old csv file for you in root directory. Dunno what Zeikko made.
    All of the info you display on the round stats page is primarily what I'm looking for. Zeikko manually created a csv of older round stats for me a while ago, but it would be nice if there was some automated method to do so. Also, the ability to select which rounds to download via checkboxes would be great.
  • SintSint Join Date: 2007-01-09 Member: 59540Members, Squad Five Blue
    [UPDATE]
    - Updated lua for build 244
    - Fixed issue with scores not resetting in tournament mode (sorry for late fix, only just heard of this bug today)

    If you come across any issues concerning NS2Stats please post them here or send a private message. I do not play NS2 much and testing is limited.
  • JimWestJimWest Join Date: 2010-01-03 Member: 69865Members, Reinforced - Silver
    Maybe I could help you improve the loading of the mod.

    Currently, youre not hooking anything but copy the player.lua and put your loaded code in,
    that causes problems with some mods (combat).

    But the mod can also be loaded via hooks, so it will work like it do now,
    but doesnt affect other mods.
  • SintSint Join Date: 2007-01-09 Member: 59540Members, Squad Five Blue
    edited April 2013
    JimWest wrote: »
    Maybe I could help you improve the loading of the mod.

    Currently, youre not hooking anything but copy the player.lua and put your loaded code in,
    that causes problems with some mods (combat).

    But the mod can also be loaded via hooks, so it will work like it do now,
    but doesnt affect other mods.

    Yeah it would be nice to get it to work with combat mod, and mod breaks in every new build, so that is an issue too. About 5% of code is in modified original ns2 files. So those would need to get hooked. Some functions could be overridden too, but i guess hooking is better. I do not really have much time to code lua anymore so mostly just have been updating the lua to work with new builds, so haven't looked into hooking other than timers+commands.
  • SintSint Join Date: 2007-01-09 Member: 59540Members, Squad Five Blue
    - Added simple death heatmaps http://ns2stats.org/map/map/74 (thanks Megagun!)
  • JimWestJimWest Join Date: 2010-01-03 Member: 69865Members, Reinforced - Silver
    Btw., I've changed the mod into hooking mechanism (not all the time possible but mostly),
    not fixing the bug with combat, it's cause we're using an old hooking system that seems to be
    is not working with other mods very well.

    Anywhy were currently rewriting the combat mod cause it's based on a very old code base.
    If you want to have the code from ns2 stats "hooked", I can send it to you.
  • DarkSeraphDarkSeraph Join Date: 2004-06-07 Member: 29174Members
    Sint wrote: »
    - Added simple death heatmaps http://ns2stats.org/map/map/74 (thanks Megagun!)

    Awesome! Any chance you can also have it by team? I'd love to see if there are spots where marines or aliens get more kills, or if it's pretty even.

    I also wish that there was an easier way to filter by game type, other than parsing through the list of 1 million mods. That way you can easily exclude stats from other games types, and pull just combat, just classic, or just your balance test mod.

    I'm so excited about having ns2stats loaded via hooks, any ETA?
  • NatteNatte Join Date: 2013-04-11 Member: 184746Members
    I'm having some issues with the mod, I installed it on my server this morning and everything was working great. Played a few rounds and everything seemed to parse to the site so I logged off for a few hours.
    When returning I couldn't get past the consistency checks as about 10-20 different luas seemed to differ.

    I then tried validating both client install and server install trying to get them to match up but no go. Eventually figured out that I could join the server if I removed my workshop folder in %appdata% (on my pc, not the server) however once I exited the game once I couldn't/can't get back in.

    Anyone having similar issues? I figure it might be because of the latest NS build but I can't be sure as I didnt have the mod prior to that.

    Sorry for my rusty english but hopefully you get what my problem is :)
  • TechnIckSTechnIckS Join Date: 2007-01-14 Member: 59616Members
    You are not alone. I get the same thing.

    When an UNSUBSCRIBED mod automatically gets downloaded when joining a modded server, upon exiting NS2, NOT ALL MOD FILES GET ERASED.

    In the case of NS2Stats, sound/killstreaks.fsb, sound/killstreaks.soundinfo and .modinfo remain there.

    Next time NS2 is launched, it assumes that if the folder and .modinfo is there, the mod exists there entirely therefore it does NOT re-download all the missing files.

    Once we try joining SAME server (or any other server with same mod on it), player will automatically get a "Your game files do not match the server's" error.
  • SintSint Join Date: 2007-01-09 Member: 59540Members, Squad Five Blue
    Natte wrote: »
    I'm having some issues with the mod, I installed it on my server this morning and everything was working great. Played a few rounds and everything seemed to parse to the site so I logged off for a few hours.
    When returning I couldn't get past the consistency checks as about 10-20 different luas seemed to differ.

    I then tried validating both client install and server install trying to get them to match up but no go. Eventually figured out that I could join the server if I removed my workshop folder in %appdata% (on my pc, not the server) however once I exited the game once I couldn't/can't get back in.

    Anyone having similar issues? I figure it might be because of the latest NS build but I can't be sure as I didnt have the mod prior to that.

    Sorry for my rusty english but hopefully you get what my problem is :)
    wireaudio wrote: »
    You are not alone. I get the same thing.

    When an UNSUBSCRIBED mod automatically gets downloaded when joining a modded server, upon exiting NS2, NOT ALL MOD FILES GET ERASED.

    In the case of NS2Stats, sound/killstreaks.fsb, sound/killstreaks.soundinfo and .modinfo remain there.

    Next time NS2 is launched, it assumes that if the folder and .modinfo is there, the mod exists there entirely therefore it does NOT re-download all the missing files.

    Once we try joining SAME server (or any other server with same mod on it), player will automatically get a "Your game files do not match the server's" error.

    I haven't updated the mod after build 245, so it must be workshop issue. I have not heard about this issue before, so hopefully it will fix itself when workshop starts working how it should.
Sign In or Register to comment.