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

Parsing: Player/Hero items?

  • Filter
  • Time
  • Show
Clear All
new posts

  • Parsing: Player/Hero items?

    Hello there!

    I'm currently trying to write a program that needs replay details. If it has any relevance, I'm using clarity to get the parsing done.

    My problem is that I can't figure out how to read the inventory (ingame, the 6 slots) of each player.
    The basic procedure right now is that I get the DTClass for the heroes that are played (e.g. "DT_DOTA_Unit_Hero_AncientApparition") and read the value of "m_Inventory.m_hItems.000x" from there.

    The problem is that the numbers I'm getting out of that don't seem to be connected to any known database. As far as I know item IDs are integers in the 200 range. However, I'm getting numbers that don't make much sense to me. For example an empty item slot seems to be "2097151", while a sentry ward has the id "1117227" E: it seems the number for empty is constant, while the numbers for actual items differ, even when it is the same item. So it must be some kind of ID that leads to another object? I can't find anything correlated to those numbers, so I guess I'm doing something wrong.

    Can anyone help me with that?
    Last edited by Chris87; 05-18-2014, 05:29 AM.

  • #2
    Okay, problem solved.

    In case someone else has similar issues: The numbers are actually identifiers for the ehandles, in clarity "Entities". If you get one of these numbers you can fetch all the item information with "match.getEntities().getByHandle(id)". Be wary of the identifier "2097151" since it means there is no item and therefore no Entity for it.

    Still much to learn for me it seems.