timkurvers / redota

Revisit past Dota 2 matches in the browser

Home Page:https://timkurvers.github.io/redota

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Patch / build / map version detection

timkurvers opened this issue · comments

ReDota currently uses the 7.23 map as a background.
Games played on patch 7.29 may consequently look odd.

Optimally, ReDota should ship with maps and minimaps for the most recent patches.

A patch list is included in dotaconstants but may not be sufficient to handle patches for both local replays and Valve matches.

commented

Greetings!
I've been self-hosting a 7.29 map and then using inspect to swap images and it's been pretty successful.
Do you have an idea for how you'd like multi-maps implemented? Are you open to pull requests if I get something going?

Hi, glad it's been working out nicely!

ReDota currently attempts to retrieve the build number from the game directory, resulting in something like: 4489.

Unfortunately, that build number does not exist for replays locally recorded using the record-command and I have yet to find a list of these build numbers somewhere so that we can map them to the correct patches.

So, alternatively, I think it might be easier to use the endedAt-timestamp for a match, which is guaranteed to be set and can also be used directly to look up the 'correct' patch in https://github.com/odota/dotaconstants/blob/master/json/patch.json.

The images could be placed right next to the current 7.23 versions:

public/images/
├── map
│   └── 7.23.webp
└── minimap
    └── 7.23.webp

Pull requests more than welcome. 👍

Map and minimap resources for 7.29 were added in #48.

Keeping this issue open as version-detection and usage of the appropriate resources still remains to be implemented.

Fully implemented in 3941bec with support for 7.23 and the 7.33 map in 5961399.