DotA object database

Discussion in 'Advanced Mechanics' started by d07.RiV, Jun 20, 2014.

  1. d07.RiV

    d07.RiV Well-Known Member

    Apparently RMPQEx object dumps are pretty popular around here, so I made an online version.

    Last edited: Jun 23, 2014
  2. EebstertheGreat

    EebstertheGreat Forum Manager

    Cool, nice work.
  3. DracoLich

    DracoLich Well-Known Member

  4. SoletLuna

    SoletLuna Moderator

    That's incredibly awesome. Anyone against making this a sticky?
  5. SonicX7

    SonicX7 Well-Known Member

    make this a sticky plz
  6. EebstertheGreat

    EebstertheGreat Forum Manager


    By the way, what database did you use to correlate the dump with the World Editor labels (e.g. Channel's DataD1 with "Level 1 - Data - Art Duration")?
  7. d07.RiV

    d07.RiV Well-Known Member

    The SLK files found in the game. F.e. AbilityMetaData.slk has a list of all fields that abilities can have. "useSpecific" column lists the base spell IDs the field applies to.
  8. MauranKilom

    MauranKilom Well-Known Member

    Can you search for abilities yet? Tried AEtl but nothing showed up...

    Edit: Oh well, never mind me. I just had in mind using it to look up stuff while reading the script, so you'd search for the ability/unit codes, but that's not how this one works. I mean, you could paste it into the url, but would have to adjust unit/ability etc. first...

    Now, given that you have that database, how conceivable is it to conduct searches within it? E.g. hero turnrates (I know there's a table floating around somewhere...).
  9. d07.RiV

    d07.RiV Well-Known Member

    The database stores all the values as a large JSON string, which isn't very good for searching for specific values, but I guess its possible.
    Do you mean, like, find all units with a specific turnrate? Or actually create a table of turnrates for all units? The latter would be complicated by the fact that there are tons of units that aren't real heroes so the table would contain a lot of garbage.
  10. EebstertheGreat

    EebstertheGreat Forum Manager

    Well you could do it value in a roundabout way. Function Func0486 lists all heroes by point value. You could write a quick script to extract a list of all point values from that function, then use those to find all heroes by ID, then put those IDs into URLs, and finally copy the relevant field from each page. It would take a while to do by hand, but it should be fast to do by script.
  11. WindowsXXXXP

    WindowsXXXXP Well-Known Member

    Good work. Can you make it possible to search by code? For example A0BZ is Toss.
  12. d07.RiV

    d07.RiV Well-Known Member

    I sort of finished the multiple version support, along with some interface improvements.
    It currently only supports 6.80c and 6.79e but its just a matter of uploading data to the server (which can take a while since its around 10M per version and my upload is very slow at this place).

    I'll work on improving the search feature tomorrow. Different per-hero statistics don't really fit into it, so that will have to wait until a bit later.

    You can currently "search" by code by simply typing the code into the URL. For example, (apparently codes are not unique across types, there are some doodads and buffs with the same code).

    e: all versions (that I had) are up, I decided not to upload intermediate versions (e.g. no 6.79 when there is 6.79e). It saves quite a bit of space, and the object files are hardly ever different (usually the small fixes involve triggers only).

    e2: Updated the search UI somewhat. Options other than "Name" look for an exact match (currently it is impossible to search for fields that have multiple levels).

    e3: trying to make a script viewer, apparently browsers don't like 90k+ lines of highlighted code. Guess I'll have to split it into pages, though searching won't be as easy. You can try it at (its the smallest version so its least likely to freeze the browser)
    Last edited: Jun 23, 2014
  13. 6.79

    6.79 Banned

  14. DracoLich

    DracoLich Well-Known Member

    ya, its not the best solution
    probably you could make divided parts, like "globals" and functions. functions could be compacted if one calls another. F.i. i search for 'A141' ability and it finds the function where its noted and extract it + all functions called from it. tho it couldnt be done via static page as soon i i know.

    ---------- Post added at 08:35 PM ---------- Previous post was at 08:34 PM ----------

    but still i dont think that code part is something that neccessary, cause u know.. the only few humans who can read it already have it :)
  15. 6.79

    6.79 Banned

    the map script is optimised strangely. if you don't get rmpqex to rename variables, some stuff are still in tact:

    [JASS]function SpectralDagger_CastCode takes nothing returns integer
    return 1093683287
    function SpectralDagger_PositiveEffect takes nothing returns integer
    return 1093683506
    function SpectralDagger_NegativeEffect takes nothing returns integer
    return 1093683289
    function SpectralDagger_PositiveBuff takes nothing returns integer
    return 1110455351
    function SpectralDagger_ShadowPathUnit takes nothing returns integer
    return 1747988530
    function SpectralDagger_DaggerUnit takes nothing returns integer
    return 1747988531


    function Reality_KillOtherImages takes nothing returns nothing
    call KillUnit(GetEnumUnit())


    constant function DoubleTrouble_RawCode takes nothing returns integer
    return 1093684567
    constant function DoubleTrouble_PrimaryUnitCode takes nothing returns integer
    return 1211117641
    constant function DoubleTrouble_SecondaryUnitCode takes nothing returns integer
    return 1211117642
    constant function DoubleTrouble_Ability1 takes nothing returns integer
    return 1093684792
    constant function DoubleTrouble_Ability2 takes nothing returns integer
    return 1093684802
    constant function DoubleTrouble_Ability3 takes nothing returns integer
    return 1093684791
    constant function DoubleTrouble_Item9 takes nothing returns integer
    return FJ0[HM0]
    constant function DoubleTrouble_Item8 takes nothing returns integer
    return FJ0[HL0]
    constant function DoubleTrouble_Item7 takes nothing returns integer
    return FJ0[X00]
    constant function DoubleTrouble_Item6 takes nothing returns integer
    return FJ0[WK0]
    constant function DoubleTrouble_Item5 takes nothing returns integer
    return FJ0[ZF0]
    constant function DoubleTrouble_Item4 takes nothing returns integer
    return FJ0[ZG0]
    constant function DoubleTrouble_Item3 takes nothing returns integer
    return FJ0[ZH0]
    constant function DoubleTrouble_Item2 takes nothing returns integer
    return FJ0[ZE0]
    constant function DoubleTrouble_Item1 takes nothing returns integer
    return FJ0[FQ0]

  16. MauranKilom

    MauranKilom Well-Known Member

    That's 44.5 years...
  17. EebstertheGreat

    EebstertheGreat Forum Manager

    The JASS viewer loads fine on my browser (Firefox 23), even in 6.80c. I'm not sure why a few megabytes of text would crash it.
  18. d07.RiV

    d07.RiV Well-Known Member

    Fixed that already, forgot to start the timer ;p

    The original version tried to do syntax highlighting on the fly with javascript, which is why it took forever. Pre-highlighted version of 6.80c is 13M and it still lags my chrome quite a bit (Firefox handles it faster, but on a slower PC it would be much worse).
    I already changed it to dynamically load ~2k lines around the scrollbar so its fast enough now. The downside is that you can no longer search in it. Right-clicking a function name will allow you to scroll to its definition, and right-clicking an object code scrolls to its next occurence.
    It is possible to link to a specific line of code:

    Vexorian is busy making TopCoder editorials ;p

    It seems those functions aren't used though, the optimizer simply forgot to remove them for whatever reason. It doesn't help us though, because we already know that 1093683287 is Spectral Dagger, etc.
    Last edited: Jun 23, 2014
  19. EebstertheGreat

    EebstertheGreat Forum Manager

    Oh I see, yeah highlighting in real time every time the page loads could be problematic.

    Maybe you could include a link to the full prehighlighted code with a warning that it may load slowly on some computers (probably depending on the internet connection more than anything else). You could also implement a search function which searches the plaintext on the server end and then links you to that part of the code. For what it's worth, Notepad++ has no issue immediately (<0.1 seconds) searching for anything in the plaintext file.
  20. d07.RiV

    d07.RiV Well-Known Member

    The code is stored on the server in compressed form and for some reason PHP there comes without gzip support so it can't decompress the files =(
    Besides, that would be very cumbersome as opposed to simply using the browser search.

    I guess I could make a "load everything" button though.
    e: done. It does lag chrome a LOT though.
    Last edited: Jun 24, 2014