MangoFVTT / fvtt-ready-set-roll-5e

A module for faster, easier, and more dynamic rolling in the D&D 5th Edition system for Foundry VTT.
GNU General Public License v3.0
42 stars 20 forks source link

[BUG] DnD5e 4.1 compatibility #529

Open nschoenwald opened 1 week ago

nschoenwald commented 1 week ago

Description So, 4.1 just came out and I obviously don't expect RSR to be compatible right away. I just wanted to create this issue to let users share their experience and track progress on the update.

From my quick testing, RSR does not completely break with the update, but fast forwarding rolls does not work anymore. Chat cards still get merged, so not all functionality breaks.

cjones01 commented 1 week ago

I am currently running FoundryVTT V12 Build 331 on Forge with D&D 4.1.0. I have two active modules running: 1) Ready Set Roll 3.3.5 and 2) The Forge 1.14.9.

When rolling any attack from player character sheets, creatures, or NPCs the Attack Roll is rolled. Regardless of the "Roll Damage Manually" setting, I must manually roll damage. I receive this console output when clicking the Attack Roll:

foundry.js:655 Error: Error thrown in hooked function '' for hook 'dnd5e.preUseActivity'. CONFIG.Dice.D20Roll.determineAdvantageMode is not a function at Hooks.onError (foundry.js:654:24) at #call (foundry.js:636:36) at Hooks.call (foundry.js:614:38) at AttackActivity.use (mixin.mjs:231:16) at Item5e.use (item.mjs:810:23) at InventoryElement._onAction (inventory.mjs:444:21)

I would also like to note that the integration between DnDBeyond does roll the damage on an attack roll

MangoFVTT commented 1 week ago

dnd5e 4.1.0 changed a bunch of things again, so don't expect RSR to work at all in any expected ways. Anything that does work is pure coincidence. I'll try to take a look asap but given that the changes are (once again) quite significant, there will be some time before an update

cjones01 commented 1 week ago

I did some digging around in the foundry DnD5e repo. Ready Set Roll is calling determineAdvantageMode on line 36 of core.js. It looks like the DnD5e CONFIG.Dice.D20Roll.determineAdvantageMode was changed in commit #1431 https://github.com/foundryvtt/dnd5e/commit/8d3c81b213ef6a5502f93ffc2cd0b3c5e9407d3f

Starting on line 176 there are new methods HasAdvantage() & HasDisadvantage() that might be helpful https://github.com/foundryvtt/dnd5e/blob/4.1.x/module/dice/d20-roll.mjs

Ready-set-Role is an invaluable module. I really appreciate the work you put into this. Thanks in advance.

friction1 commented 1 week ago

When is foundry just going to make RSR a core part of DND5e?

jesshmusic commented 2 days ago

I am able to get the roll to work with no errors, but it is not hiding the dialogue. Also I don't see any way to see isFF in the new DnD5e code so far

static processKeyModifiers(config = {}) {
        const isAdvantage = CONFIG.Dice.D20Roll.hasAdvantage;
        const isDisadvantage = CONFIG.Dice.D20Roll.hasDisadvantage;

        // const {isFF, advantageMode} = CONFIG.Dice.D20Roll.determineAdvantageMode({
        //     event: config.event,
        //     advantage: config.advantage,
        //     disadvantage: config.disadvantage
        // });

        if (!isAdvantage && isDisadvantage) {
            return { fastForward: true, advantage: false, disadvantage: false}
        }

        return {
            fastForward: true,
            advantage: isAdvantage,
            disadvantage: isDisadvantage
        }
    }
EvldoaTV commented 2 days ago

Not sure if this is a Dice so Nice or a RsR issue, but since last update when making an attack roll and damage rolls Dice so nice rolls twice with same result, have seen something similar in previous versions also with be posting this on Dice so nice bug reports also

MangoFVTT commented 14 hours ago

Update: I have all non-activity rolls working, but activities are pretty much entirely broken due to the roll rework. I essentially have to start from scratch on activity processing which is frustrating and will take more time than expected

nschoenwald commented 2 hours ago

Update: I have all non-activity rolls working, but activities are pretty much entirely broken due to the roll rework. I essentially have to start from scratch on activity processing which is frustrating and will take more time than expected

Thank you for the update, I really appreciate all your work on keeping up this module with all the changes to the system. Ready Set Roll is an absolute prerequisite for me to update the 5e game system and I know a lot of other DMs who feel the same way. I would not enjoy playing 5e on foundry nearly as much without your module.