Thread: Constant Effect Apply Extension
-
October 4th, 2021, 16:52 #11
That is strange. This extension doesn't really do anything most of the time. It just hooks into the 'addNPC' path which is only triggered when a new creature is added to the combat tracker. The rest of the time it does nothing.
Perhaps the other extension you're using is also hooking into this path and there is a conflict. What is the other extension, perhaps I can take a look?
EDIT: Looking at the CombatManager code, it looks like there is another way to implement my extension that will avoid conflicts. Stay tuned...
EDIT2: I couldn't get the alternative way to work. I still don't understand why you're seeing the symptoms you're seeing, it makes no sense.Last edited by darrenan; October 4th, 2021 at 18:33.
-
October 4th, 2021, 18:37 #12
This is really the entire extension, maybe one of the devs can explain why what I'm doing is causing the symptoms dellanx is seeing?
Code:local fPreviousAddCustomNPC; function onInit() local msg = {sender = "", font = "emotefont"}; msg.text = "Constant Effect Apply v1.01 for Fantasy Grounds PFRPG ruleset. Copyright 2021 Smiteworks. By darrenan" ChatManager.registerLaunchMessage(msg); fPreviousAddCustomNPC = CombatManager.getCustomAddNPC(); CombatManager.setCustomAddNPC(addNPC); end function addNPC(sClass, nodeNPC, sName) -- Call the previous function first. local nodeEntry = fPreviousAddCustomNPC(sClass, nodeNPC, sName); local aEffects = {}; local nodeSpellset = nodeEntry.getChild("spellset"); if nodeSpellset then for _,nodeSpellClass in pairs(nodeSpellset.getChildren()) do local nodeLevels = nodeSpellClass.getChild("levels"); if nodeLevels then for _,nodeSpellLevel in pairs(nodeLevels.getChildren()) do local nodeSpells = nodeSpellLevel.getChild("spells"); if nodeSpells then for _,nodeSpell in pairs(nodeSpells.getChildren()) do local nodeActions = nodeSpell.getChild("actions"); if nodeActions then for _,nodeAction in pairs(nodeActions.getChildren()) do local nodeApplyOnLoad = nodeAction.getChild("applyonload"); if nodeApplyOnLoad and nodeApplyOnLoad.getValue() == 1 then local sEffect = nodeAction.getChild("label").getValue(); EffectManager.addEffect("", "", nodeEntry, {sName = sEffect, nDuration = 0, nGMOnly = 1}, false); end end end end end end end end end return nodeEntry; end
-
October 4th, 2021, 18:57 #13
The other way I tried doing this today, was to add 'onUpdate' handlers to the 'applyonload' and 'label' nodes using DB.addHandler with wild-carded paths. I would store the updated node values for both nodes in a table, and when I had both values I would call EffectManager.addEffect. Even though the parameters to EffectManager.addEffect were identical to those in the code snippet above, for some reason the effect would not get added to the CT Node. Is that some peculiarity of trying this within an 'onUpdate' handler? I don't know. I also tried changing EffectManager.addEffect to EffectManager.notifyApply, which uses an out-of-band message to add the effect. This also did not work, the effect did not get applied.
-
December 16th, 2021, 20:26 #14
v1.02 is in the Forge pipeline and attached to post #1
-
July 6th, 2022, 20:14 #15
- Join Date
- Mar 2012
- Posts
- 93
I'm not seeing in (PF1) the magnifying glass to see the effects nor the checkbox for activating or not. I notice this hasn't been updated for sometime is it still active? I'm using the automated overlays and such is this still required?
Thanks.
-
July 7th, 2022, 18:47 #16
Try testing with no other extensions loaded, it's probably an extension conflict. It's still working fine for me.
-
July 7th, 2022, 21:21 #17
- Join Date
- Mar 2012
- Posts
- 93
Ok just stripped it down to the core rule book and the bestiary, only thing was the PF Theme. Nada. I did notice in your image that you are using one of the PFRPG bestiaries vs stock. So I activated my PFRPG linked bestiary and still nada. Included screen shots. As an FYI I can see the effects, and they will apply but I don't have the magnifying glass to edit or add, nor the radio button to give me the button to load upon tracker entry.
Capture2.JPG
-
July 7th, 2022, 21:47 #18
-
July 7th, 2022, 21:54 #19
- Join Date
- Mar 2012
- Posts
- 93
-
July 18th, 2022, 17:00 #20
Version 1.03 is now in the Forge and attached to post #1 above. This fixes incompatibilities with the latest round of updates.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks