1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Hey Guest ! Fancy contributing by becoming a moderator for PRTA? Fill out the application form!
  3. Hey Guest, PRTA is a service provided for free, this can become quite costly at times... :(
    It'd be great if you'd consider making a small contribution here. All support is greatly appreciated!

PR stats website

Discussion in 'Discussion' started by Avram, Apr 14, 2017.

  1. Offline

    Joined:
    Apr 13, 2017
    Messages:
    10
    Likes Received:
    33
    Trophy Points:
    15
    Squad Name:
    sEX_YU
    PR:BF2 Name:
    Sgt_Baker
    This is something I was making on and off for about six months (more off than on :biggrin:). It's a website which tracks your PRstats (almost) in real-time. Nothing special since PRSpy (which is used as a data feed) does not provide too much data, but I guess it's better to have any stats than no stats :smile:

    www.PRstats.tk

    What do you think? I'd like to hear some feedback.

    p.s. PRTA server page is here: http://prstats.tk/server/2/prtaco-eu-modern-conflict
    Wicca, cassius23, Blaze. and 8 others like this.
  2. Offline

    Joined:
    Jul 27, 2015
    Messages:
    1,172
    Likes Received:
    693
    Trophy Points:
    281
    PR:BF2 Name:
    ArkUTD
    VatsugC likes this.
  3. Offline
    VatsugC VatsugC Point Man

    Joined:
    Dec 21, 2016
    Messages:
    350
    Likes Received:
    410
    Trophy Points:
    145
    Occupation:
    Teacher
    Location:
    Norway
    PR:BF2 Name:
    Vatsug
    haha, nice - Keep at it, always nice with some sort of competition
    ArkUTD likes this.
  4. Offline

    Joined:
    Apr 13, 2017
    Messages:
    10
    Likes Received:
    33
    Trophy Points:
    15
    Squad Name:
    sEX_YU
    PR:BF2 Name:
    Sgt_Baker
    I will :biggrin: btw. we played 2 days ago, I'm Sgt_Baker :biggrin:
    Blaze. and ArkUTD like this.
  5. Offline
    Hayal_Israeli Hayal_Israeli My !b avada kedavra spell will be yours!

    Donor

    Joined:
    Sep 18, 2016
    Messages:
    463
    Likes Received:
    409
    Trophy Points:
    185
    Occupation:
    המפקד בשריון יבן זונה
    Location:
    Israel
    PR:BF2 Name:
    Hayal_Israeli
    Mate it looks cool, could you maybe do clan's roster?
  6. Offline

    Joined:
    Apr 13, 2017
    Messages:
    10
    Likes Received:
    33
    Trophy Points:
    15
    Squad Name:
    sEX_YU
    PR:BF2 Name:
    Sgt_Baker
    It's already done, but the players from the clan must play on public servers in order to be registered with the website. The site is live for about a week now so it will take some time to pick up all (active) players. Clan tag must be the same for all players in order to group them by the clan. For example, all players with tag sEX_YU (my clan) will be grouped in a single clan, but tags A-|Cpt, A-|Sgt and A-|Pvt are seen as three different clans (although, in reality, they all belong to the same crew).

    Is this your clan? http://prstats.tk/clan/125/ilra
    clayton likes this.
  7. Offline
    Hayal_Israeli Hayal_Israeli My !b avada kedavra spell will be yours!

    Donor

    Joined:
    Sep 18, 2016
    Messages:
    463
    Likes Received:
    409
    Trophy Points:
    185
    Occupation:
    המפקד בשריון יבן זונה
    Location:
    Israel
    PR:BF2 Name:
    Hayal_Israeli
    Same as A-| we have ranks
  8. Offline

    Joined:
    Sep 6, 2012
    Messages:
    601
    Likes Received:
    530
    Trophy Points:
    181
    Squad Name:
    Clayton
    PR:BF2 Name:
    Clayton
    so it list the top player from each clan. good work.
    ArkUTD likes this.
  9. Offline

    Joined:
    Apr 13, 2017
    Messages:
    10
    Likes Received:
    33
    Trophy Points:
    15
    Squad Name:
    sEX_YU
    PR:BF2 Name:
    Sgt_Baker
    It can list whatever I decide (or list nothing), I just thought listing top player would be cool
    --- Double Post Merged, Apr 15, 2017, Original Post Date: Apr 15, 2017 ---
    Unfortunately there is no way to detect such clans as one clan as clans do not have some kind of unique ID, only clan tag (6 letter text) :frown:
    Blaze., ArkUTD and Hayal_Israeli like this.
  10. Offline
    VatsugC VatsugC Point Man

    Joined:
    Dec 21, 2016
    Messages:
    350
    Likes Received:
    410
    Trophy Points:
    145
    Occupation:
    Teacher
    Location:
    Norway
    PR:BF2 Name:
    Vatsug
    There is, if you only search for the first 3 letters - worked for me :wink:
  11. Offline

    Joined:
    Apr 13, 2017
    Messages:
    10
    Likes Received:
    33
    Trophy Points:
    15
    Squad Name:
    sEX_YU
    PR:BF2 Name:
    Sgt_Baker
    Yeah but that's error prone as it can match completely unrelated clans as single clan :frown:
  12. Offline

    PR:BF2 Senior Administrator Coder Member PRTA

    Joined:
    Sep 13, 2015
    Messages:
    470
    Likes Received:
    379
    Trophy Points:
    166
    Location:
    Poland
    Discord:
    cassius23#3267
    PR:BF2 Name:
    cassius23
    Overall UI looks nice. You should try to differ between coop and pvp stats (as someone already mentioned).
    If you'll remove margin from .darkbg class, right column will look better (it is pushed into right border now).

    Are you parsing prspy data and saving every stat into particular player model?
    How is "Total played" time being computed? (not sure, but it might show lower amounts)
    --- Double Post Merged, Apr 15, 2017, Original Post Date: Apr 15, 2017 ---
    And last, server is recognized by an IP? (and when it changes a name, which name is being used?)
    ArkUTD likes this.
  13. Offline

    Joined:
    Apr 13, 2017
    Messages:
    10
    Likes Received:
    33
    Trophy Points:
    15
    Squad Name:
    sEX_YU
    PR:BF2 Name:
    Sgt_Baker
    Server is recognized by it's name OR combination of IP address/port number. So if the name changes it will be matched by IP/port (and name will be updated to a new name). If you change IP/port, it will be matched by name and IP/port info will be updated. Only if you change both name and IP/port it will be stored as a new server. At least that's how it should work :biggrin:

    I'm storing current score ("last score" if you stopped playing), total score, monthly score and "minutes played" in the players table. The key is consistency - there is a cron job script run every minute which is importing data. So each time it's run your total played time is increased by 1 minute (if you are playing currently).

    There is one caveat though - you can play 6 hours and have 100k score but if you're not in the top 64 players on the server your stats (including playing time) won't count. That's PRspy limitation and I can't do anything about it :frown: However if you jump up on the table and get into top 64 players, the points gained in the meantime will be calculated (current score - last score) but your playing time won't be updated. So yes, it can show less time than you actually played :/

    Thanks for your suggestions - I will see if I can improve this further. Btw. the script running this site is open-source so if anyone wants to contribute, feel free to submit PR* :smile: https://github.com/avramovic/PRstats

    * pull request, not project reality :biggrin:
    Last edited: Apr 16, 2017
  14. Offline
    Wicca Wicca Project Founder

    Head of PRTA PR:BF2 Resident Administrator NATO Potato

    Joined:
    Apr 28, 2011
    Messages:
    20,191
    Likes Received:
    6,469
    Trophy Points:
    251
    PR:BF2 Name:
    Wiccaaaaa
    Maybe you can pull the information from servers tracker files instad of prspy, afaik it tracks all information there.
  15. Offline
    Sloan Sloan Pirate

    Manager Technical Dept. Lead Coder Sysadmin

    Joined:
    Jul 5, 2012
    Messages:
    11,276
    Likes Received:
    5,637
    Trophy Points:
    301
    Occupation:
    Scientific software engineer
    Location:
    Barcelona
    PR:BF2 Name:
    Sloan[EEF]
    That's a game engine limitation:

    prbf2@eu1 ~/2 $ svctl query
    '[PR v1.4.7.0] PRTA.co | EU - Modern Conflict' : 'Assault on Grozny' : 82/100
    prbf2@eu1 ~/2 $ svctl query players | wc -l
    65

    The extra line reported there is the column headers.
    Avram and Chav like this.
  16. Offline

    Joined:
    Apr 13, 2017
    Messages:
    10
    Likes Received:
    33
    Trophy Points:
    15
    Squad Name:
    sEX_YU
    PR:BF2 Name:
    Sgt_Baker
    Small update: COOP servers are not being processed anymore. Unfortunately I can't remove already counted COOP points (unless I remove all the data from the database and start counting again). Maybe I could count them separately?

    Also, I've heard that people are already talking about kills, K/D ratio etc (in context of my app), so I wanted to hear what do you guys think about this? Can this site affect the community in negative way, for example users won't like to play "passive" kits (i.e. medic) due to the generally poor K/D ratio of such kits? I don't want to be responsible for something like that :biggrin:

    Maybe I could remove K/D information? But I'm afraid the whole website will lose it's point of existence because what else (besides points) is there to show? Or maybe keep the kills but remove number of deaths (and K/D ratio)?
    cassius23 likes this.
  17. Offline
    Sloan Sloan Pirate

    Manager Technical Dept. Lead Coder Sysadmin

    Joined:
    Jul 5, 2012
    Messages:
    11,276
    Likes Received:
    5,637
    Trophy Points:
    301
    Occupation:
    Scientific software engineer
    Location:
    Barcelona
    PR:BF2 Name:
    Sloan[EEF]
    It can, there are people who play for the scores or for KDR and this is a known issue with the in-game score-board. The extent of this effect on gameplay is unknown, though, and certainly swamped by the effect of the in-game score-board.
    https://en.wikipedia.org/wiki/TrueSkill
    How good are you at statistical modelling?
    Avram and cassius23 like this.
  18. Offline
    Wicca Wicca Project Founder

    Head of PRTA PR:BF2 Resident Administrator NATO Potato

    Joined:
    Apr 28, 2011
    Messages:
    20,191
    Likes Received:
    6,469
    Trophy Points:
    251
    PR:BF2 Name:
    Wiccaaaaa
    In a game like PR, there are so many skill trees that are hard to track, vehicles, lobbing grenades and rockets, artillery, logistics, aircrafts, ATGMs, Squadleading, spotting, sniping, CQB, working in teams of 2, larger squads. Combined arms.

    Etc.. etc..

    Tracking skills like that is impossible, and dumbing it down might make it unsavory. I would argue that you should try to track game time, whoever has the highest amount of time in the game, should be considered the best. This is the only metric that might show any form of skill, since experience usually trumps a given skill in killing players in APCs, or a lucky grenade etc. Not to mention the drivers, and pilots that are not displayed since they are spotting targets or doing other roles that might not be given points in kills.
    Oskar, ArkUTD, Blaze. and 2 others like this.
  19. Offline

    Manager PR:BF2 Head HR Lead Resident Moderator Senior Tester Member Ten Good Men

    Joined:
    Mar 12, 2013
    Messages:
    2,522
    Likes Received:
    1,560
    Trophy Points:
    291
    Location:
    England
    Squad Name:
    Chav
    PR:BF2 Name:
    Chav
    I created an "algorithm" for myself to use with Squad admin applicants that looks at the activity of a user on the forum and how much they had "contributed" in order to assist me in determining if they were suitable for the team based on how much they had contributed to the forum. I used the amount of points and likes and compared them to the amount of time they had been on the website. I know, a stupid way to determine if someone was appropriate for an admin team but you can use similar stats of "kills and deaths" (turn that into a ratio and and the player's "score" in order to create a "skill score" or something to that effect.

    This creates a cool way to compare people as this uses the score of the player as a comparative factor instead of kills and deaths, the results will be "unexpected". Just something cool you can consider with this.

    Very good work with the website, it's nice to see someone actively making something for this game.
  20. Offline

    Joined:
    Apr 13, 2017
    Messages:
    10
    Likes Received:
    33
    Trophy Points:
    15
    Squad Name:
    sEX_YU
    PR:BF2 Name:
    Sgt_Baker
    Sorry for the delay guys, I had a pretty rough couple of weeks at work and couldn't find time to work on the website. I have now hidden number of deaths and KDR from player profiles, hopefully that will work and make players play for the team, not for the score :smile:

Share This Page