Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

[PF] - Macros not reading character sheet variables properly

December 22 (9 years ago)

Edited December 22 (9 years ago)
When I go to the Buffs section on the Core tab and change around the buff values to my damage, the macro that I created for damage does not account for the change. Instead it appears to use whatever value was in the buffs section when I first loaded in. Once it also failed to properly add my ability modifier to the equation, and then started working again for no discernible reason.

Could this be an issue of slow internet connectivity? What's going on here?

Macro in question:
&{template:pf_attack} {{character_name=Eliyas Moraeson's}} {{subtitle}} {{name=Scimitar}} {{[[1d6+?{Enhancement Bonus?|0}+@{Eliyas Moraeson|WIS-mod}+?{Smite? Yes=1|0}*4+@{Eliyas Moraeson|buff_DMG-total}]]=Slashing Damage}} {{[[?{d6 in aux effect?|0}d6+?{Radiant Charge?|0}d6]]=Aux Damage}}

The section it should be reading is buff_DMG-total, but it's failing to.
December 22 (9 years ago)
When you edit an Attribute, be sure to click into another field before closing the Character Window such that the changes can be properly registered.
December 22 (9 years ago)

Edited December 22 (9 years ago)
Noted. I took this one step further and tried clicking into my buff_DMG-total field (even though you can't input numbers in that field directly), and then clicking into another field and I've found that this updates my damage buffs properly and my macro reads them. I've checked my other macros, and they too do not respond to changes on the character sheet unless I mouse over everything that's changed. It's at least functional in this state, but is there a way to fix it?
December 22 (9 years ago)
Ziechael
Forum Champion
Sheet Author
API Scripter
As this is possibly a character sheet specific issue i'll move this thread to that forum so that the pf gurus can take a look.
December 22 (9 years ago)
vÍnce
Pro
Sheet Author
The buffs array along with nearly all other auto-calculated attributes on the sheet are now being handled by sheet workers(javascript). I'm thinking there's something amiss if you aren't getting a proper value for buff_DMG-total. Does it make a difference if you toggle row(s) of buffs on/off? Do you get a proper value for buff_DMG-total by itself?
Chris has handled all the new sheet worker scripting so he's the most qualified to pinpoint the issue. I'll make sure he sees this post.
December 22 (9 years ago)
chris b.
Pro
Sheet Author
API Scripter
For every update you make, you have to hit tab or click in the next field you are going to update. You can no longer update a field and leave the cursor in that same field, but have to commit back to the server by hitting enter or tab etc. this also means changes directly to the Attributes & Abilities tab instead of the sheet will not read new attributes unless the sheet is recalculated.

It sounds like recalculate never ran, or javascript is not running. there should be no reason that you have to click again in a field. what browser are you using?

to make sure that any changes are taken into account you can click the checkbox at the upper right labelled "recalc"  which will recalculate all fields.

December 24 (9 years ago)

Edited December 24 (9 years ago)
Thanks for the responses, gentlemen.
@Vince toggling the rows on and off does seem to make a difference. The buffs never calculate into the buff total when I have their row unchecked (and they sometimes do when I do have them checked). I seem to be able to get a proper buff_DMG-total in that when it does calculate, it calculates correctly.

@chris I was using PaleMoon, but I swapped over to Firefox over the course of my troubleshooting because I saw that PaleMoon wasn't fully supported. As it stands right now, sometimes when I log in to the game, some of my attributes are uncalculated by default. If I go to my skills tab, I see that my charisma mod has not been added to my cha-related skills. Once I return to the attributes page, and click into and back out of my charisma mod entries, they begin to calculate. The recalc button also appears to work for this issue. If I refresh the game, these entries may to their uncalculated state and I have to repeat the process again.

Other times, the whole buff page is unresponsive. The rows do not "activate" when toggled, nor to they show up in the totals below, and mousing over the entries that should be changing does not work either. Refreshing seems to fix this. Other times, the buff page seems to have returned to its full functionality, and the calculations will run if I merely toggle/untoggle a row (as opposed to needing to mouse over the values each time like I described previously). EDIT: Upon further testing, it appears that even if the buffs appear to have calculated, my attack and damage macros will not read them unless I click into the buff_DMG-total field after each change to wake it up, so to speak. The recalculate button doesn't work for this. My attack macro, which uses the attk-melee field, does not seem to require this "wake-up", and neither does my saves macro, but buff_DMG-total (for my damage macro) does.

Both issues seem to be occurring irregularly but not infrequently. Sometimes when I load in there is no issue. Sometimes there is, with no rhyme or reason that I can discern. The one I am chiefly concerned with is the buffs issue, because it is both more frequent and it seems to be sometimes fixable only on a refresh, which can be very cumbersome in the middle of combat. I'll see exactly how it performs during the next session and report back.
December 24 (9 years ago)
chris b.
Pro
Sheet Author
API Scripter
We have mostly been testing in Chrome, since in my and my player's experience, most of Roll20 doesn't work well in other browsers besides Chrome.

We can start doing some testing in other browsers .
Here is a link to the latest versions
https://app.roll20.net/forum/post/1915585/pf-pathf...
December 26 (9 years ago)
chris b.
Pro
Sheet Author
API Scripter
When I test in FireFox I have to hit Enter not just tab or click out of a field, to get the EventHandler to fire.I am not sure why that is, but it is beyond our control, since SheetWorker javascript does not interact with the sheet directly, only changes to values after they are registered by the roll20 javascript.  At least for numbers.

But the recalc button seems to be working.

I will setup a demo with only one or two fields and then see if it behaves the same way.
December 26 (9 years ago)
chris b.
Pro
Sheet Author
API Scripter
i had a small basic sheet with some javascript that only copies values from one field to another, and they seem to be firing on tabs or clicks, so i'm not sure why the pathfinder sheet is not. It could be the css, we'll keep looking.
December 27 (9 years ago)
One small thing to possibly try is to whitelist roll20.net in your adblocker. I noticed a lot of errors in my javascript console on Chrome(such as 'blocked by client') and whitelisted it. Macros appear to be working fine now.
December 27 (9 years ago)
vÍnce
Pro
Sheet Author
Interesting...