FG Spreadshirt Swag
Page 2 of 5 First 1234 ... Last
  1. #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.

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

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

  4. #14
    v1.02 is in the Forge pipeline and attached to post #1

  5. #15
    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.

  6. #16
    Try testing with no other extensions loaded, it's probably an extension conflict. It's still working fine for me.

  7. #17
    Quote Originally Posted by darrenan View Post
    Try testing with no other extensions loaded, it's probably an extension conflict. It's still working fine for me.
    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

  8. #18
    Quote Originally Posted by celebrindal View Post
    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
    The NPC in your image is locked (see the locked padlock at the top of the NPC). Click on that button to unlock the NPC and then you will see the magnifying glass.

  9. #19
    Quote Originally Posted by dllewell View Post
    The NPC in your image is locked (see the locked padlock at the top of the NPC). Click on that button to unlock the NPC and then you will see the magnifying glass.
    *Facepalms* ya I knew that, was just checking to see if you knew that! Sorry about that, thanks for the quick responses.

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
STAR TREK 2d20

Log in

Log in