skadistats/clarity-examples

Getting names associated with m_iUnitNameIndex

Closed this issue · 3 comments

So I'm looking at CDOTA_BaseNPC_Creep_Neutral entities and I'm looking to get the name of the creep, I'm guessing located at the m_iUnitNameIndex of some stringtable. The problem is, I've tried a couple of the stringtable types that make sense (for @OnStringTableEntry("type")), and none of them seem to be giving me the right names. I've tried "EntityNames" and "CombatLogNames" and I'm getting random names for non-creeps. Is there another stringtable I'm missing or a different place to grab the names from? Thanks!

iirc, they all have the same index, which means finding out which one it is is difficult.
Paging @ykim: Can you add something?

ykim commented

For both S1 and S2, the neutral's name is not stored inside StringTables.
To obtain it, you're going to have to do some sort of extrapolation to
determine the neutral. It was easy in S1 because you could determine the
neutral creep from the name of its model, but for S2, this method is not
possible as the model name is obscured. I had success in guessing the
neutral type from the properties of the neutral (i.e. hp, mana, abilities,
etc).

On Fri, Apr 22, 2016 at 11:31 PM, Martin Schrodt notifications@github.com
wrote:

iirc, they all have the same index, which means finding out which one it
is is difficult.
Paging @ykim https://github.com/ykim: Can you add something?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#26 (comment)

Thank you for looking into it, I really appreciate it! I've created a mapping based on the neutral's properties as well, figured it was the only other way :)