flamewave000 / dragonflagon-fvtt

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

DF Manual Rolls: Doesn't work for the LancerRPG system. #372

Open Key165 opened 2 years ago

Key165 commented 2 years ago

Module DF Manual Rolls v2.3.1

Describe the issue Rolling using the provided UI doesn't work.

To Reproduce Steps to reproduce the behaviour:

  1. Go to any rollable element in the character sheet.
  2. Click to roll.
  3. Input number for manual roll.
  4. See error.

Expected behaviour The dice rolled doesn't follow the inputted number.

flamewave000 commented 2 years ago

This is most likely a conflict with either the system you're using, or another module you have installed. Please post what system you're playing in, and also please try running DF Manual Rolls with all other modules disabled.

Key165 commented 2 years ago

I am using the Lancer system. I tried using it without any other module, and it is still not working.

flamewave000 commented 2 years ago

Ok, likely a conflict with Lancer then. I'm completely unfamiliar with that game system. I'll have to install it and see if I can figure out what's up. In the meantime, could enable the "Legacy support" option in the manual roll module settings? Then try it again and let me know if you start getting a dialog prompt. The Legacy mode will only work if you log in using a browser.

Key165 commented 2 years ago

I tried using the legacy mode and it doesn't work too. I did get a dialog prompt but still the same result as the normal mode.

aetherknight commented 1 year ago

I think I may have found the source of this problem:

The Lancer system registers a handlebar helper that conflicts with a data variable name used by df-manual-rolls' roll-prompt.hbs template. Specifically, idx.

I don't have Foundry setup locally for development at the moment, but I was able to solve this by directly modifying the template to use this.idx instead of idx within the each loop.

Notes

I ran the JS debugger in Firefox on a world with the above foundry/system/module versions, and discovered that the df-manual-rolls dialog for inputting manual rolls had malformed form input field names. (eg, instead of 0-1, 0-1, etc. it had 0- and 0- when used with the Lancer system)