flamewave000 / dragonflagon-fvtt

DragonFlagon FoundryVTT Modules
BSD 3-Clause "New" or "Revised" License
64 stars 62 forks source link

Issue [PF2E]: Skipping User Input Prompt for Critical Rolls #453

Closed 117ksk closed 1 year ago

117ksk commented 1 year ago

Looks like all critical rolls made with any weapon in the PF2e game system skip "Rendering RollPrompt" and just jump to rolling a random result. All normal damage rolls from weapons prompt the user correctly only breaks with critical damage rolls. I have also been able to recreate this "prompt skip bug" with various spell damage rolls such as with Acid Splash (rolling damage directly from spell card in chat).

flamewave000 commented 1 year ago

If you enable the "Legacy" mode in DF Manual Rolls and you get a browser prompt for those rolls, then this is an issue with the game system which is not using async for those specific rolls.

117ksk commented 1 year ago

I also had this thought and attempted to enable "Legacy" mode. Unfortunately after doing so, the "Critical" damage roll simply breaks and no roll is either prompted for nor rolled at all. I also found the following error in the log everytime the "Critical" damage roll is attempted while "Legacy" mode is enabled: image

And this error is found every time I attempt a "Acid Splash" spell damage roll while "Legacy" mode is enabled: image

Last thing to point out, after enabling "Legacy" mode and then disabling it again results in the broken critical and spell damage roll bug (simply no roll at all and above errors in log) to persist until the game is reloaded. Hopefully this helps, let me know if you would like me to test anything else for troubleshooting.

flamewave000 commented 1 year ago

Ahh yes, this error is because you are trying to use Legacy mode from within the FoundryVTT Client that gets installed instead of an actual browser. The client is essentially just a browser called "Electron" and for some baffling reason they decided to not implement the "prompt()" function (available on every browser since literally 2001). Very frustrating but nothing we can do about that.

Simply launch your foundry and then open a browser and sign in to your http://localhost:30000

117ksk commented 1 year ago

Understood. Confirmed prompts for critical and mentioned spell damage works with Legacy mode turned on and in browser only. Thanks!