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.
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.