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

VMAP files

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • VMAP files

    Hey, I've started some work recently on the new Dota2 Workshop Alpha Tools. Introduced with these tools was a new file format (.vmap) for maps.

    I looked at the contents of a vmap file I created and it seems to be in some binary format.

    I was wondering if there was any documentation for this new format and whether it would be possible to decompile it maybe into something more human readable that I can modify in a text editor.

    For example, something like this for ".bsp" files: https://developer.valvesoftware.com/...compiling_Maps

  • #2
    You can save map files as text from within Hammer simply by selecting 'Save Copy As Text' from the file menu.

    Alternatively there is a command line tool in the bin directory (...\dota_ugc\game\bin\win64, same directory that contains the dota2.exe) that can be used to convert existing binary files to text, although the command line is a little complicated.

    For example:

    dmxconvert.exe -i d:\....\content\dota_addons\holdout_example\maps\h oldout_example.vmap -o d:\....\content\dota_addons\holdout_example\maps\h oldout_example.vmap.txt -oe keyvalues2

    where the argument following -i is the path of the binary map file and the argument following -o is the path of you want to write the text version on the map to. -oe keyvalues2 is what tells dmxcovert that you want the output file in text (keyvalues2 is a specific text encoding).

    Hammer is also capable of loading these text files, but by default the open file dialog will only look for files with the .vmap extension.

    Comment


    • #3
      Hey, so I tried this and it did indeed create a txt file that was human readable. I noticed that there are a number of arrays within the file that control what objects get placed and where they are placed.
      I was wondering if there is any documentation for the contents of vmap files.

      I created two maps - one that was blank with the Dota2 ground and no entities. I took the same map and added some trees in the center.
      This resulted in changes to arrays titled objectConfiguration, objectsTreeType, objectsRotation, objectsPitch

      I wanted to know that if I wanted to place say one tree in the center of the map, how should the above arrays be formatted to let me do that. What does the number of elements in an array signify?

      I noticed you have some documentation for vmf files here: https://developer.valvesoftware.com/...lve_Map_Format
      I was wondering if there was something similar in the works for vmap files.

      Comment


      • #4
        Unfortunately there is not currently any documentation on the text version of a vmap file. Unlike vmf files the format is not fixed (there are multiple versions) and vmap files can contain a wider verity of data then vmf files, so documenting them is a little more difficult.

        When you are looking at the objectConfiguration, objectsTreeType, objectsRotation, or objectsPitch arrays you are looking at the data for the tile grid object. If your map didn't have a tile grid in it you wouldn't see these at all. The sizes of these arrays are determined by the size of the tile grid. Currently there is not support for re-sizing the tile grid. As such the tile grid is currently always 64x64 cells, so any of the arrays that contain per-cell information (such as cellConfiguration and cellsTileSet) will have 4096 entries (64 * 64). Each cell has a 5x5 grid of object positions, but the edges are shared so the object grid is 257x257 (64 * 4 + 1) and there are a total of 66049 (257 * 257) entries in each of the arrays for objects. The object positions start the lower left corner of the map with <0,0>. So to modify one at the center you would want location <128,128> which would be entry 33024 (128 + 128 * 257).

        To add a tree to a location you simply need to change the corresponding location in the objectsTreeType array to from "0" to "1". Note this value actually refers to the index of the tree type in the "treeTypes" array. So you could set it to a different type of tree by setting it to 2 instead of 1. The objectsRotation and objectsPitch can be used to change the rotation or pitch of the tree. The objectConfiguration is a little more difficult, this describes the specific variations which were selected for the object and is dependent on the contents of the tile set being used, however if it is invalid it will be ignored and a new random configuration will be used.

        Note you could also place a tree as its own entity completely separate from the tile grid. The easiest way to see how to do that is simply to make an empty map with and just place an ent_dota_tree entity in it using the entity tool and then save that out.

        Comment

        Working...
        X