View Full Version : Modifier buttons on the desktop (extension)
Daso
November 6th, 2020, 00:32
Hi everyone!
A while back I asked if it was possible to add the modifiers buttons to the desktop like in other rulesets to simplify rolling and was told I had to do that through an extension. I took a stab at writing that extension and I've successfully written my first extension!
The buttons I added are:
Lesser Cover
Cover
Greater Cover
Hidden
Concealed
Flat Footed
I'm sharing it here in case someone else would have wanted those button.
40799
(for those that are better at scripting, if there's anything in my extension that I can write better, please let me know!)
ShadeRaven
November 6th, 2020, 00:41
Outstanding Daso!
If you don't mind me suggesting, toss in a screenshot or two on your opening post so people can see what you are offering. Sometimes seeing what an extension does visually increases the likelihood that people will enthusiastically grab it for use. :)
Daso
November 6th, 2020, 00:50
Good idea! added a screenshot. (not sure how to embed the image though)
The buttons get cropped a little, I wasn't sure how to fix that though. They're functional though!
Dark Mullisha
March 7th, 2021, 21:35
Very nice.
lostsanityreturned
March 11th, 2021, 06:16
Good inclusion, I kept telling myself that I would do this. But as a GM I have them bound to my mouse as buttons anyway.
Certainly something that is worth being default in the ruleset though imo.
Dark Mullisha
March 15th, 2021, 01:24
Had this running over the weekend in two sessions and the players and I loved it, great addition.
Weissrolf
March 16th, 2021, 17:02
Very useful, because using F-key shortcuts gives no visual feedback on whether a modifier is enabled or not. I would like to move these to a different place without having to move the default modifier box, though.
Farnaby
December 18th, 2021, 20:04
Due to latest FGU update your extension doesn't work anymore :sadface:
I get the following error when pressing each button: Script execution error: [string"DEF_LCOVER"]:3: attempt to cal field 'onValueChanged' (a nil value)
So, also DEF_GCOVER, HIDDEN, etc.
EmptyOwl
December 23rd, 2021, 06:45
Amazing extension but sadly broken ATM :-( Is the original author still around and/or updating this? Such a good idea that we use often!
Mysteran
January 5th, 2022, 19:53
Not the original author, but I've updated the extension to work with the changes to the ruleset. File is attached. Let me know if you run into any issues as I don't really use Daso's extension much.
I used Daso's extension as a base to build my own customized versions with smaller buttons moved to the left of the dice tray. Attached those as well in case anyone is interested.
PF2E Modifiers Desktop Buttons.ext - Daso's extension updated to work with the ruleset changes.
Myst - PF2E Desktop Modifiers.ext - My base extension with smaller buttons moved to the left of the dice tray.
Myst - PF2E Desktop Modifiers - Dark.ext - Same as the above, but buttons recolored to work with the base dark theme that I use more often.
EmptyOwl
January 5th, 2022, 20:16
Wow! Thanks so much! Have some rep! I'll try your version as it seems it'll have support going forward, but kudos for taking the time to make the unsupported version compatible.
Farnaby
January 5th, 2022, 20:29
Great job, thanks.
I was wanting to look at it in the next 2 weeks but you've saved me quite some time.
vonBlashyrkh
January 11th, 2022, 09:20
You are a saint, my group and I have been missing these immensely.
Milke
February 26th, 2023, 06:48
I'm just now seeing this post a year later. I have not been able to use my desktop modifier buttons because they were broken. And I just now see you fixed them. Yesssssss! Such a quality of life upgrade.
The only thing that would make this extension better is if it also had the critical and half damage buttons.
Great work!
Mysteran
June 20th, 2023, 21:55
I'm not very active on the forums so I just saw your message as I came here to post... funny you should ask about that.
At the request of my gaming group I added Critical and Half Damage buttons to my versions of the extension.
Also at the request of my group the Dark Theme version now has a light colored ring around the button when pressed to give a better visual indicator the button is pressed down. The two shades of grey were a bit difficult to tell apart at times.
Screenshots of the Dark Mode version
No buttons pressed:
57871
Crit button pressed:
57872
Farnaby
June 21st, 2023, 16:33
Neat, thanks for sharing.
Mysteran
November 16th, 2023, 01:54
Since the "Legacy" PFRPG2 ruleset name got changed, needed to go through and update the extensions to support both the PFRPG2 and PFRPG2-Legacy rulesets. Updates for those are attached.
webdove
February 3rd, 2024, 19:20
I had missed this when switching from 5E to PF2. Thanks very much for your help.
Trenloe
July 8th, 2024, 19:10
As a heads up, tomorrow (in the Tuesday update) modifier buttons will now be shown on the desktop (with appropriate labeling of Flat-Footed/Off-guard). So this extension will not be needed anymore.
Thanks @Daso and @Mysteran for your work on these and sharing with the community.
https://www.fantasygrounds.com/forums/attachment.php?attachmentid=61247
MaxAstro
July 8th, 2024, 22:20
As a heads up, tomorrow (in the Tuesday update) modifier buttons will now be shown on the desktop (with appropriate labeling of Flat-Footed/Off-guard). So this extension will not be needed anymore.
Thanks @Daso and @Mysteran for your work on these and sharing with the community.
Ooh, that's exciting.
Am I correct in guessing that the Off-guard modifier still won't work with IFT for sneak attack purposes? Would be really nice to have some way to automate that...
Trenloe
July 8th, 2024, 22:53
Am I correct in guessing that the Off-guard modifier still won't work with IFT for sneak attack purposes? Would be really nice to have some way to automate that...
There's a lot of code built into the FF/Off-Guard modifier button that assumes it's only being used for an attack action, not a damage action. Yes, that could be changed, but now it changes how that button has worked since day one and making the change introduces risk - i.e. changing or breaking functionality. There's a number of small things, but the main change is that the modifier button resets after an attack action - it would be clunky to have to select it again before rolling for damage and it could create issues with not resetting after the attack action (so that you don't need to select it again for damage) if there isn't a damage action follow up (i.e. the attack missed) - then users who are familiar with the FF/OG modifier button being cleared after an attack might do further actions with it selected when it shouldn't be. So, maybe just a "clunky" approach of having to select the FF/OG modifier button before each action - attack or damage, might be the least intrusive.
MaxAstro
July 8th, 2024, 23:42
It's easy enough to train my players to click the button twice and honestly that would be less clunky than what we are doing now, which is creating an expiring ETTS spell effect for each player and having them apply it before attacking.
EDIT: Although it occurs to me - obviously I have no idea what the underlying code looks like so no idea if this is feasible, but - the damage roll already "remembers" whether the attack roll was a crit or not. Can you add a rider to that code to "remember" whether the attack roll had the off-guard modifier or not?
Trenloe
July 8th, 2024, 23:53
I've had another look at it, and I remember the reason why I haven't done it before - to fully use IFT effect processing an "Off-Guard" effect needs to be placed on the target during the damage action and then cleared off afterwards (the latter is easy enough). The issue is that the player instance needs to get the GM instance to add the effect asynchronously (using OOB messaging) and this takes it outside of the normal damage processing steps resulting in the effect not being applied before the damage code actually checks for the Off-Guard IFT effects. I'll look at other possible ways of doing it, but if it's not 100% reliable I won't deploy the code.
MaxAstro
July 9th, 2024, 01:34
I wonder if sneak attack is a "core" enough function that it's worth hard-coding it in some way instead of relying on IFT like it does now? For example, you could have an effect that was something like "SNEAK: 1d6 precision" and instead of checking for an effect on the target it just checks if the actor's most recent attack roll had the off-guard modifier?
Assuming that an off-guard effect on the target would result in the same modifier being present to check for, anyway.
Trenloe
July 9th, 2024, 01:54
I wonder if sneak attack is a "core" enough function that it's worth hard-coding it in some way instead of relying on IFT like it does now? For example, you could have an effect that was something like "SNEAK: 1d6 precision" and instead of checking for an effect on the target it just checks if the actor's most recent attack roll had the off-guard modifier?
Assuming that an off-guard effect on the target would result in the same modifier being present to check for, anyway.
I've enlisted Moon Wizard's help to get some ideas and he mentioned the possibility of hard coding sneak attack. I may end up going that way... but, if I'm going to do FF/OG modifier button checks during the damage action then I'd like to code for all IF: Off-Guard/IFT: Off-Guard effects and not just sneak attack. I also want to support the sneak attack effects that are already present on created PCs.
Trenloe
July 9th, 2024, 05:30
There was a lot more complexity in this rabbit hole than I wanted to spend the time overcoming today, but I got it working by using global flags (local to each client) to indicate if the FF/OG button was clicked and which "creature" was the source - the latter was needed for matching IF: Off-guard; conditional effects. With the update tomorrow, the FF/OG modifier button should now cater for IF/IFT Flat-footed/Off-guard effects for both attacks and damage vs. all selected targets.
Farnaby
July 9th, 2024, 08:34
That sounds fantastic, can't wait to try it out.
Thanks Trenloe!!!
webdove
July 9th, 2024, 15:01
That’s excellent!
MaxAstro
July 9th, 2024, 19:20
Absolutely incredible.
This is using the "two clicks" implementation mentioned earlier, right? So I should instruct my players to click the off-guard modifier for both the attack and the damage?
Trenloe
July 9th, 2024, 19:28
Absolutely incredible.
Thanks! I've spotted a couple of small issues while doing the overview video - fix for those soon...
This is using the "two clicks" implementation mentioned earlier, right? So I should instruct my players to click the off-guard modifier for both the attack and the damage?
Yes.
Video just posted: https://www.youtube.com/watch?v=gsKuuiTURz4
Powered by vBulletin® Version 4.2.1 Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.