Announcement

Collapse

Forum Rules

  • No flaming or derogatory remarks, directly or through insinuation.
  • No discussion, sharing or referencing illegal software such as hacks, keygen, cracks and pirated software.
  • No offensive contents, including but not limited to, racism, gore or pornography.
  • No excessive spam/meme, i.e. copious one liners in a short period of time, typing with all caps or posting meme responses (text/image).
  • No trolling, including but not limited to, flame incitation, user provocation or false information distribution.
  • No link spamming or signature advertisements for content not specific to Dota 2.
  • No Dota 2 key requests, sell, trade etc.
  • You may not create multiple accounts for any purpose, including ban evasion, unless expressly permitted by a moderator.

  • Please search before posting. One thread per issue. Do not create another thread if there is an existing one already.
  • Before posting anything, make sure you check out all sticky threads (e.g., this). Do not create new threads about closed ones.
  • It is extremely important that you post in correct forum section.

  • Balance discussion only in Misc.
  • All art related (such as hero model) feedbacks go to Art Feedback Forum.
  • All matchmaking feedback should go here: Matchmaking Feedback
  • All report/low priority issues should go here: Commend/Report/Ban Feedback
  • No specific workshop item feedback. These should go to workshop page of that item.
  • When posting in non-bugs section (such as this), use [Bugs], [Discussion] or [Suggestion] prefix in your thread name.



In case you object some action by a moderator, please contact him directly through PM and explain your concerns politely. If you are still unable to resolve the issue, contact an administrator. Do not drag these issues in public.



All rules are meant to augment common sense, please use them when not conflicted with aforementioned policies.
See more
See less

THINGS YOU SHOULD KNOW BEFORE STARTING

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    Originally posted by MuppetMaster42 View Post
    Item IDs can be found in/parsed from the following game file:
    Code:
    <path to steam>/Steam/steamapps/common/dota 2 beta/game/dota/scripts/npc/items.txt
    It's packed in VPK files now, as per this post:
    http://dev.dota2.com/showthread.php?...ight=items.txt

    Probably should update the sticky.

    Comment


    • #32
      Is there an IRC channel for dota 2 web api talk?

      Comment


      • #33
        Originally posted by Shoot View Post
        Is there an IRC channel for dota 2 web api talk?
        A couple of us lurking in ##dota2webapi on freenode.

        Comment


        • #34
          Originally posted by alcaras View Post
          It's packed in VPK files now, as per this post:
          http://dev.dota2.com/showthread.php?...ight=items.txt

          Probably should update the sticky.
          You can unpack that file with gcfscape: http://nemesis.thewavelength.net/index.php?p=25

          Comment


          • #35
            Originally posted by MuppetMaster42 View Post

            GetMatchDetails
            Used to get detailed information about a specified match.

            Available options:
            Code:
            match_id=<id> # the match's ID
            Examples:
            To get the details for match with ID "XXXXX":
            Code:
            https://api.steampowered.com/IDOTA2Match_570/GetMatchDetails/V001/?key=<key>&match_id=XXXXX
            Result Field Format:
            • players - an array of players:
              • account_id - the player's 32-bit Steam ID
              • player_slot - an 8-bit unsigned int: if the left-most bit is set, the player was on dire. the two right-most bits represent the player slot (0-4)
              • hero_id - the numeric ID of the hero that the player used
              • item_0 - the numeric ID of the item that player had in their top-left slot
              • item_1 - the numeric ID of the item that player had in their top-center slot
              • item_2 - the numeric ID of the item that player had in their top-right slot
              • item_3 - the numeric ID of the item that player had in their bottom-left slot
              • item_4 - the numeric ID of the item that player had in their bottom-center slot
              • item_5 - the numeric ID of the item that player had in their bottom-right slot
              • kills - the number of kills the player got
              • deaths - the number of times the player died
              • assists - the number of assists the player got
              • leaver_status
                • NULL - player is a bot.
                • 2 - player abandoned game.
                • 1 - player left game after the game has become safe to leave/
                • 0 - Player stayed for the entire match.

              • gold - the amount of gold the player had left at the end of the match
              • last_hits - the number of times a player last-hit a creep
              • denies - the number of times a player denied a creep
              • gold_per_min - the player's total gold/min
              • xp_per_min - the player's total xp/min
              • gold_spent - the total amount of gold the player spent over the entire match
              • hero_damage - the amount of damage the player dealt to heroes
              • tower_damage - the amount of damage the player dealt to towers
              • hero_healing - the amount of damage the player healed
              • level - the player's final level
              • additional_units - (optional) term to account for units such as spirit bear
                • unitname - the name of the unit
                • item_0 - the inventory of the unit
                • item_1
                • item_2
                • item_3
                • item_4
                • item_5

            • season - ????????
            • radiant_win - true if radiant won, false otherwise
            • duration - the total time in seconds the match ran for
            • starttime - date in UTC seconds since Jan 1, 1970 (unix time format)
            • match_id - the numeric match ID
            • tower_status_radiant - an 11-bit unsinged int: see THIS THREAD
            • tower_status_dire - an 11-bit unsinged int: see THIS THREAD
            • barracks_status_radiant - a 6-bit unsinged int: see THIS THREAD
            • barracks_status_radiant - a 6-bit unsinged int: see THIS THREAD
            • cluster - see REPLAYS below
            • first_blood_time - the total time in seconds at which first blood occurred
            • replay_salt - see REPLAYS below
            • lobby_type - the type of lobby (0 for human matchmaking, 1 for co-op bot)
            • human_players - the number of human players in the match
            • leagueid - the leauge this match is from (see GetMatchHistory above)
            • positive_votes - the number of thumbs up the game has received
            • positive_votes - the number of thumbs up the game has received
            i added the part about additional units (e.g. spirit bear).
            Make sure to read the Forum Rules as well as the stickied Threads of the Forum Section you are posting in.

            Contributions i'd like to highlight:
            My Suggestion: Coaching System
            My Sticky: Intended Changes List
            My Challenge: Completely Fixed Hero Challenge: Skywrath Mage

            Comment


            • #36
              As I PM'ed, correct game modes are:

              var g_gamemodes =
              {
              '1' : 'All Pick',
              '2' : "Captains Mode",
              '3' : 'Random Draft',
              '4' : 'Single Draft',
              '5' : 'All Random',
              '6' : '?? INTRO/DEATH ??',
              '7' : 'The Diretide',
              '8' : "Reverse Captains Mode",
              '9' : 'Greeviling',
              '10' : 'Tutorial',
              '11' : 'Mid Only',
              '12' : 'Least Played',
              '13' : 'New Player Pool'
              };
              Take a look at any league match(110124683), and any all random match(115252636) (and any ap match, it's 1, not 0)
              I've got no idea what 6th mode is.
              You gotta FIGHT!
              For Your RIGHT!
              To BUUUGFIX!

              Comment


              • #37
                Originally posted by adrianlegg View Post
                As I PM'ed, correct game modes are:

                Take a look at any league match(110124683), and any all random match(115252636) (and any ap match, it's 1, not 0)
                I've got no idea what 6th mode is.
                Sorry, I forgot to check the notes on my laptop that I made on my holiday.. I was on autopilot!
                I just fixed it, thanks
                The API Bible: Things You Should Know Before Starting API Development

                Comment


                • #38
                  Not sure if this has been mentioned elsewhere and I couldn't find it, but to use the GetMatchHistoryBySequenceNum call you can use the option 'start_at_match_seq_num' . For example: http://api.steampowered.com/IDOTA2Match_570/GetMatchHistoryBySequenceNum/v0001/?key=<key>&start_at_match_seq_num=107083073

                  I'm not sure what other options there are. I tried using some of the options from the GetMatchHistory call but other than matches_requested=<n> they didn't seem to effect the call.
                  datdota.com -- Dota 2 Stats for the Professional Scene

                  Comment


                  • #39
                    Yes, that's been mentioned and documented. GetMatchHistoryBySequenceNum has three parameters - key, start_at_match_seq_num (optional) and matches_requested (optional)

                    Comment


                    • #40
                      Originally posted by MuppetMaster42 View Post
                      lobby_type - the type of lobby
                      • 5 = Team match.
                      • 4 = Co-op with bots.
                      • 3 = Tutorial.
                      • 2 = Tournament.
                      • 1 = Practice.
                      • 0 = Public matchmaking.
                      • -1 = Invalid.
                      https://api.steampowered.com/IDOTA2Match_570/GetMatchDetails/V001/?match_id=117762656&key=<key>

                      Here lobby_type is 1, whereas it's a tournament game...

                      Comment


                      • #41
                        Originally posted by xiN View Post
                        https://api.steampowered.com/IDOTA2Match_570/GetMatchDetails/V001/?match_id=117762656&key=<key>

                        Here lobby_type is 1, whereas it's a tournament game...
                        I'm going to wager a guess that that means it was not using tournament mode, but instead using the latest game files. Certainly worth looking in to to make sure however.

                        Comment


                        • #42
                          Originally posted by RJackson View Post
                          I'm going to wager a guess that that means it was not using tournament mode, but instead using the latest game files. Certainly worth looking in to to make sure however.
                          It was a The Defense 3 game. I got the match ID from the in-game Tournament tab. It definitely was using the Tournament mode.

                          Also, if some people are wondering, GetHeroes shows 100 heroes whereas they go from 1 to 101. Don't worry, there is no hero under the id 69.
                          Last edited by xiN; 02-14-2013, 04:08 AM.

                          Comment


                          • #43
                            Originally posted by xiN View Post
                            It was a The Defense 3 game. I got the match ID from the in-game Tournament tab. It definitely was using the Tournament mode.

                            Also, if some people are wondering, GetHeroes shows 100 heroes whereas they go from 1 to 101. Don't worry, there is no hero under the id 11.
                            This got me curious so I somewhat randomly tested a match id's from a variety of tournaments (The Defense, RaidCall, SEA League, Gosuleague, TI2, Premiere League, G-League, etc). I tested around 30. The lobby_type for all the games I tested was 1 with the exception of The International 2012 games, which was 2.
                            datdota.com -- Dota 2 Stats for the Professional Scene

                            Comment


                            • #44
                              Originally posted by Razumov View Post
                              This got me curious so I somewhat randomly tested a match id's from a variety of tournaments (The Defense, RaidCall, SEA League, Gosuleague, TI2, Premiere League, G-League, etc). I tested around 30. The lobby_type for all the games I tested was 1 with the exception of The International 2012 games, which was 2.
                              So they are, except The International 2012, somewhat incorrect. They should be of lobby_type 2 aswell.

                              Comment


                              • #45
                                Simple function for converting player_slot to int (0-9).
                                https://gist.github.com/almirsarajcic/5064644

                                Comment

                                Working...
                                X