ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   AddOn Search/Requests (https://www.esoui.com/forums/forumdisplay.php?f=165)
-   -   [Search/Request] tracker for PvE kills (https://www.esoui.com/forums/showthread.php?t=8428)

Ciannicay 03/24/19 05:00 PM

[Search/Request] tracker for PvE kills
 
I am a huge fan of statistics and such.
I am looking for a tracker of all my PvE kills together with a (searchable?) list where i can see e.g.

Bone Grappler 9
Fire elemental 871
Mudcrabs 12.971
Sheep 23
etc.

Is there any addon around that can do this?
Is it even possible to create such an addon?

Kind regards
Ciannicay

Baertram 03/24/19 07:10 PM

I doubt it is as the enemies got names but no unique type Ids where you can detect that it's a mudcrab or even crab. You can maybe only build lists based on their name, which is somehow difficult and very time consumign to maintain.

Maybe I'mw rong and there is an API to get the enemy types as well.

Wheels 03/24/19 08:32 PM

Quote:

Originally Posted by Baertram (Post 37555)
Maybe I'mw rong and there is an API to get the enemy types as well.

Don't know of an api to get mob type, but could just store a table of mob names as keys and the number of kills as values

Ciannicay 03/25/19 05:03 AM

I did some more searching and i found out that ESO-Database (one of Woehlers projects) is using a means of getting this data already.
Took me a while to nail the lines in his addon. Basically its all there but i would like to have it work for more targets (possibly all PvE ones) and without transferring the data to an external webpage for viewing.

He uses

EVENT_MANAGER:RegisterForEvent(ADDON_NAME, EVENT_COMBAT_EVENT, OnCombatEvent)

with

OnCombatEvent(_, result, isError, abilityName, _, _, sourceName, sourceType, targetName, targetType, hitValue, _, damageType)

and then he filters for

sourceType == COMBAT_UNIT_TYPE_PLAYER or sourceType == COMBAT_UNIT_TYPE_PLAYER_PET or sourceType == COMBAT_UNIT_TYPE_GROUP) and (targetType == COMBAT_UNIT_TYPE_NONE or targetType == COMBAT_UNIT_TYPE_OTHER))

after that he filters the AvA kills and adds the kill to his predefined list regardless if it gave xp or not

result == ACTION_RESULT_DIED or result == ACTION_RESULT_DIED_XP


I can read the code but i am totally lost at writing it.
Maybe these snippets can help.

Kind regards
Ciannicay

Baertram 03/25/19 07:56 AM

Yeah and all you have is
targetName, targetType

Where the name is a String and the type is one of those:
https://wiki.esoui.com/Globals#CombatUnitType

CombatUnitType
COMBAT_UNIT_TYPE_GROUP
COMBAT_UNIT_TYPE_NONE
COMBAT_UNIT_TYPE_OTHER
COMBAT_UNIT_TYPE_PLAYER
COMBAT_UNIT_TYPE_PLAYER_PET
COMBAT_UNIT_TYPE_TARGET_DUMMY


This is all you get as info so you'd end up in a list og stored "names". If they are not the same it will create e.g. 2 entries for "Crab" and "Mudcrab" as there is no type = Crab we could check.
You'd need to consolidate this in the end on your site.

But if the addon is already collecting this info you could simply use it and check the SavedVariables file then. The contents should list the kills for you.
It's not ingame but at least you'd have a text file (.lua) which you are able to read and check the collected data from.

Drummerx04 03/26/19 06:01 AM

Quote:

Originally Posted by Baertram (Post 37561)
Yeah and all you have is
targetName, targetType

Where the name is a String and the type is one of those:
https://wiki.esoui.com/Globals#CombatUnitType

CombatUnitType
COMBAT_UNIT_TYPE_GROUP
COMBAT_UNIT_TYPE_NONE
COMBAT_UNIT_TYPE_OTHER
COMBAT_UNIT_TYPE_PLAYER
COMBAT_UNIT_TYPE_PLAYER_PET
COMBAT_UNIT_TYPE_TARGET_DUMMY


This is all you get as info so you'd end up in a list og stored "names". If they are not the same it will create e.g. 2 entries for "Crab" and "Mudcrab" as there is no type = Crab we could check.
You'd need to consolidate this in the end on your site.

But if the addon is already collecting this info you could simply use it and check the SavedVariables file then. The contents should list the kills for you.
It's not ingame but at least you'd have a text file (.lua) which you are able to read and check the collected data from.

I wasn't originally going to comment, but since I did some work on Kill Counter... which essentially does what this dude requested (but for pvp), I figured I would point out that they types are even more limited than I initially thought, since MOST targets in the game are classed as "OTHER" (including both enemy mobs and enemy players).

But it might make sense to fork off of Kill Counter if anyone doesn't wish to start from scratch, though fair warning, even with my updates last year, KC is still ancient and I think comes from a time before some of the common UI libraries.

Baertram 03/26/19 06:33 AM

Just one hint if someone wants to implement this:
Please use event filtering so it will only be firing the event callback functions for yourself:
https://wiki.esoui.com/AddFilterForEvent


This is done before lua stuff takes place and is way faster than checking within the lua event callback function for "if source == "player".

Ciannicay 04/08/19 06:04 AM

I really wish I had the knowledge to build it myself.
Maybe someone will do it sometime.

A BIG 'Thank You' for all the input!

Kind regards
Ciannicay


All times are GMT -6. The time now is 01:33 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI