What at first glance seemed like it would be a major loss has turned out to be a gain for 90% of modding purposes. Thanks Chip, for taking the time to listen to our concerns and for making the stuff that matters work even better.
Since these changes are still "in the oven" so to speak, I thought it pertinent to revisit a request I posted on the ZOS forums some months back. Specifically, might it be possible to return persistent, unique, non-player unitID information to EVENT_RETICLE_TARGET_CHANGED?
Right now for Srendarr I am using a table built on the fly based on the NAME of the target, to keep track of debuffs not returned by GetUnitBuffInfo().
Starting at line 353 in AuraControl.lua:
Warning: Spoiler
Code:
local function ActiveFakes() -- Check for active fake debuffs
local total = 0
for k,v in pairs(fakeTargetDebuffs) do
currentTime = GetGameTimeMillis() / 1000
if trackTargets[k] ~= nil and trackTargets[k][unitName] ~= nil then
if trackTargets[k][unitName] < currentTime then
trackTargets[k][unitName] = nil -- Clear expired targets from cache
else
total = total + 1
end
end
end
return total
end
numAuras = GetNumBuffs('reticleover') + ActiveFakes()
if (numAuras > 0) then -- target has auras, scan and send to handler
for k,v in pairs(fakeTargetDebuffs) do -- Reassign still-existing fake debuffs on target
currentTime = GetGameTimeMillis() / 1000
if trackTargets[k] ~= nil and trackTargets[k][unitName] ~= nil then
if trackTargets[k][unitName] > currentTime then
AuraHandler(
false,
GetAbilityName(k),
'reticleover',
currentTime,
trackTargets[k][unitName],
fakeTargetDebuffs[k].icon,
BUFF_EFFECT_TYPE_DEBUFF,
ABILITY_TYPE_NONE,
k
)
end
end
end
...
However this is obviously limited as mobs will frequently be in packs where they all share the same name (Vicious Mudcrab, Crazy Cultist, etc.)
Having a unique identifier that is semi-persistent (phase/shard-specific until death?) would allow proper multi-unit debuff tracking. I could easily enough code a cleanup function based on timestamps, so anything that didn't have any buff info within say a 30sec window would be purged on reticle target change.
Thanks again!
EDIT:
I see that
EVENT_EFFECT_CHANGED already has a unitId interger but it always returns nil is that correct? Also
EVENT_COMBAT_EVENT seems to return an actual value. Is this actionable? How is persistence determined for example for the unitId returned for the player?