Page 72 of 82 FirstFirst ... 22 62 70 71 72 73 74 ... LastLast
Results 711 to 720 of 814

Thread: Dota 2 Match History WebAPI

  1. #711
    Basic Member
    Join Date
    May 2014
    Posts
    10
    https://api.steampowered.com/IDOTA2Match_570/GetMatchHistory/V001/?format=XML&key=<key>&player_name=xx

    when i search ,the result is not i need .
    the result is have no search by 'player_name' this condition

  2. #712
    Basic Member
    Join Date
    Dec 2013
    Posts
    197
    Hey everyone,

    Quick question... is there an option to search for and retrieve only games which were NOT abandoned? I notice that when I do a normal search that pulls the last 100, many games are just a few minutes long, etc. I'd like to get data on games that actually finished. What's the best way to do this?

  3. #713
    Basic Member MuppetMaster42's Avatar
    Join Date
    Nov 2011
    Location
    Australia
    Posts
    585
    Quote Originally Posted by so nice View Post
    https://api.steampowered.com/IDOTA2Match_570/GetMatchHistory/V001/?format=XML&key=<key>&player_name=xx

    when i search ,the result is not i need .
    the result is have no search by 'player_name' this condition
    some fields have been deprecated or changed in how they work.
    I would strongly suggest that you do NOT use this method for getting matches.

    In stead find out their ID and search by that.

    Also why would you use XML? it's so bloated. Every language has a JSON parser, you should get the data using that in stead to save bandwidth.



    Quote Originally Posted by HiRoGliFiQ View Post
    Hey everyone,

    Quick question... is there an option to search for and retrieve only games which were NOT abandoned? I notice that when I do a normal search that pulls the last 100, many games are just a few minutes long, etc. I'd like to get data on games that actually finished. What's the best way to do this?
    there is not.
    you have to do that filtering manually.
    Personally...
    I first filter by lobby type (only ranked and public matchmaking matches) and player count (that's the best you can do to save yourself GetMatchDetails calls).
    Then I don't store data for matches less than 10 mins long and I filter out based on the player's leaver status.

  4. #714
    Basic Member
    Join Date
    Jun 2012
    Location
    London, UK
    Posts
    683
    Here's an updated tabbed list of hero IDs for anyone that needs it. Couldn't find a link to an updated one here:

    http://pastebin.com/8M4nXY1p

    Additionally I'll add that over the past few days (really, the past few months learning the intricacies of Google Sheets/Drive), I've sucessfully set up sheets to import and parse match data (my own matches), do some brief calculations for things like Gold Earned, and then save the data off into per-hero sheets, for some overall match/hero analysis (participation, hero match ups, item stats, etc). So if anyone is wanting to manipulate the match data on there and needs any info, I'd be glad to respond.

    Most important part is that without scripting there's no way to limit your API calls via the sheet, so it's important to use safeguards (I use simple IFs and ON/OFF switches) so that you can only ever make one call every however long (otherwise if you happened to modify your API call URL you'll be hitting the server for dozens of requests).

    Now the fun part begins, which is setting up fancy ways to display all this data. Yearly calendar showing winrate/XPM/XPM vs Opponent per day/month/quarter PER hero, automagically coloured? Etc. No problem My end goal is to actually calculate player role as accurately as possible, and do some things with that.
    Last edited by cinephile; 05-30-2014 at 10:45 AM.
    "It can't be bargained with. It can't be reasoned with. It doesn't feel pity, or remorse, or fear. And it absolutely will not stop, ever, until you are dead."
    Io, the Guardian Wisp

  5. #715
    Basic Member MuppetMaster42's Avatar
    Join Date
    Nov 2011
    Location
    Australia
    Posts
    585
    Quote Originally Posted by cinephile View Post
    Here's an updated tabbed list of hero IDs for anyone that needs it.
    there's an API for that.
    https://api.steampowered.com/IEconDO...nguage=en&key=

  6. #716
    Basic Member
    Join Date
    Jun 2012
    Location
    London, UK
    Posts
    683
    Quote Originally Posted by MuppetMaster42 View Post
    Ah, thanks
    "It can't be bargained with. It can't be reasoned with. It doesn't feel pity, or remorse, or fear. And it absolutely will not stop, ever, until you are dead."
    Io, the Guardian Wisp

  7. #717
    Basic Member
    Join Date
    Jun 2012
    Location
    London, UK
    Posts
    683
    Has anyone found a reliable calculation for gold lost through deaths?

    I have been calculating gold earned via GPM, and subtracting gold spent, and gold unspent, whilst adding starting gold back. The difference should then be the amount of gold the player lost. But this doesn't seem to be reliable, because sometimes the value is negative (by as much as a few thousand), meaning they lost more than they ever earned.

    My understanding of GPM is that it isn't affected by gold lost from death, it's purely about gold accumulated through whatever method. This is more or less the formula Dota uses

    Code:
    (goldCurrent+goldSpent+goldLost-goldStarting)/(gameDurationSeconds/60)
    You can use this formula during a game and get a figure mostly accurate to what Dota shows on the scoreboard. (I have included gold lost here, because you need to know it or approximate it, but I would think it is implicit in the other values the API provides.)

    The only thing I can think is that Dota doesn't include buybacks in its gold spent stat. Or my algebra is just wrong somewhere So... has anyone succeeded where I failed?
    Last edited by cinephile; 06-04-2014 at 08:42 PM.
    "It can't be bargained with. It can't be reasoned with. It doesn't feel pity, or remorse, or fear. And it absolutely will not stop, ever, until you are dead."
    Io, the Guardian Wisp

  8. #718
    Basic Member MuppetMaster42's Avatar
    Join Date
    Nov 2011
    Location
    Australia
    Posts
    585
    as per http://dev.dota2.com/showthread.php?t=53441
    GPM is Gold earned per minute.
    It does not take into account any gold lost by any means (be it spending it or dying).

    using GetMatchDetails field names, the equation should be something like:

    Code:
    total_gold_earned = round(gold_per_min * (duration / 60)) + gold
    total_gold_lost = total_gold_earned - gold_spent
    I.e. for the match ID 699650752, duration = 3377s
    for slot 0:
    gold = 561, gpm = 322, gold_spent = 15270

    i.e.
    Code:
    total_gold_earned = round(322 * (3377 / 60)) + 561
    total_gold_earned = 18123 + 561 = 18684g
    
    total_gold_lost = 18684 - 15270 = 3414g
    Last edited by MuppetMaster42; 06-04-2014 at 10:00 PM.

  9. #719
    Basic Member
    Join Date
    Jun 2012
    Location
    London, UK
    Posts
    683

    Red face

    The gold stat (ie what is in their inventory) is already included in GPM, though. So you have to subtract that from the gold earned as well. (Right?)

    ( (floor( GPM * gameMinutes) ) + goldStarting)) - goldSpent - goldUnspent

    That's the calculation I've been using. It doesn't always give a positive value.

    Here's a random game of mine:
    Code:
    436 gpm
    29.63 minutes
    625 starting gold
    12650 spent
    1125 unspent
    I'm really confused now. My spreadsheet gives -230. The algebra written out (WolframAlpha says correctly) gives -230
    There's a syntax error somewhere or one formula is wrong. Welp.

    If I write it out like this
    goldLost - goldUnspent = (goldStarting+goldEarnt) - goldSpent
    goldLost-1125 = (625+12920) - 11525

    I get gold lost = 3125.

    One of these formulae is probably right.

    edit: this last formula is the same as yours. My maths brain not stronk enough.

    I think this is the right formula

    ( 625 + (GPM*durationMinutes) ) + goldUnspent) - goldSpent

    Because otherwise, it seems to include 2X goldUnspent (maybe because it's a factor of GPM? I don't know).
    Last edited by cinephile; 06-05-2014 at 09:32 AM.
    "It can't be bargained with. It can't be reasoned with. It doesn't feel pity, or remorse, or fear. And it absolutely will not stop, ever, until you are dead."
    Io, the Guardian Wisp

  10. #720
    Basic Member
    Join Date
    Jun 2012
    Location
    London, UK
    Posts
    683
    I am reading that gold spent counts items which are sold back.

    ............

    Coincidentally another site using the API started last week and they ran into this same issue with odd negative gold lost.

    http://www.reddit.com/r/DotA2/commen...es_with_skill/

    Damnit. I spent hours debugging this, and I was right all along. Something was screwed up on the match stats. Sigh. Lesson learned? It's a nice day take a long walk...
    Last edited by cinephile; 06-05-2014 at 09:58 AM.
    "It can't be bargained with. It can't be reasoned with. It doesn't feel pity, or remorse, or fear. And it absolutely will not stop, ever, until you are dead."
    Io, the Guardian Wisp

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •