Refer a Friend
Page 13 of 14 First ... 3 11 12 13 14 Last

Thread: 5e Reactions

  1. #121
    Quote Originally Posted by Stv View Post
    TBH, I've no idea why that's happening.
    All my recent updates have been on the test channel in readiness for the major effects overhaul that has been done by SW.
    It all works in test, so not really giving the issue any time on the live server as I think the new update is live in the middle of this month.

    I hope this isn't too much of an inconvenience for those that use this extension, but I only have so much free time to devote to the upkeep of my extensions.

    Cheers,
    Stv.
    No worries. No need to do dbl work. Thanks!

  2. #122
    Quote Originally Posted by Stv View Post
    TBH, I've no idea why that's happening.
    All my recent updates have been on the test channel in readiness for the major effects overhaul that has been done by SW.
    It all works in test, so not really giving the issue any time on the live server as I think the new update is live in the middle of this month.

    I hope this isn't too much of an inconvenience for those that use this extension, but I only have so much free time to devote to the upkeep of my extensions.

    Cheers,
    Stv.
    Hello

    This is what I found: When I removed these lines, the effect added messages display now. Not sure yet if it breaks anything.

    Those two lines break the normal CT effect chat because they **replace Fantasy Grounds’ original effect-add handler with the extension’s custom handler**.

    ```lua
    oldonEffectAddMain=EffectManager.onEffectAddMain
    EffectManager.onEffectAddMain=newonEffectAddMain
    ```

    What the first line does is save the original FG function. What the second line does is **take over the whole effect-add path** for that extension. After that, every effect add goes through `newonEffectAddMain` first, not the normal ruleset handler.

    Why that matters: your A/B test already proved the behavior change. In the session with **5e Reactions loaded**, the log shows the extension active, and in the later clean session without it, the normal chat lines for `Blinded`, `Cursed`, and `Encumbered` come back.

    So the simple summary is:

    The extension is overriding the base effect-add handler.
    Once it does that, the normal Fantasy Grounds “Effect [...] -> [to ...]” chat output no longer comes from the original path.
    That is why removing the extension restores the chat messages.

    So it is not that those two lines “break CT effects.” The effects still get added. What they break is the **normal chat announcement path for effect adds**.
    Wrandalljr4
    IT System Specialist
    GMing Since 1982
    CUmming, Ga, EST

    Discord - https://discord.gg/MaV42Rf

  3. #123
    That does allow the chat to work but the (RCT) function no longer works meaning the main point of the ext is not working with this fix. At least we know where the issue might be.

  4. #124
    Quote Originally Posted by nephranka View Post
    That does allow the chat to work but the (RCT) function no longer works meaning the main point of the ext is not working with this fix. At least we know where the issue might be.
    I never go the chance to see if it still work, but I had a feeling that may not.
    Wrandalljr4
    IT System Specialist
    GMing Since 1982
    CUmming, Ga, EST

    Discord - https://discord.gg/MaV42Rf

  5. #125
    Quote Originally Posted by nephranka View Post
    That does allow the chat to work but the (RCT) function no longer works meaning the main point of the ext is not working with this fix. At least we know where the issue might be.
    I tracked down the issue with effect messages not showing in chat and made a fix that seems to be working on my end.

    The problem was the old override of `EffectManager.onEffectAddMain`. I removed that hook and switched it to the current CoreRPG-supported hook instead:
    `EffectManager.setCustomOnEffectAddIgnoreCheck(... )`

    Here is the exact code change.

    Old code removed:

    ```lua
    local oldonEffectAddMain = EffectManager.onEffectAddMain
    EffectManager.onEffectAddMain = newonEffectAddMain

    ```

    New hook added in `onInit()`:

    ```lua
    EffectManager.setCustomOnEffectAddIgnoreCheck(newo nEffectAddIgnoreCheck)
    ```

    And this is the replacement function:

    ```lua
    function newonEffectAddIgnoreCheck(nodeCT, rNewEffect)
    if not nodeCT or not rNewEffect or not rNewEffect.sName then
    return nil
    end

    if not checkeffectforreaction(rNewEffect) then
    return nil
    end

    local sSource = ""
    if rNewEffect.sSource == "" then
    sSource = DB.getPath(nodeCT)
    else
    sSource = rNewEffect.sSource
    end

    if sSource == "" then
    return nil
    end

    if reactionused(sSource) == 1 then
    local nodeSource = DB.findNode(sSource)
    local sActorName = ""
    if nodeSource then
    sActorName = ActorManager.getDisplayName(nodeSource)
    end
    if sActorName == "" then
    sActorName = rNewEffect.sName
    end
    return sActorName .. " tried to use " .. rNewEffect.sName .. " but couldn't react in time"
    end

    DB.setValue(sSource .. ".reaction", "number", 1)
    return nil
    end

    ```

    From my testing so far, this seems to bring back the normal effect-added chat messages while still keeping the reaction check logic working for `(RCT)` effects.

    Can someone double-check this on their side and make sure I didn’t break anything else?
    Last edited by wrandalljr4; April 13th, 2026 at 04:09.
    Wrandalljr4
    IT System Specialist
    GMing Since 1982
    CUmming, Ga, EST

    Discord - https://discord.gg/MaV42Rf

  6. #126
    Hi,
    I already have this fix sat in Test ready to go to Live when the new update is published (hopefully this month).

    Cheers, Steve.

  7. #127
    Quote Originally Posted by Stv View Post
    Hi,
    I already have this fix sat in Test ready to go to Live when the new update is published (hopefully this month).

    Cheers, Steve.
    Okay, I will use my version until then.
    Wrandalljr4
    IT System Specialist
    GMing Since 1982
    CUmming, Ga, EST

    Discord - https://discord.gg/MaV42Rf

  8. #128
    Quote Originally Posted by wrandalljr4 View Post
    I tracked down the issue with effect messages not showing in chat and made a fix that seems to be working on my end.

    The problem was the old override of `EffectManager.onEffectAddMain`. I removed that hook and switched it to the current CoreRPG-supported hook instead:
    `EffectManager.setCustomOnEffectAddIgnoreCheck(... )`

    Here is the exact code change.

    Old code removed:

    ```lua
    local oldonEffectAddMain = EffectManager.onEffectAddMain
    EffectManager.onEffectAddMain = newonEffectAddMain

    ```

    New hook added in `onInit()`:

    ```lua
    EffectManager.setCustomOnEffectAddIgnoreCheck(newo nEffectAddIgnoreCheck)
    ```

    And this is the replacement function:

    ```lua
    function newonEffectAddIgnoreCheck(nodeCT, rNewEffect)
    if not nodeCT or not rNewEffect or not rNewEffect.sName then
    return nil
    end

    if not checkeffectforreaction(rNewEffect) then
    return nil
    end

    local sSource = ""
    if rNewEffect.sSource == "" then
    sSource = DB.getPath(nodeCT)
    else
    sSource = rNewEffect.sSource
    end

    if sSource == "" then
    return nil
    end

    if reactionused(sSource) == 1 then
    local nodeSource = DB.findNode(sSource)
    local sActorName = ""
    if nodeSource then
    sActorName = ActorManager.getDisplayName(nodeSource)
    end
    if sActorName == "" then
    sActorName = rNewEffect.sName
    end
    return sActorName .. " tried to use " .. rNewEffect.sName .. " but couldn't react in time"
    end

    DB.setValue(sSource .. ".reaction", "number", 1)
    return nil
    end

    ```

    From my testing so far, this seems to bring back the normal effect-added chat messages while still keeping the reaction check logic working for `(RCT)` effects.

    Can someone double-check this on their side and make sure I didn’t break anything else?
    Might be a conflict for me but the reaction is not checked off, just an fyi.

  9. #129
    Found the issue:

    You have a typo:
    EffectManager.setCustomOnEffectAddIgnoreCheck(newo nEffectAddIgnoreCheck) should not have the space?

    Still not working. It looks like the function takes arguments but your code does not pass them through....

    Not sure...not working for me.
    Last edited by nephranka; April 14th, 2026 at 00:27.

  10. #130
    Quote Originally Posted by nephranka View Post
    Found the issue:

    You have a typo:
    EffectManager.setCustomOnEffectAddIgnoreCheck(newo nEffectAddIgnoreCheck) should not have the space?

    Still not working. It looks like the function takes arguments but your code does not pass them through....

    Not sure...not working for me.
    Hello

    I tested with Shield and Uncanny Dodge. I was prompted each time, asking if I wanted to use my reaction. Is there another feature that is not working?

    Warren
    Wrandalljr4
    IT System Specialist
    GMing Since 1982
    CUmming, Ga, EST

    Discord - https://discord.gg/MaV42Rf

Page 13 of 14 First ... 3 11 12 13 14 Last

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