Details! Damage Meter

Details! Damage Meter

250M Downloads

Suggestion: Use UnitID rather than unitName for actor.targets

Grapjas93 opened this issue · 7 comments

commented

Please consider using UnitID rather than (or alongside with) the unitName for actor.targets. Because when there are multiple units with the same name they all get swept under the same rug.

For example the 3 raider training dummies, if you do a dps session on them it will only show 1 target in Details. Even though it may be intentional, it's inaccurate. same name target merging could be a toggleable option.

From a modding PoV it causes issues. I wanted to use the actor.targets to show a unique custom label on each them via Plater. But because they have the same name i cant set unique labels on each because if PlaterUnitName == DetailsUnitName is true for all 3. With a UnitID i would be able to select one of the three.

In case i haven't convinced you to include UnitID, is there a workaround i can utilize to reach my goal?

commented

The same issue would be achieved using the npc id. There is functionally 0 difference.

The unique identifer you are looking for is actually the GUID, which is unique per mob. Storing combat data by guid would massively inflate the size of combats due to having each individual add in a fight have their own data stucture. Not something we'd implement.

commented

You are greatly exaggerating the complexity / performance cost of what im asking for. You already have the GUID in the current code where actor.targets is being set, what i was simply asking for is using that instead of (or along side with) the name for actor.targets, and while you have it might aswell make a accurate per target basis. Even if you don't want to do the latter, the former is extremely simple and would've been appreciated for someone like me making a module for Plater in combination with Details.

It's nothing more than getting and setting a value in a table, which is something lua is extremely efficient at. Your computations wouldn't even change if all you did was store the GUID. Even at like a 100k entries with 2 keys you are looking at less than 5mb in memory size (roughly). Even if you'd play 24 hours straight without closing the game i doubt you get something remotely close to a 100k entry database.

I respect not wanting to do it though, which i kinda anticipated and why i already had started to go my own route. GL to you too.

commented

You missed the last part, but it doesnt matter anymore since im already building my own database that suits my needs and not gonna use Details api.

commented

I did not miss the last part. You want to be able to uniquely identify how much damage someone did to each individual mob. In a way where mobs with the same npc (unit) id are separated. The only way to achieve that would be through the GUID. and would massively inflate the size of combats or increase the computation required for displaying data. We are not going to be changing that.

Your own solution/addon would be best given that what you want is not feasible in the scope of Details. I wish you the best of luck achieving that.

Unless you're referring to a Unit Token which is absolutely not unique in any sense.

commented

Adding [unitGUID] = damage would be very easy to accomplish, the issue comes with the memory chunk which will need to be allocated for a feature that not many would use.
We could design a plugin to handle the extra data and make use of it.

commented
commented

Like i said, you don't necessarily have to split the data if you don't want to, Just having access to the GUID is good enough. [unitGUID] = {name=name, amount=amount}

It may not have alot of usecases for modders, but it may end up getting used alot depending on how my mod will be received.

But since im the only one who requested this and i'm already making something myself, i don't see the need for this anymore.