Jump to content
Sign in to follow this  
Kuroialty

Is there a tool that records team average WN8 in randoms?

Recommended Posts

If you find the tool, consider getting it to record ALL the ratings, rather than the average.  

That will allow for more diverse statistical analysis.  Even if you aren't willing to perform them, someone else might be if you make the data public.  

You should probably make a note of the days, times, and server used as well.

Share this post


Link to post
Share on other sites

I'm pretty sure it is possible to make such a tool, I'm half heartedly working on it now.

RichardNixon claimed to have developed one last year, but he has disappeared from the Wotlabs forums and doesn't read PMs on the official forums.

But anyway, it is possible to extract the names of all the players and put them in a file via a script, I don't know how to query the XVM server for each name though. I'm sure it is possible, I just don't know how to do it.

But once you have that info it'd be easy enough to get a mean and std dev for the WN8 of each team.

Share this post


Link to post
Share on other sites

I ask because I'm interested in doing a before-and-after analysis on the average of some skill metrics in the low tiers for when the new MM comes in 9.7 to (supposedly) separate the veterans from the newbs.

 

I'm not interested in doing that though if I have to manually collect data by screenshotting every battle and transcribing data.

 

I think vbaddict does.

 

I poked around on vbaddict and couldn't find anything like this.  Battle summary info tends to only have information about what each player did in each battle and nothing about what each player's stats are.

Share this post


Link to post
Share on other sites

The player information is in replay files. So, start saving those. You may be able to get what you need out of them with wotdecoder.

A mod to XVM that dumps the information to a file when the battle loads wouldn't be too hard. I personally don't have time to do it right now.

I do have a Python script that retrieves stats from the XVM servers if someone needs that. I decided not to go that route with wotscout.

Share this post


Link to post
Share on other sites

OK, I'll dig it up and put it on GitHub when I get back to my desk.

Edit: No need for GitHub. It's really simple:
 

import json
import requests


def get_token(player_id, xvm_token=None):
    url = 'http://stat.modxvm.com/3.0/checkToken/{0}'.format(player_id)
    if xvm_token is not None:
        url += '/{0}'.format(xvm_token)
    r = requests.get(url, timeout=1.0, verify=False)
    return json.loads(r.text)


def get_player_by_id(xvm_token, player_id):
    url = 'http://stat.modxvm.com/3.0/user/{0}/{1}'.format(xvm_token,player_id)
    r = requests.get(url, timeout=1.0, verify=False)
    return json.loads(r.text)


def get_player_by_name(xvm_token, region, nickname):
    url = 'http://stat.modxvm.com/3.0/nick/{0}/{1}/{2}'.format(xvm_token,region, name)
    r = requests.get(url, timeout=1.0, verify=False)
    return json.loads(r.text)

Use get_token with a valid WOT player ID. It should return a dictionary with a 'token' field. Make sure to save that token for future use because XVM returns a 'badtoken' status if you try to grab it more than once. I'm not sure what the timeout is on a new request. The doesn't seem to ever change, but you will have to go reactivate XVM every two weeks.

 

Use the token you get from that request for statistics queries using the get_player_* functions. It returns an array of dictionaries with 'wn8' fields. You can also request batches of players in one go, but I wasn't going to use that and didn't implement it. It's preferable to user player ID, but you can do nickname look-ups too with the region code (e.g. 'NA').

 

This code is hereby licensed for use under the WTFPL.

Share this post


Link to post
Share on other sites

I ended up enlisting the help of a friend to make the script work better, and together we murdered it beyond repair. 

 

I'll give it another shot sometime later, I'm very disappointed.

Share this post


Link to post
Share on other sites

OK, I'll dig it up and put it on GitHub when I get back to my desk.

Edit: No need for GitHub. It's really simple:

 

import json
import requests


def get_token(player_id, xvm_token=None):
    url = 'http://stat.modxvm.com/3.0/checkToken/{0}'.format(player_id)
    if xvm_token is not None:
        url += '/{0}'.format(xvm_token)
    r = requests.get(url, timeout=1.0, verify=False)
    return json.loads(r.text)


def get_player_by_id(xvm_token, player_id):
    url = 'http://stat.modxvm.com/3.0/user/{0}/{1}'.format(xvm_token,player_id)
    r = requests.get(url, timeout=1.0, verify=False)
    return json.loads(r.text)


def get_player_by_name(xvm_token, region, nickname):
    url = 'http://stat.modxvm.com/3.0/nick/{0}/{1}/{2}'.format(xvm_token,region, name)
    r = requests.get(url, timeout=1.0, verify=False)
    return json.loads(r.text)

Use get_token with a valid WOT player ID. It should return a dictionary with a 'token' field. Make sure to save that token for future use because XVM returns a 'badtoken' status if you try to grab it more than once. I'm not sure what the timeout is on a new request. The doesn't seem to ever change, but you will have to go reactivate XVM every two weeks.

 

Use the token you get from that request for statistics queries using the get_player_* functions. It returns an array of dictionaries with 'wn8' fields. You can also request batches of players in one go, but I wasn't going to use that and didn't implement it. It's preferable to user player ID, but you can do nickname look-ups too with the region code (e.g. 'NA').

 

This code is hereby licensed for use under the WTFPL.

 

OK, got another version working reasonably well. The biggest problem I have is in about 1/3 of the replays I have, there is no "player" section. There is a "vehicle" section that has the player name in it, but there is no player ID in that section. Can I look up all those names by appending NA to the end of the name? What is the format? Would it be TreeburstNA or Treeburst_NA? Or something else?

 

Or I could read.... nevermind my last.

 

So using your third routine, I would do (xvm_token, region, nickname) but how do I get the token without having the player ID? It looks like from your first routine I need the player ID to get the token, not the player's name.

Share this post


Link to post
Share on other sites

Just use your own player ID. The token has to do with activating your account with modxvm.com. It's authenticating who is making the requests.

You need to check the token once at the beginning of your script. Save it to a file or database for future use. Use your token for each subsequent request.

Share this post


Link to post
Share on other sites

I think I can modify my script to include this quite easily.  My only concern is that it will take ages to process a lot of replays while waiting on the response from XVM.  It takes about 3-5 mins to process ~6k replays as it is.

 

Share this post


Link to post
Share on other sites

Just for the record, this is only viable when the game is actually played or right after. You can't get anything meaningful from ancient replay file and current XVM results.

The window is based on how often XVM refreshes, which I don't know.

Share this post


Link to post
Share on other sites

Just for the record, this is only viable when the game is actually played or right after. You can't get anything meaningful from ancient replay file and current XVM results.

The window is based on how often XVM refreshes, which I don't know.

 

That's an excellent point. However, a lot of tomatoes never improve. So, it probably would still sate Kurioalty's curiosity if he limits how far back the replays go.

Share this post


Link to post
Share on other sites

OK, after losing my temper in yet another streak of 'randomly' massively stacked games, I decided to try to get to work on this fucking script. So I have to manually edit each of these stupid input files because for some reason the 'personal quests' data gets stuck on like 3 lines, just for my info. Everyone elses info it is 1 line, and empty. So I end up with a file that looks like this, for every game.

 

         "team": 2,           "name": "VivaLaResistance",
         "team": 2,           "name": "Kurrus",
         "team": 1,           "name": "Brevillance",
         "team": 2,           "name": "cornmesser",
         "team": 1,           "name": "SnakeZillaMambaJuice",
         "team": 2,           "name": "antonio30",
         "team": 2,           "name": "iraqinfidel",
         "team": 1,           "name": "Blowd_Up_Reel_Good",
         "team": 1,           "name": "BattlePrincess",
         "team": 2,           "name": "ErwinRommel100",
         "team": 2,           "name": "lukasum1",
         "team": 2,           "name": "Treeburst",
         "team": 1,           "name": "Issa",
         "team": 1,           "name": "BigBillyBear",
         "team": 2,           "name": "daniel96",
         "team": 1,           "name": "goderdza123",
         "team": 1,           "name": "PMenos1",
         "team": 1,           "name": "austinwood247",
         "team": 2,           "name": "GoonerForever",
         "team": 2,           "name": "WyldChyld",
         "team": 1,           "name": "NWONKNU",
         "team": 2,           "name": "express1",
         "team": 1,           "name": "KoniBrad",
         "team": 2,           "name": "Lord_Manu",
         "team": 1,           "name": "Frankus7",
         "team": 2,           "name": "cheesyphil44",
         "team": 2,           "name": "edcadcor",
         "team": 1,           "name": "drh28",
         "team": 1,           "name": "loki29",
         "team": 1,           "name": "hector100",


I'd like to run the list of names through XVM and get a total XVM score for each team. What do you all think is the easiest way to make that happen?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...