skadistats / clarity-examples

Example code for clarity
BSD 3-Clause "New" or "Revised" License
113 stars 37 forks source link

How can I modify the combatlog example to include maximum health for getAttackerName and getTargetName? #58

Open el-li-neu opened 1 year ago

el-li-neu commented 1 year ago

Can I extend the combatlog example so that getAttackerName and getTargetName display the maximum health at the time of the event? I want to do this to calculate health percentages, and most likely getHealthPercent() would work here too, but I don't see how it could be applied since it's not in CombatLogEntry

I'm not well versed in the subject, so I apologize in advance for the stupid question D:

spheenik commented 1 year ago

Just some pointers:

This data might not be available in the combatlog data. In this case, you need to look into the entities that contain this data. There are a lot of examples out there that show you part of the way.

For example, you could look at how opendota's parser extracts entity data. If you want to see what data to expect, I recommend using clarity analyzer.

Feel free to ask further.