Starfinder Playlist
Page 42 of 70 First ... 32404142434452 ... Last
  1. #411
    Quote Originally Posted by Arnagus View Post
    In case it might help in the debug:
    the function "decodeDamageText" is only called (in manager_action_damage.lua from 3.5e ruleset) to fill the "rDamageOutput". "nDamage" - which is causing the error - receives its input from "nTotal", which is the last parameter of a function you are replacing (I don't know to code LUA, so I need to take a guess here).

    Original:
    Code:
    1277: function applyDamage(rSource, rTarget, bSecret, sRollType, sDamage, nTotal)
    In manager_effect_bceDnD.lua:
    Code:
    204: function customApplyDamage(rSource, rTarget, bSecret, sDamage, nTotal)
    with a swap afterwards:
    Code:
            -- save off the originals so we play nice with others
            applyDamage = ActionDamage.applyDamage
            ActionDamage.applyDamage = customApplyDamage
    It looks like the "sRollType" parameter is missing, so when "applyDamage" is called e.g. in 3.5E/ct/ct_host.xml, it gets a wrong value:
    Code:
    ActionDamage.applyDamage(nil, rActor, CombatManager.isCTHidden(node), "number", draginfo.getDescription(), draginfo.getNumberData());
    Might also be directly in the ruleset (although I believe this is calling the original function) at 3.5E/scripts/manager_action_damage.lua:
    Code:
    applyDamage(rSource, rTarget, (tonumber(msgOOB.nSecret) == 1), msgOOB.sRollType, msgOOB.sDamage, nTotal);
    ---- Edited (2) ----
    There is still an incompatibility with the "Extended automation and overlay" extension - it looks like IMMUNE is no longer working when both extensions are loaded. Still investigating - sorry.


    ---- Edited (1) ----
    I believe I found the fix, but it caused an incompatibility with the "Extended automation and overlay" extension which needs to be fixed there (it does not gently catch calling a replaced function without the additional parameters).

    Code:
    *** BetterCombatEffects/scripts/manager_effect_bceDnD.lua.ORIG
    --- BetterCombatEffects/scripts/manager_effect_bceDnD.lua
    ***************
    *** 201,207 ****
            return true
      end
      
    ! function customApplyDamage(rSource, rTarget, bSecret, sDamage, nTotal)
            local bDead = false
            local nodeSource = nil
            local nodeTarget = nil
    --- 201,207 ----
            return true
      end
      
    ! function customApplyDamage(rSource, rTarget, bSecret, sRollType, sDamage, nTotal)
            local bDead = false
            local nodeSource = nil
            local nodeTarget = nil
    ***************
    *** 215,221 ****
            local nTempHPPrev, nWoundsPrev = getTempHPAndWounds(rTarget)
            -- Play nice with others
            -- Do damage first then modify any effects
    !       applyDamage(rSource, rTarget, bSecret, sDamage, nTotal)
      
            -- get temp hp and wounds after damage
            local nTempHP, nWounds = getTempHPAndWounds(rTarget)
    --- 215,221 ----
            local nTempHPPrev, nWoundsPrev = getTempHPAndWounds(rTarget)
            -- Play nice with others
            -- Do damage first then modify any effects
    !       applyDamage(rSource, rTarget, bSecret, sRollType, sDamage, nTotal)
      
            -- get temp hp and wounds after damage
            local nTempHP, nWounds = getTempHPAndWounds(rTarget)
    ***************
    *** 417,423 ****
            end
      
            local nTotal = tonumber(msgOOB.nTotal) or 0;
    !       customApplyDamage(rSource, rTarget, (tonumber(msgOOB.nSecret) == 1), msgOOB.sDamage, nTotal);
      end
      
      -- only for Advanced Effects
    --- 417,423 ----
            end
      
            local nTotal = tonumber(msgOOB.nTotal) or 0;
    !       customApplyDamage(rSource, rTarget, (tonumber(msgOOB.nSecret) == 1), msgOOB.sRollType, msgOOB.sDamage, nTotal);
      end
      
      -- only for Advanced Effects
    I have cross-posed to Kelrugem for the update required in his code: https://www.fantasygrounds.com/forum...933#post640933
    Code:
    *** "Full OverlayPackage with alternative icons/scripts/manager_action_damage.lua.ORIG"
    --- "Full OverlayPackage with alternative icons/scripts/manager_action_damage.lua"     
    ***************
    *** 1224,1229 ****
    --- 1224,1236 ----
                    bApplyIncorporeal = true;
            end
      
    +       if not bImmune then
    +               bImmune = {};
    +       end
    +       if not bFortif then
    +               bFortif = {};
    +       end
    + 
            -- IF IMMUNE ALL, THEN JUST HANDLE IT NOW
            -- KEL add new output
            if bImmune["all"] then
    Thank you very much about investigating this and the incompatibility with my extension Sadly, your mentioned approach may not fix the compatibility with my extension as I wrote here: https://www.fantasygrounds.com/forum...l=1#post640941

    (I link it here, too, such that Ryan can read it, too, if desired In short: For compatibility with my extension any damage application has to go through onDamage, not applyDamage)
    Last edited by Kelrugem; February 20th, 2022 at 19:34.

  2. #412
    Quote Originally Posted by Kelrugem View Post
    (I link it here, too, such that Ryan can read it, too, if desired In short: For compatibility with my extension any damage application has to go through onDamage, not applyDamage)
    Well I had all that in onDamage but the thing is onDamage is never called by the player or the server when a damage roll is made by the player, which is what got us into this mess in the first place. I could be missing something though if you want to educate.

    Arnagus - yes I was going to suggest that fix until I can get it sorted out in the meantime. It is a ruleset difference.

    Arnagus

  3. #413
    Quote Originally Posted by rhagelstrom View Post
    Well I had all that in onDamage but the thing is onDamage is never called by the player or the server when a damage roll is made by the player, which is what got us into this mess in the first place. I could be missing something though if you want to educate.
    Oh, are you sure? That would be certainly a difference between 3.5E/PF1 and 5E; in 3.5E/PF1 players call that function, too. onDamage will activate an OOB messaging procedure for handling applying damage such that also clients can adjust the wound fields etc. Maybe 5E does not have that OOB messaging in the same place? In 3.5E/PF1 onDamage is one of the first functions called when rolling damage via the typical handlers activated by the roll type (here damage)
    Last edited by Kelrugem; February 21st, 2022 at 08:53.

  4. #414
    Quote Originally Posted by Kelrugem View Post
    Oh, are you sure? That would be certainly a difference between 3.5E/PF1 and 5E; in 3.5E/PF1 players call that function, too. onDamage will activate an OOB messaging procedure for handling applying damage such that also clients can adjust the wound fields etc. Maybe 5E does not have that OOB messaging in the same place? In 3.5E/PF1 onDamage is one of the first functions called when rolling damage via the typical handlers activated by the roll type (here damage)
    I'm rolling BCE back to 2.34 until I can figure out what is actually happening.

  5. #415
    Quote Originally Posted by rhagelstrom View Post
    I'm rolling BCE back to 2.34 until I can figure out what is actually happening.
    Thank you, and sorry for the trouble

    If you need help, let me know, I can also look at it; I am just a bit occupied right now (moving to Taipei)

  6. #416
    Hi,

    I was just wondering if I could get a screenshot of how to set up the effects on a GHOUL on the NPC sheet for FGU? I'm just starting to get into the more than basic usage of FGU.

    Thanks,

  7. #417
    Many thanks - confirmed that IMMUNE is working again in 3.5e (and the script error is gone).

  8. #418
    @skester - here you go (3.5e version of saves):
    Round1.jpg
    Round2a.jpg
    Round2b.jpg
    Keep in mind that this is still the 5e behavior of Ghoul Claws (save when applying, save every round after) instead of 3.5e behavior (save when applying, stays for 1d4+1 rounds) as there is (to my knowledge) no way to set a duration.
    Last edited by Arnagus; March 7th, 2022 at 11:04.

  9. #419
    Latest fantasy grounds unity. Windows 10. Better combat effect v 2.34. Pathfinder 1 ruleset (PFRPG)
    No other extensions.
    I think all (or most) these find did work before, it might have been all the way back to version 2.23 since BCE was broken in version 2.24 for pathfinder for a while
    I have tested everything else, so what I did not report here works as intended for pathfinder ruleset unless I missed something.


    SAVEA does not work at all. Example:
    SAVEA: will 10
    This does nothing. It only says Effect ..... expired without rolling anything


    SAVEONDMG does not work. Example:
    SAVEONDMG: reflex 10
    effect is placed on character A
    When character A takes damage no roll is made.


    SDMGOS does not work with dice. Example:
    "SDMGOS: 2d6" does not work
    "SDMGOS: 2" does work
    "DMGOE: 2d6" does work
    "SDMGOE: 2d6" does work


    STACK This effect also work in Pathfinder. It only says 5E in forge

  10. #420
    I guess you need to add the following to your list of effect components no longer working (and actually throwing an error):
    • ability: value-X (e.g. STR: 19-X)

    This seems to be caused by the CoreRPG function (manager_dice.lua): convertStringToDice

    Suggested Fix:
    Code:
    *** rulesets/CoreRPG/scripts/manager_dice.lua.ORIG
    --- rulesets/CoreRPG/scripts/manager_dice.lua
    ***************
    *** 233,238 ****
    --- 233,240 ----
                                    for i = 1, nDieCount do
                                            table.insert(tDice, sDieType);
                                    end
    +                       elseif vTerm and vTerm == "-X" then
    +                               nMod = 0;
                            end
                    end
            end
    *** Update 2022-03-20 ***
    I have put above fixed function into a small extension (to avoid repeated correction of updated CoreRPG and for an easy "take over" by Ryan) and attached it to this post. Just drop into the usual FGU\extensions folder until Ryan fixed BCE.

    *** Update 2022-05-04 ***
    May the fourth... be with you. I have removed the package again as Ryan fixed BCE.


    *** For reference reasons, I keep below alternative, however, with the attached package, it is no longer needed ***

    If this is not feasible, it can be also fixed in BCE, however, this would change the syntax as a space in-between the value and the "-X" would be needed:
    • ability: value -X (e.g. STR: 19 -X)


    Here the alternative:
    Code:
    *** extensions/BetterCombatEffects/scripts/manager_effect_bceDnD.lua.ORIG
    --- extensions/BetterCombatEffects/scripts/manager_effect_bceDnD.lua
    ***************
    *** 325,339 ****
                            if(rEffectComp.remainder[1]:match("%-X")) then
                                    local sMod = rEffectComp.remainder[1]:gsub("%-X", "")
                                    local nMod = tonumber(sMod)
                                    if nMod ~= nil then
                                            if(nMod > nAbility) then
                                                    nAbility = nMod - nAbility
                                            else
                                                    nAbility = 0
                                            end
                                            --Exception for Mad Nomads effects display extension
                                            local sReplace = rEffectComp.type .. ":" ..tostring(nAbility)
    !                                       local sMatch =  rEffectComp.type ..":%s-%d+%-X"
                                            rNewEffect.sName = rNewEffect.sName:gsub(sMatch, sReplace)
                                    end
                            end
    --- 325,340 ----
                            if(rEffectComp.remainder[1]:match("%-X")) then
                                    local sMod = rEffectComp.remainder[1]:gsub("%-X", "")
                                    local nMod = tonumber(sMod)
    +                               if nMod == nil then nMod = rEffectComp.mod; end
                                    if nMod ~= nil then
                                            if(nMod > nAbility) then
                                                    nAbility = nMod - nAbility
                                            else
                                                    nAbility = 0
                                            end
                                            --Exception for Mad Nomads effects display extension
                                            local sReplace = rEffectComp.type .. ":" ..tostring(nAbility)
    !                                       local sMatch =  rEffectComp.type ..":%s-%d+%s?%-X"
                                            rNewEffect.sName = rNewEffect.sName:gsub(sMatch, sReplace)
                                    end
                            end
    Lengthy Explanation:
    STR: 19-X will be passed from BCE manager_effect_bceDnD.lua in function replaceAbilityScores to the CoreRPG (manager_effect.lua) function parseEffectCompSimple. It is split into 19 and "-X", where "-X" is (with the updated CoreRPG function) processed into a dice component with a minus and dropped (there is no "X" die) but the 19 makes it into a modification value rEffectComp.mod.
    As from the dice processing a modification value is returned, the string is considered parsed and not added in his original form "19-X" to the "rEffectComp.remainders" (which are picked up by replaceAbilityScores to process the ability replacement - this is why my preferred fix simply drops the rEffectComp.mod so the string is considered unparsed). The return of an rEffectComp.mod causes the error as replaceAbilityScores expects such a rEffectComp.remainder to arrive, instead it is empty.
    The preferred option is obviously to make the dice processing aware of the "-X". Alternatively make "-X" a separate effect component (with a space in-between 19 and "-X") - but this will require update of all effects using the original syntax.
    Last edited by Arnagus; May 4th, 2022 at 21:02. Reason: Removing patch extension as BCE was fixed

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