PDA

View Full Version : new effect not displaying



jkeller
November 29th, 2025, 01:36
In 5E, my extension is adding an effect to an NPC with this code:



local rEffect = { sName = "Original Name: " .. tostring(sOriginalName), nGMOnly = 1 };
EffectManager.addEffect('', '', nodeCT, rEffect, false); -- sUser, sIdentity, nodeCT, rNewEffect, bShowMsg

If I set the bShowMsg to true, I do see the message in the chat window.

But the effect is not showing up on the Combat Tracker. I can see it when I call this:


for _,nodeEffect in ipairs(DB.getChildList(nodeCT, "effects")) do

So, it's sort of there, but when I try to get it (in a different extension), it's not there.

Any idea what I might be doing wrong? Thanks!

Trenloe
November 29th, 2025, 05:02
That isn't really enough information to help us help you as we have no idea what your extension is doing and when.

I'd recommend adding an effect the usual way (through the FG interface), then adding an effect with your code and typing /save in the chat window (so the current FG database gets saved to db.xml in the campaign directory) and then looking at that db.xml file and the effect database nodes within the combattracker entry for the creature in question. Check what's different in the FG database between the effect that shows and the effect that doesn't show? This might help you identify what the difference is. If not, please provide more details, including full details of the code you're running.