Skip to content
This repository has been archived by the owner on Oct 22, 2019. It is now read-only.

Get abiltityTag information #17

Closed
crorella opened this issue Feb 26, 2016 · 8 comments
Closed

Get abiltityTag information #17

crorella opened this issue Feb 26, 2016 · 8 comments

Comments

@crorella
Copy link

It would be great to have a mapping between abilityTag and the actual ability name.

@crorella crorella changed the title Get abiltityTag Get abiltityTag information Feb 26, 2016
@jnovack
Copy link
Member

jnovack commented Feb 29, 2016

Can you give me an example of how it's currently, and how you would make it right?

@crorella
Copy link
Author

Here is an example, taken from the game event file:

{
"_eventid": 27,
"m_unitGroup": null,
"_event": "NNet.Game.SCmdEvent",
"m_abil": {"m_abilLink": 177,"m_abilCmdIndex": 0, "m_abilCmdData": null},
"_gameloop": 717,
"_bits": 176,
"m_data": {"TargetPoint": {"y": 419840, "x": 501760, "z": 32432}},
"_userid": {"m_userId": 0},
"m_cmdFlags": 256,
"m_sequence": 62,
"m_otherUnit": null
}

Here, abilityTag is a function of m_abilLink and m_abilCmdIndex, for example, abilityTag 5664 is Toxic Nest.

@jnovack
Copy link
Member

jnovack commented Feb 29, 2016

"5664" does not appear anywhere in the extracted xml files, nor does "177". How do you know it's Toxic Nest?

I'm still confused.

@crorella
Copy link
Author

Sorry, I missed one vital point here:

In order to convert from m_abilLink and m_abilCmdIndex to abilityTag you need to apply the following function:

abilityTag = m_abilLink << 5 | m_abilCmdIndex

How do I know 5664 is Toxic Nest? because I played a custom game with Abathur and registered every ability I casted, then checked the logs and mapped the abilityTag to the skill I casted.

I asked with a developer of heroprotocol and he commented the info is relative to the build data.

@jnovack
Copy link
Member

jnovack commented Mar 1, 2016

I understand, but one TINY problem remains. There's no ability numbers in the XML. There's damage numbers, but nothing identifying an ability via an "id" of some sort.

@crorella
Copy link
Author

crorella commented Mar 1, 2016

What about the position of the ability in the file? I'll check that

@crorella
Copy link
Author

crorella commented Mar 1, 2016

Yep, that was it. I'll have to figure out what is the loading order of the files since there is a heromod folder with extra info.

Thanks

@crorella crorella closed this as completed Mar 1, 2016
@barrett777
Copy link

Just an FYI before you jump in and try to map out all the abilities, you may want to make sure this information is what you want.

In the Starcraft 2 replay file, for example, some actions would be listed in 'game events' whether they actually happened or not. For example, if you had 5 SCV's queued in a Command Center and tried to build another, it would show in the game events, but in game it would fail because you can only have 5 at once.

I worry that things will be similar with heroes - it may be recording game events for attempting to cast abilities while out of range, or while stunned/silenced

If you do look into it though, please let me know what you find out :)

Edit: On that note, if you do decide to pursue this, you may want to look into some SC2 projects as some of them did get into mapping abilities (https://github.com/GraylinKim/sc2reader/blob/master/sc2reader/data/HotS/24764_abilities.csv)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants