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

create a macro that recalc the sheet on pathfinder

hello there I'm using CharSetAtrr to modify my stats during the game (like when my character comes in barbarian rage) but after my strenght has been modified, I can see that my strenght mod and everything that depends on the strenght is not modified, all  ihave to do is go to my sheet and clic on "recalcul". Does a macro command exists to do that ?  so I can insert it in my rage macro to save time thank you
1592708984

Edited 1592709286
vÍnce
Pro
Sheet Author
Hi Lapin, the Str-based damage on attacks not updating when toggled via an API script is a bug.  I have it documented, but just haven't had a chance to look into fixing it.  (it's on the short list...) If you are using chatsetattr to toggle a rage buff, you should be able to do something like; !setattr --sel --repeating_buff2_-m831agv1mrdvupgacdl_enable_toggle|[[1-@{selected|repeating_buff2_-m831agv1mrdvupgacdl_enable_toggle}]] !setattr --sel --recalc1|[[1-recalc1]] You'll need to change the buff rowID to match your sheet/buff of course.
Hi, Thanks for your answer... I try that
ok, I guess I do something wrong... if I understand what I have to do (sorry, english is not my first language) is to copy the text you put and replace --repeating_buff2 by --repeating_buff_rage (because my buff's name is "rage") that's right ? but I receive this message : " Repeating row id -rage invalid for character Phindraza Osleare and repeating section repeating_buff."
1594273447
vÍnce
Pro
Sheet Author
The name of the buff doesn't actually matter.  You have to use the rowID for your particular buff. Also, when you hover over the fields for your buff, do the attribute names begin with " repeating_buff_... " or " repeating_buff2_... " ?
  ok, so, I don't find the row id you are talking about, maybe you are using another character sheet ? and about the attribute name, each buff I created has the same name : @{repeating_buff_$id_toggle}  is there another way to found this row id ? thank you for being so patient with me :)
1594297639

Edited 1594297999
vÍnce
Pro
Sheet Author
Sorry the info I gave was for the PF Community Sheet. ;-( The concept should work the same, but you'll need to change up the macro to match the attribute used for buffs on the official sheet and you'll still need to learn the rowID as well.  You can probably use the browser's inspect element feature(right-click context menu) to look at the html code of the buff's input field.    You can also ignore the recalc line of the macro.  That line is only needed as a workaround for a bug on the community sheet. example for official sheet !setattr --sel --repeating_buff_-LoJT3kHLFTR5X8ZImIC_toggle|[[1-@{selected|repeating_buff_-LoJT3kHLFTR5X8ZImIC_toggle}]] using right-click inspect element on sheet's buff to learn the rowID;
ok, it took time but I found the row id (sorry I don't spend much time now on the game) now I just have to found the right manner to put it....  The line I'he found is : <div class="repitem" data-reprowid=" -LduAUvCihIWDL4Brsx- ">....... I erased all the useless stuff... placeholder="+4 to Shield" title="@{ repeating_buff_$id_mods }"></textarea> </div> </div> </div> </div> </div> So, if I'm right I've to insert :  !setattr --sel --repeating_buff_-LduAUvCihIWDL4Brsx-_enable_toggle|[[1-@{selected|repeating_buff_-LduAUvCihIWDL4Brsx-_enable_toggle}]] !setattr --sel --recalc1|[[1-recalc1]] but it seems I'm not right cause in Roll20 I got this :  Setting repeating_buff_-LduAUvCihIWDL4Brsx-_enable_toggle to 0 for character Phindraza Osleare. and the buff is not checked... I guess it has to be "1" in place of "0"
1594850216
vÍnce
Pro
Sheet Author
 No need for the extra command "!setattr --sel --recalc1|[[1-recalc1]]" since this is for the Official PF 1e sheet.  You only need this !setattr --sel --repeating_buff_-LduAUvCihIWDL4Brsx-_enable_toggle|[[1-@{selected|repeating_buff_-LduAUvCihIWDL4Brsx-_enable_toggle}]] It's a toggle which means it will change the state of the buff each time it is executed.  on|off. The "[[1-@{selected|repeating_buff_-LduAUvCihIWDL4Brsx-_enable_toggle}]]" portion of the macro handles whether the value is "0" or "1".
aaahhh excellent, that works.... thank you very much :D
1594854810
vÍnce
Pro
Sheet Author
+1