I'm pretty much still a noob in programming, but as I understand it LUA will always reference tables, but "copy" other values.
Lua Code:
x = "asfaf"
y = {"af","sdgsd"}
z = x --z will be "asfaf"
w = y --w is only a reference to the table
There's also something called metatables that can change the behavior of tables,
ZO_DeepTableCopy ignores them, maybe that messes something up. In GroupDamage I used a custom deepcopy function because I didn't know the ZOS one existed and only because of that even stumbled over this topic. Maybe that's worth a try?
Lua Code:
local function deepcopy(orig)
local orig_type = type(orig)
local copy
if orig_type == 'table' then
copy = {}
for orig_key, orig_value in next, orig, nil do
copy[deepcopy(orig_key)] = deepcopy(orig_value)
end
setmetatable(copy, deepcopy(getmetatable(orig)))
else -- number, string, boolean, etc
copy = orig
end
return copy
end
But again, I'm really no pro here, and maybe the error is somewhat completely different that we both just don't see