So I'm currently trying to do some stuff approximating things on the map, and I see that a lot of events have x, y locations on them. I was wondering whether anyone knew an easy way to get the size of the map as a whole.
I see it can be done using the map info, doing something like:
replay = sc2reader.load_replay('...')
replay.load_map()
map_height = replay.map.map_info.height
map_width = replay.map.map_info.width
The catch appears to be that the second line has to load the map, and though presumably all of this is less of a big deal with caching, I would still prefer to be able to punch through a bunch of replays without that step. Does anyone know if the map dimensions are stored elsewhere or can be inferred from other data?
If anyone is interested, I'm planning on putting some location approximation into spawningtool so you can better label events in the game. For example, you could determine if a StarGate is in-base or is a proxy, or if a Banshee kill on a worker is harass or hunting down a scout.