PDA

View Full Version : EffectVarManager.getEffectVarFromNode no longer working correctly



SilentRuin
May 6th, 2026, 19:32
This code no longer behaves like it used to. This function inside EffectManager.removeEffectByText used to return the name now it returns the whole string - which of course will not match the name. Below is your code with the printed out data showing this - of course they will never match unless there is literally only a name as the effect...

function removeEffectByText(vActor, s)
if (s or "") == "" then
return;
end

local sLower = s:lower();
for _,nodeEffect in ipairs(ActorEffectManager.getCombatantEffectNodes( vActor)) do
local sName = EffectVarManager.getEffectVarFromNode(nodeEffect, "sName", "");
Debug.console(sName);
Debug.console(sLower);
if sName:lower() == sLower then
EffectManager.removeEffectByNode(rActor, nodeEffect);
return;
end
end
end

[5/6/2026 11:57:33 AM] s'-Scimitar Frost Brand; DMG: 1d6 cold; RESIST: fire; LIGHT: 10 E5E5E0 flicker 25'
[5/6/2026 11:57:33 AM] s'-scimitar frost brand'

The call

local sName = EffectVarManager.getEffectVarFromNode(nodeEffect, "sName", "");

Should be returning

-Scimitar Frost Brand

it is not.

Moon Wizard
May 6th, 2026, 23:55
No, it should not. That is a general purpose function to return the full effect name across all rulesets.

You would need to change that line like this; similar to other places in EE extension:



local sName = EffectManager.parseEffect(EffectVarManager.getEffe ctVarFromNode(nodeEffect, "sName", ""))[1]


Regards,
JPG

SilentRuin
May 7th, 2026, 05:27
Fixed it - need to pass full effect text for the function it uses now not the label. Thanks.