-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to grab the advantage/disadvantage calculation output from Midi? #16
Comments
You're thinking of using this with Midi? I'm guessing then you have Midi configured to still prompt for rolls then, it's not auto-rolling attacks or saving throws. If that's the case, I suppose I could look into some sort of compatibility with it. Like you said, maybe it does nothing related to advantage/disadvantage but could still do CSS (maybe even the new messages feature). |
Yes, basically Midi allows you to automate only the parts you want. Players like to select advantage/disadvantage (they can fast forward with a keybind but some of my players aren't too comfortable with that). GM rolls auto fastforward. Anyway, irregardless of that, the CSS you have for showing the favored roll outcomes (which midi also calculates and sets as the default selection) and the accompanying message is super clear and nice. So this would allow my players to see the calculated roll clearly, then choose to use something different if they want to. But if it's too much for you to dig through, maybe I could ask Midi dev to add in something like this. |
@emirkmo Hey, I know it's not a perfect solution but you could install this package: https://github.com/cswendrowski/FoundryVTT-Custom-CSS And add your own CSS rule for the default button:
Or any custom rule. |
Yeah, could add the CSS in other ways. Did confirm that it does work though. I can see the buttons with bold text. I tested it out and this does work with Midi QOL. From what I can tell, Midi will ignore this module's advantage flags anyways. Sure, that does mean this module wastes time doing the calculations but it's not a noticeable performance hit. The unfortunate part is the new messages feature doesn't work either. This module adds something to the roll options that Midi doesn't pass along to the system's roll method for some like attack and damage rolls. Nothing I can do except file a bug report there. From what I can tell it should work with saves and ability checks but I can't get Midi to show the dialogs no matter what settings I change. Edit: It does show messages for saves and ability checks. I also had MRE loaded (was testing w/ it earlier) and it was interfering. |
A simple CSS hack is easier, but a maintained module is of course much more stable in the long run. Great to hear it's working. I will verify this weekend and report back. Seems like there are some compatibility issues with other modules and that might be the issue I had. Probably better to track that in another issue though. |
Did another round of testing with Better Rolls and noted that messages do not work at all. When it queries for advantage it does not use the default template and doesn't pass along any options anyways. Added more information about Midi as well. Note to self on messages for attack and damage rolls: it doesn't work because Midi doesn't pass along the dialog options
I think the messages part is working for attack rolls. |
Looking for a little integration @tposney? I turned on Midi's debugging b/c it's been a while and I couldn't remember the order some of this stuff is called but looks like there's a few Midi workflow phases that are run before Advantage Reminder does it's work in the wrapped Two ways I can think of:
|
fwiw, I'd lean towards that first option... seems more straight forward |
@tposney Sorry for letting this fall by the wayside. We could just use Then this module will just look for a string or array of strings in that option and add it to any messages it finds in the active effects. The one function to look out for is const messages = [ ... ];
item.rollDamage({ options: {"dialogOptions.adv-reminder.messages": messages }}); |
Is it possible to grab the advantage/disadvantage calculation output from MidiQOL, and only use this mod as basically a CSS enhancer for the advantage/disadvantage auto selection?
The text was updated successfully, but these errors were encountered: