Comments (6)
I had a quick look and it looks like m_hOwnerEntity is the way to go.
You can detect if it's an illusion or not with checking m_hReplicatingOtherHeroModel (equals 16777215 when it is NOT an illusion). I also am not quite sure if it works for all cases though...
from clarity-examples.
I have done a test on a demo (matchid = 2026982487). m_hOwnerEntity of CDOTA_BaseNPC_Creep_Neutral, being 16777215 most of the time, has other values as well:
066395: CDOTA_BaseNPC_Creep_Neutral (m_hOwnerEntity = 10945431) has spawned
066395: CDOTA_BaseNPC_Creep_Neutral (m_hOwnerEntity = 10945431) has spawned
072853: CDOTA_BaseNPC_Creep_Neutral (m_hOwnerEntity = 7783822) has spawned
072853: CDOTA_BaseNPC_Creep_Neutral (m_hOwnerEntity = 7783822) has spawned
073819: CDOTA_BaseNPC_Creep_Neutral (m_hOwnerEntity = 1688292) has spawned
073819: CDOTA_BaseNPC_Creep_Neutral (m_hOwnerEntity = 1688292) has spawned
Meanwhile, m_hOwnerEntity 10191233 is mapped to [CDOTA_BaseNPC_Creep, CDOTA_Unit_Hero_Beastmaster_Hawk, CDOTA_Unit_Hero_Beastmaster_Boar]. Beastmaster has another m_hOwnerEntity.
All of those make me wonder what m_hOwnerEntity really is...
from clarity-examples.
Just a follow up. To get the owner number of an entity e1, the following code could do the work:
Entity ownerEntity = ctx.getProcessor(Entities.class).getByHandle(e1);
fp = ownerEntity.getDtClass().getFieldPathForName("m_iPlayerID");
return ownerEntity.getPropertyForFieldPath(fp);
I am able to get beastmaster's player position as a result, but I am still unable to interpret m_hOwnerEntity for CDOTA_BaseNPC_Creep_Neutral.
from clarity-examples.
Of what type are entities 10945431, 7783822, 1688292?
Are they also neutral creeps? If so, the spawned creeps could have been spawned by another neutral creep, making it their owner (for example, Troll Summoner skeletons).
from clarity-examples.
Yes you are right. The DtClass type is also neutral creeps. Is there a way to get real replay time based on the time tick? It would be nice if I can verify that.
from clarity-examples.
The control slider used while playing the replay is directly related to tick. There are 30 ticks per second.
from clarity-examples.
Related Issues (20)
- How to dump the results into txt or json file? HOT 1
- How to get current gold of each player at each tick? HOT 6
- Hi! What is the standard map size and coordinate boundary? HOT 6
- How to get bans and picks from basic info? They are not returned. HOT 3
- Problem with m_flMagicalResistanceValue HOT 3
- get java.lang.reflect.InvocationTargetException when try to get getDtClass() of an entity HOT 8
- Jump to tick at n-th effective minute mark HOT 4
- Hi!How can i get the position and basic information of heroes of each tick? HOT 1
- How do I know the meaning of num? HOT 1
- Item and ability names HOT 4
- Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index 4 out of bounds for length 4 HOT 3
- Is there data for fights in the demo? The "show fight recap" button of dota 2 client HOT 2
- Is the allchat example still relevant? HOT 1
- How to find the initial tick that corresponds to the game start? HOT 7
- Bug report - AllChatProcessor
- Can I extract the key press times? HOT 1
- How can I modify the combatlog example to include maximum health for getAttackerName and getTargetName? HOT 1
- Exception in thread "main" skadistats.clarity.ClarityException: cannot determine last tick before engine type is known HOT 1
- How to get all info contained in the replay as text output? HOT 10
- Can't run any example HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clarity-examples.