+ Reply to Thread
Results 1 to 13 of 13

  Click here to go to the first Rift Team post in this thread.   Thread: DPS parsing for swarm pets

  1. #1
    Plane Touched
    Join Date
    Jan 2011
    Posts
    281

    Default DPS parsing for swarm pets

    Hi all, in the last few days I've tried myself at writing a small parsing addon. I've got some basics working, however one thing I can't get to work: how to parse swarm pets. The problem is that there seems to be no reliable way to recognize them in the Event.Combat.Damage event.

    I mean, I can use Inspect.Unit.Lookup("player") and Inspect.Unit.Lookup("player.pet") to get perfectly fine unit IDs which I can then compare to the "caster" field of the event parameters. However, swarm pets do not (afaik) have such a unit specifier. They also do not get a Event.Unit.Available/Unavailable pair like the standard pets do, so I cannot find their IDs that way either.

    Now, I looked through some other addons, and finally "borrowed" the code to look up the owner ID of a unit from SimpleMeter (great addon btw.).

    The problem is: this still does not work for me. I'm pretty sure I've copied the essentials, so there must be something I'm missing. Perhaps someone can spot if I made any mistake in my event handler:

    Code:
    local function damage(info)
    	print("***** START damage")
    	local details = Inspect.Unit.Detail(info.caster)
    	if details ~= nil then
    		if not details.player and details.nameSecondary then
    			print("Possible pet: " .. details.nameSecondary)
    			local ownerId = Inspect.Unit.Lookup(info.caster .. ".owner")
    			if ownerId ~= nil then
    				print("Owner ID: " .. tostring(ownerId) .. " vs " .. tostring(Inspect.Unit.Lookup("player")))
    			end
    		end
    	end
    	print("***** END damage")
    end
    If I let my standard pet attack, this method works and the handler prints my characters ID as owner ID. If I summon my swarm pets and let them attack, the handler prints nothing (except the start and end message). So...it looks like the Swarming Flames have no details from Inspect.Unit.Detail(), or they have no nameSecondary in the details.

    However, if I let SimpleMeter run, it picks up the Swarming Flames perfectly fine. So...what. am. I. missing????? Someone please help...I'm going mad

  2. #2
    Telaran
    Join Date
    Mar 2012
    Posts
    72

    Default

    Have you checked what /eventlog shows? IE are there other events picked up?

    What happens if you sprinkle in a dump() call to display the details object, see if you're missing something.

  3. #3
    Plane Touched
    Join Date
    Jan 2011
    Posts
    281

    Default

    Quote Originally Posted by Mere View Post
    Have you checked what /eventlog shows? IE are there other events picked up?

    What happens if you sprinkle in a dump() call to display the details object, see if you're missing something.
    I tried /eventlog once in Sanctum, and quickly turned it off again due to all the message spam. I suppose I should try again summoning the pets with it turned on, but probably in an out-of-the-way location with no other NPCs and players around ;)

    Didn't think of trying dump(). Good idea, maybe I can see something there.

  4.   Click here to go to the next Rift Team post in this thread.   #4
    Rift Team
    Join Date
    Oct 2010
    Posts
    927

    Default

    Quote Originally Posted by Sarim View Post
    I tried /eventlog once in Sanctum, and quickly turned it off again due to all the message spam.
    Note that you can filter the output of eventlog - "/eventlog Unit" will show only events that have "Unit" in the name somewhere.

    If you're running on the PTS and using the PTS Trion Dev Tools, the latest /eventlog gives more powerful filters, so you can do "/eventlog Unit -Coord" and show events that have Unit but not Coord in them.

  5. #5
    Plane Touched
    Join Date
    Jan 2011
    Posts
    281

    Default

    Thanks, will play around with those filters a bit. Although I don't want to filter out any events accidentaly if I try and summon the swarm pets

  6. #6
    Telaran
    Join Date
    Jan 2011
    Posts
    71

    Default

    Quote Originally Posted by Sarim View Post
    Thanks, will play around with those filters a bit. Although I don't want to filter out any events accidentaly if I try and summon the swarm pets
    Just dump() out all events that reach your damage handling function and then attack a dummy that no1 else is attacking with your swarm pets and check the table structure of the events you are receiving.

    Like you said, one possible issue is that some info is not available for swarm pets (like nameSecondary) or
    maybe details.player is true for swarm pets? Did you check on that?

    Another thing might be that the swarm pets are not reachable (I know normal pets are always reachable, but I never tested with swarm pets). So you need to check if:
    > info.caster is nil
    > info.caster is not nil but maybe the caster is not reachable in that case:
    >> details is nil (that's how API worked with the unreachable units in the past)
    >> or maybe details only contains partial data which would cause details.player and details.nameSecondary to be nil etc.

    First you want to determine what event data are you getting when those pets attack. Then continue from there.
    Last edited by Matrix; 04-03-2012 at 06:45 AM.

  7. #7
    Plane Touched
    Join Date
    Jan 2011
    Posts
    281

    Default

    Ok, dump() was informative at least, although not really helpful.

    It turns out that most of the time, there are no unit details available in an Event.Combat.Damage call for a swarm pet hit. I suppose that to get details, the pet needs to be available to you. This is the case if you mouse over the pet, or if the target targets your pet.

    In the event log, I couldn't find anything helpful that would allow me to make a connection caster - swarm pets, but maybe I overlooked it.

    So then, my guess is that swarm pets at this time cannot be accurately parsed. I went back and retried SimpleMeter, and indeed found it only picked up a portion of the swarm pets damage, not all as I had assumed earlier (I think this must be from the dummy targeting a pet, because I made sure not to mouseover any pet).

    I suppose that you could use a trick like quickly mousing over all swarm pets (to get their details, and noting their IDs), and then noting when the Swarming Flames buff fades from you to invalidate the pet IDs again. But that'd be a crutch, and not really useable in a solid addon.

    Maybe someone has a better idea, something I didn't think of yet?

  8.   Click here to go to the next Rift Team post in this thread.   #8
    Rift Team
    Join Date
    Oct 2010
    Posts
    927

    Default

    Quote Originally Posted by Sarim View Post
    Maybe someone has a better idea, something I didn't think of yet?
    For what it's worth, I think you're right - there's simply no good way to accomplish this yet.

    I have some ideas for how to provide API functionality that will make this doable. No promises, no timeframe, but it's an issue we're aware of.

  9. #9
    Plane Touched
    Join Date
    Jan 2011
    Posts
    281

    Default

    Hope you can get to it soon(tm) ;)

    In the meantime I can work on a reasonable UI for my addon then. Enough of a challenge hehe.

  10. #10
    Telaran
    Join Date
    Jan 2011
    Posts
    71

    Default

    If these swarm pets use a special skill with an unique ability id or abilityName you can identify them thru this. When you encounter this specific ability just assume it's the swarm pets and add their damage to some totals. You won't be able to assign every specific pet to their right owner (player), but at least you will be able to see the total damage specific types of pets do.

    If the ability (id) is not unique you can save the unit id for unreachable casters in a table and keep adding the damage to that id and output them as "(unknown caster)" instead of their real name. If the caster at any point becomes available, you can set their real name (and all other info as well and also connect them to their right owner). That's what I do in my addon when casters are not available, but I still need to log all the damage. It works. But in my case I want to know which ability did the damage and not really who the caster was. In your case it might be different, since you might want to know the caster/owner primarily.
    Last edited by Matrix; 04-03-2012 at 11:57 PM.

  11. #11
    Plane Touched
    Join Date
    Jan 2011
    Posts
    281

    Default

    After the update, the damage events are assignable now, and the full pet damage can be parsed. Looks great, thanks Zorba!

  12.   This is the last Rift Team post in this thread.   #12
    Rift Team
    Join Date
    Oct 2010
    Posts
    927

    Default

    Quote Originally Posted by Sarim View Post
    After the update, the damage events are assignable now, and the full pet damage can be parsed. Looks great, thanks Zorba!
    Excellent

  13. #13
    Rift Chaser Fridge-RaideR's Avatar
    Join Date
    Jan 2011
    Posts
    393

    Default

    Ahh I was parsing 51necro for fun on PTS and got at 2000dps compared to 2550 with 51lock and 2950 with 36/30 and 3100 with 38/28 (all with the same gear on PTS without raid buffs)

    So the dps meters werent parsing any of the pets I put out, ill definitly try it again to see if i can get it at least close to 51lock :P
    AFK Member of Favouritism
    Founder of The Fabled on EU-Icewatch

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts