View Full Version : Kill Tracker plugin?

04-26-2012, 12:42 PM
Anyone know of a plugin that keeps track of all of your kills? I couldn't find one.

I think it would be cool to keep some sort of log so we can see what all we've killed, especially rares. It seems like this should be possible by processing the chat channels...right?

I'd be happy to build this if someone could point me to some examples that do something similar - I'm a proficient programmer, but this would be my first LotRO plugin and I don't have a ton of time to sink into this. I have a lot of ideas on how this could be extended beyond the basic idea stated above...input requested if I am indeed building this myself.

04-26-2012, 06:56 PM
LotRO Alerts (http://www.lotrointerface.com/downloads/info609-LoTROAlerts.html) probably has all the chat handling you want.

I don't think anything along the lines of what you're asking for currently exists.

04-27-2012, 12:19 AM
Well, this plugin business isn't so bad. Thanks in no small part to Garan's excellent tutorial and Alerts plugin to use as an example, I now have a shell that parses the Death channel for "Your mighty blow defeated (.+)%." and strips out the enemy name successfully. Still have all of the data management and UI presentation to do of course, but I want to work through the parsing challenges first.

Now for the hard part really...I'm not sure exactly what all messages I need to look for. I know I've seen "The Trap defeated X."...not sure if it says the same thing if it's someone else's trap, in which case that could be a problem. Only solution I can think of if that's the case would be to monitor the Combat Player channel for the Trap damage and only count the kill if I find such a message at about the same time on the same named enemy. Not perfect, and a bit of a pain, but feasible and probably good enough. There are probably other mechanics besides "Trap" that work similarly...I could use some help here.

Traps and similar objects aside (and putting off French/German language support for the moment), anyone know if there are other messages that can display here other than "Your mighty blow defeated X."? Not sure if other attack types generate other messages.... Magic? Do DoT effects message differently if they cause the kill? Any other ways to kill a creature that should count?

Also not sure how to handle pets (LM/Captain) or soldiers - maybe I could allow users to enter specific names that should be counted in addition to the character directly. We'd have to make our pet names unique to avoid mismatches though, and I'm not even sure you can name soldiers...? This mechanism could also be used manually to count fellowship kills I guess...otherwise it's only counting the kills where you have the killing blow.

Other thoughts? Ideas? Anyone interested in this other than me?

04-27-2012, 12:55 AM
Glad you found the tutorial and plugins useful - dismantling existing code is definately a good way to get a handle on a new language/environment.

You can get pet names from the API but as you already considered, they may not be unique. AFAIK traps and other aoe effects will just list their name so they will look the same no matter who placed them.

Skirmish soldier kills will be a bit tough as there is no way to automatically get the soldier names. And many people dont bother naming their skirmish soldiers so you'll likely have multiple generic names.

You might also want to strip off the leading "the " from generic mobs before tracking the count.

Have you considered storing the kill count at the Server level so that you can compare your own characters as well as seeing totals? Storing at the Account level would be nice, but there is no way to automatically distinguish two characters with the same name on different servers :(

04-27-2012, 09:18 AM
Getting pet names from the API is a good improvement, thanks for the tip. I think I'm just going to have to warn users that they need to give their pets/soldiers unique names if they want accurate tracking. I can allow them to type in the soldier names if they want to add them to the capture.

I can check tonight, but does anyone know off the top of their head if pet/soldier attacks show up in the Combat Player channel? If so, I could use that for confirmation that it was actually the users' pet/soldier that made the kill and not another with the same name.

I guess I will have to use that same Combat Player channel monitoring idea for traps and such...not ideal, but should be good enough. - the window of time for a misleading kill to get in there should be extremely small.

In theory, if all of these things show up in the Combat Player channel, I could just primarily monitor that channel and then watch for kills immediately following that match the same actor name...without the user having to enter soldier names manually or even having to look up pet names in the API.

Already took care of stripping "the" - thanks. :)

Good idea tracking not just at the character level. Is there no way to determine programatically what server you are on?

Still looking for other messages that might show up - I'll see if I can capture a DoT kill tonight and various attack types to see if they use different verbiage. My biggest problem is that I don't have any high-level characters, and I can't test anything my characters can't do...need some help.

Are there any other unusual ways to kill an enemy that are possible to capture? For example, can you knock an enemy off a cliff for a kill, and if so does it even generate a kill message?

Thanks for the feedback!

04-27-2012, 01:55 PM
LMs have improved sticky gourd which lays down a fire patch - I think damage and kills are credited to the player now, though.

You might try getting ahold of Evendale - he writes CombatAnalysis, so I suspect, of anyone, he's spent the most time trying to figure out how to parse combat log messages.

Oh, and yes, pet damage messages show up in the combat log, and I think pet kills show up in the combat log. There was an idea being tossed around a while ago to track flank attacks via the combat log. Nothing ever came of it, as far as I can remember, but the method for tracking it was via "<pet name> hits with Melee Flanked Min" in the combat log.

Not sure about soldiers though. I think they do.

04-27-2012, 02:15 PM
Death caused by being knocked off a cliff is attributed to Misadventure, the same as if you jumped off.

It is possible to kill yourself through item usage if the item causes morale loss - there are a number of PvMP items that cause morale loss. I forget the actual verbiage but it's something simple like "so-and-so was defeated" where so-and-so would be the character name.

04-27-2012, 04:33 PM
I just happen to have some Barrow Brie I can try that last bit with :D

...but I'm not sure it would look the same if the enemy died vs. the player character being defeated - would be nice if the messages were essentially the same. I hadn't even mentioned the idea yet of possibly expanding this to track character defeats as well...you're jumping ahead of me. :)

I think I'm just going to have some holes in this that will have to be accepted - even if I'm monitoring the Combat Player channel, Misadventures aren't really reliably creditable to a particular player, nor would various suicide scenarios be in PvP.

Plenty of edge cases to consider here...I'll play around a lot more tonight and see if I can get Evendale to chime in, or at least start poking around in CombatAnalysis for ideas.

05-05-2012, 10:58 PM
Well, I did it...please take it for a test drive and let me know :)