DICE PACKS BUNDLE
Page 89 of 113 First ... 3979878889909199 ... Last
  1. #881

    Join Date
    Dec 2016
    Location
    Las Vegas NV
    Posts
    540
    Quote Originally Posted by rhagelstrom View Post
    There are a few. Here is the 5E one.https://www.fantasygrounds.com/forum...highlight=Aura
    Good Day Rhagelstrom
    Thanks for the link

  2. #882
    Quote Originally Posted by SilentRuin View Post
    Is supporting a condition before AURA is processed to difficult code wise? I'm told this has been asked before but I'd really like to have AURAs disappear under certain conditions. For example, if this mine explodes and is replaced by a crater with Death Indicators I'd like it to stop triggering the AURA effect in things that get close with a BCEG effect.

    Fragmentation Mine; IF: !DYING; AURA: 15 foe; Fragmentation Mine; IF: FACTION(foe); SAVEE: 14 DEX (H); SAVEDMG: 2d10 kinetic

    Same for PCs/NPCs that generate an AURA and drop dead (stop doing it).

    I would think you must already be parsing and tossing the string before AURA out the door or something - but it seems it should actually be processed first and the AURA string be treated as a completely different operation (only after the normal EFFECT processing occurs first - then check for AURA in that result).
    Yep - was easy to do. I'd appreciate if whomever does the code now replaces this function with the changes I made so I can do the above - pretty much do any condition checking supported via extensions currently in use - I tested above with ONLY Aura and BCEG in a test campaign with only two tokens (this is 5E specific also if you need to put some guards around due to that). Also found bug in FGU that Moon says he will fix in some later release that has every single Token.onMove getting double tapped for any one single move (twice the work for everything right now). Here is the code let me know if you plan to stick it in or if I have run my own version of this extension... the comments can be uncommented to watch the internal magic if you wish for verification its doing what I say its doing... DO NOT CREDIT ME FOR THIS IN THE CODE/COMMENTARY - credit implies I'll support this going forward... got enough to do with my own stuff

    manager_effect_aura.lua
    Code:
    ...
    local function getAurasForNode(nodeCT, searchString, targetNodeCT)
    	local nodeEffects = DB.getChildren(nodeCT, 'effects')
    	if not nodeEffects then return {} end
    	local rActor = ActorManager.resolveActor(nodeCT)
    	local rTarget = ActorManager.resolveActor(targetNodeCT)
    --	Debug.console(rActor.sName);
    
    	local auraEffects = {}
    	for _, nodeEffect in pairs(nodeEffects) do
    		if DB.getValue(nodeEffect, aEffectVarMap['nActive']['sDBField'], 0) == 1 then
    			local sLabelNodeEffect = getEffectString(nodeEffect)
    			if sLabelNodeEffect:match(searchString) then
    				-- make sure conditions allow for this to be processed. 
    --				Debug.console(" ")
    				local aEffectComps = EffectManager.parseEffect(sLabelNodeEffect);
    --				Debug.console(sLabelNodeEffect)
    				local bSetAura = true
    				for _,sEffectComp in ipairs(aEffectComps) do
    					local rEffectComp = EffectManager5E.parseEffectComp(sEffectComp);
    --					Debug.console(rEffectComp.type)
    					-- Check conditionals
    					if rEffectComp.type == "IF" then
    --						Debug.console("Check IF conditions")
    --						Debug.console(rEffectComp.remainder)
    						if not EffectManager5E.checkConditional(rActor, nodeEffect, rEffectComp.remainder) then
    							bSetAura = false
    							break
    						end
    					elseif rEffectComp.type == "IFT" then
    --						Debug.console("Check IFT conditions")
    --						Debug.console(rEffectComp.remainder)
    						if rTarget and not EffectManager5E.checkConditional(rTarget, nodeEffect, rEffectComp.remainder, rActor) then
    							bSetAura = false
    							break
    						end
    					elseif rEffectComp.type == "AURA" then
    --						Debug.console("AURA - so done Checking conditions");
    						break
    					end
    				end
    				if bSetAura then
    --					Debug.console("Conditions passed")
    					table.insert(auraEffects, nodeEffect) 
    				else
    --					Debug.console("Conditions failed")
    				end
    			end
    		end
    	end
    
    	return auraEffects
    end
    ...
    function updateAuras(sourceNode)
    ...
    			-- Check if the moved token has auras to apply/remove
    			for _, auraEffect in pairs(getAurasForNode(sourceNode, auraString, otherNode)) do
    				checkAuraApplicationAndAddOrRemove(sourceNode, otherNode, auraEffect, nodeInfo)
    			end
    			-- Check if the moved token is subject to other's auras
    			for _, auraEffect in pairs(getAurasForNode(otherNode, auraString, otherNode)) do
    				checkAuraApplicationAndAddOrRemove(otherNode, sourceNode, auraEffect, nodeInfo)
    			end
    ...
    end
    ...
    Last edited by SilentRuin; December 16th, 2022 at 12:38.
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

  3. #883
    Thanks! I copied that into a new branch on the repo.
    I've got it working in the other supported rulesets, but it's not yet removing aura updates when conditions are removed.
    I'll get that sorted soon and then push the release.

    EDIT: all set. released.
    Last edited by bmos; December 16th, 2022 at 15:21.

  4. #884
    Quote Originally Posted by bmos View Post
    Thanks! I copied that into a new branch on the repo.
    I've got it working in the other supported rulesets, but it's not yet removing aura updates when conditions are removed.
    I'll get that sorted soon and then push the release.

    EDIT: all set. released.
    I've got your live thing which was working fine - but when I started playing with multiple effects each named slightly differently and turning the effects I was not currently testing to "off" I got an infinite loop situation. I'm going to investigate it now. Not sure it was something always happening or just after this live bit.
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

  5. #885
    Quote Originally Posted by SilentRuin View Post
    I've got your live thing which was working fine - but when I started playing with multiple effects each named slightly differently and turning the effects I was not currently testing to "off" I got an infinite loop situation. I'm going to investigate it now. Not sure it was something always happening or just after this live bit.
    Ok I'm not sure what is going on but its hard to duplicate (as in it does not always happen). But when it does happen I'm testing with two aura effects and out of the blue it infinite loops placing FROMAURA's in the targets eventually getting a C overload error in chat. The following is your latest build with just the following change:

    Code:
    ...
    function updateAuras(sourceNode)
    printstack()
    ...
    I'm running with the following effects (which work when they do and infinite loop when they do not - can't seem to duplicate issue with only one aura defined and one token in range).

    Fragmentation Mine2; IF: !WOUNDS(=,1); IFT: !WOUNDS(=,1); IFT: TYPE(Vehicle); AURA: 15 foe; Fragmentation Mine2; IF: FACTION(notself); SAVEE: 14 DEX (H); SAVEDMG: 2d10 kinetic

    Fragmentation Mine; IF: !WOUNDS(=,1); IFT: !WOUNDS(=,1); AURA: 15 foe; Fragmentation Mine; IF: FACTION(notself); SAVEE: 14 DEX (H); SAVEDMG: 2d10 kinetic

    I tend to turn them on and off or keep both active.

    When it works the call stack looks like this...

    WhenWorks.jpg

    When it infinite loops the call stack looks like this...

    WhenInfiniteHappens.png

    Not really sure what is going on or if its something that has always happened and I'm just new to AURA testing.
    Last edited by SilentRuin; December 16th, 2022 at 19:32.
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

  6. #886
    No longer relevant.
    Last edited by SilentRuin; December 17th, 2022 at 15:08.
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

  7. #887
    I am getting errors using the Aura Effects EXT in a up to date campaign without any other extensions loaded. I applied Spirit Guardians to a PC and moved the PC to the NPC to trigger adding the effect to the NPC. I then moved the PC away to remove the Effect. When I try to trigger the Aura Effect a second time the FG console error window opens and the Effect is applied to the NPC multiple times, See the chat window and NPC in CT. I have attached a screenshot.
    https://cdn.discordapp.com/attachmen...ts_applied.png
    FGU Ultimate License
    FG Discord - Lord_Ulric
    Time Zone: US Eastern (GMT -5)
    Playing -
    Starfinder, D&D, Savage Worlds, Call of Cthulhu, Hero System aka Champions, Traveller, and more!
    My Forge Creations

  8. #888
    just posted a hotfix. if that doesn't solve it, i'll have to roll back one of the v1.18 changes

  9. #889
    Quote Originally Posted by bmos View Post
    just posted a hotfix. if that doesn't solve it, i'll have to roll back one of the v1.18 changes
    Can't break it now. Thanks. Still get confused on IF and IFT with who is moving where
    Free(Forums/Forge) Extension(FGU 5E):
    Paid (Forge) Extension(FGU 5E):

  10. #890
    Quote Originally Posted by SilentRuin View Post
    Can't break it now. Thanks. Still get confused on IF and IFT with who is moving where
    Yeah, I probably would have skipped supporting IFT.
    I think there is a function I can call to get a table of who you're targeting when the aura is parsed, although this seems like it might feel even weirder.

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
  •  
Starfinder Playlist

Log in

Log in