GraylinKim / sc2reader

A python library that extracts data from various Starcraft II resources to power tools and services for the SC2 community. Who doesn't want to hack on the games they play?
http://sc2reader.readthedocs.org
MIT License
413 stars 85 forks source link

How to build the ability csv file? #191

Closed crorella closed 8 years ago

crorella commented 8 years ago

Hello,

I'm trying to build a file similar to this one https://github.com/GraylinKim/sc2reader/blob/master/sc2reader/data/HotS/24764_abilities.csv but for Heroes of the Storm replays, I know the abilities are referenced by the m_abilityTag value and I was able to map a few heroes abilities manually. I wonder if there is any automated way to do it.

dsjoerg commented 8 years ago

This might help you: https://www.dropbox.com/sh/vcva674ijz6o15q/AACx9OqkoLkTZz_vatnzaYTBa/sc2dump.cpp?dl=0

crorella commented 8 years ago

thanks!

crorella commented 8 years ago

@dsjoerg I was able to modify the script to load the process but I'm having a hard time identifying the values for gameCatalog, cUnitIndex and stringNameOffset. Do you know how to do that? I see there are some instructions

  • For Heart of the Swarm:
    1. Attach to the process
    1. Make sure that writable is unchecked and executable is fully checked
    1. Do an array search for "8b 0d ?? ?? ?? ?? 8b 49"
    1. Look for the most common match.
    1. The the ?? ?? ?? ?? portion is the bytes in reverse order for the gameCatalog
    1. Subtract the base address for the process (which you can get by running this script)
    1. Add a new case for this build with that information. cUnitIndex and stringNameOffset generally won't change

But those are specific for SC2... I have a dump of the process and I opened it with a hex editor and was able to find some of the common units/abilities (like CAbil) but I don't know what is the starting point of the game catalog. Any help is appreciated :)

dsjoerg commented 8 years ago

No idea. @mischanix?

crorella commented 8 years ago

Just bumping this in case @mischanix knows the answer