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

[Script] groupCheck - Roll checks, saves, et cetera for many tokens at once

Jakob: yes. Current macro: !group-check {{ --hideformula --status red --public --?{Which Save Stat|Strength,Strength Save|Dexterity,Dexterity Save|Constitution,Constitution Save|Intelligence,Intelligence Save|Wisdom,Wisdom Save|Charisma,Charisma Save} --process --subheader vs DC ?{DC} --button ApplyDamage !apply-damage ~dmg [[?{Damage}]] ~type ?{Damage on Save|Half,half|None,none} ~DC ?{DC} ~saves RESULTS(,) ~ids IDS(,) }}
1489323418

Edited 1489323432
Jakob
Sheet Author
API Scripter
Arno said: Jakob: yes. Current macro: !group-check {{ --hideformula --status red --public --?{Which Save Stat|Strength,Strength Save|Dexterity,Dexterity Save|Constitution,Constitution Save|Intelligence,Intelligence Save|Wisdom,Wisdom Save|Charisma,Charisma Save} --process --subheader vs DC ?{DC} --button ApplyDamage !apply-damage ~dmg [[?{Damage}]] ~type ?{Damage on Save|Half,half|None,none} ~DC ?{DC} ~saves RESULTS(,) ~ids IDS(,) }} You mean no :). It should instead be: !group-check {{ --hideformula --public --?{Which Save Stat|Strength,Strength Save|Dexterity,Dexterity Save|Constitution,Constitution Save|Intelligence,Intelligence Save|Wisdom,Wisdom Save|Charisma,Charisma Save} --process --subheader vs DC ?{DC} --button ApplyDamage !apply-damage ~dmg [[?{Damage}]] ~type ?{Damage on Save|Half,half|None,none} ~DC ?{DC} ~saves RESULTS(,) ~ids IDS(,) ~status red }} --status is an option for ApplyDamage, not for GroupCheck, so it belongs with the ApplyDamage options.
Ah great thanks, this is why I always try to provide as much info as possible, easy to have misunderstandings ! I am very new to roll20, thanks for your patience :)
1489324512

Edited 1489324653
Jakob
Sheet Author
API Scripter
Arno said: Ah great thanks, this is why I always try to provide as much info as possible, easy to have misunderstandings ! I am very new to roll20, thanks for your patience :) No problem, thanks for providing detailed info ... I'm happy to help, as long as I get useful debugging information. I also figured out (at least one reason) why HealthColors does not work - the one-click version is too old to support the exposed function I am using to tell it about the updated health bar. You'll have to use the current Github version of HealthColors instead, that one should work. EDIT: By the way, you can set --hideformula and --process as global options so you don't have to bake it into every macro!
1489326262

Edited 1489326486
Googling I actually end up here: <a href="https://app.roll20.net/forum/post/2139713/script-a" rel="nofollow">https://app.roll20.net/forum/post/2139713/script-a</a>... Sneaky as that shows 1.2.0, but that's outdated then, I found 1.3.2 now, will test it. I know of the global options, but only using 1 macro right now, so not really any need to set them yet :)
Updated report: - Animations from HealthColors work! - Red cross from HealthColors works! - I am using "--status red" but red status is not appearing on failed saves. Woops, my bad, works!
1489327187
Jakob
Sheet Author
API Scripter
Arno said: Updated report: - Animations from HealthColors work! - Red cross from HealthColors works! - I am using "--status red" but red status is not appearing on failed saves. Woops, my bad, works! :)
Amazing script, getting lots of use out of it. Just wondering as an extension of apply status markers to failed saves, is there a way to incorporate the status effects of Trackerjacker to apply on a failed save? So on a failed save instead of applying ~status red, it applies !tj -apply status.&nbsp;
1489338298
Jakob
Sheet Author
API Scripter
Tom said: Amazing script, getting lots of use out of it. Just wondering as an extension of apply status markers to failed saves, is there a way to incorporate the status effects of Trackerjacker to apply on a failed save? So on a failed save instead of applying ~status red, it applies !tj -apply status.&nbsp; Not without modifying TrackerJacker. It seems to be set up in such a way that it always acts on selected tokens, but the API will never have anything selected.
1489371011

Edited 1489371713
Jakob said: I also added a global variable at the beginning of the script that you can set to true to cap health from below at zero.&nbsp; You da man Jakob!! Great addition! &nbsp;: ) Arno said: Updated report: - Animations from HealthColors work! - Red cross from HealthColors works! - I am using "--status red" but red status is not appearing on failed saves. Woops, my bad, works! Verifying this. + 1
Small request (maybe, it could be huge for all I know) could you add a "cap at max" option for apply damage as well? I end up using that script to heal everything on the page when I'm doing test encounters and the like and being able to heal them all to max with a value of say '-4999' would be easy to get a battle up and running again if they only healed up to their max hp value.
1489396969

Edited 1489397033
Jakob
Sheet Author
API Scripter
eastwood said: Small request (maybe, it could be huge for all I know) could you add a "cap at max" option for apply damage as well? I end up using that script to heal everything on the page when I'm doing test encounters and the like and being able to heal them all to max with a value of say '-4999' would be easy to get a battle up and running again if they only healed up to their max hp value. It's not hard to add, but you can just use TokenMod for resetting bars to max... it seems you're reaaaaally not using this for its intended purpose at that point :) (but I'll still add it, for mass healing if nothing else).
Jakob said: It's not hard to add, but you can just use TokenMod for resetting bars to max... it seems you're reaaaaally not using this for its intended purpose at that point :) (but I'll still add it, for mass healing if nothing else). Ah, I haven't use tokenMod for anything yet, I'll check into that, thanks! And yeah, I use this script in game for it's intended purpose xD &nbsp;(It's really a big time saver!)
1489518891
Jakob
Sheet Author
API Scripter
Anyway, ApplyDamage now has a global variable "boundedBars". If set to true, a lower bound of 0 and a higher bound of the bar's maximum is observed.
Neat! ApplyDamage looks like just what the doctor ordered. I am looking forward to my players torching NPCs with increasing GM efficiency :)
Where o' where is ApplyDamage?
1489676466
Jakob
Sheet Author
API Scripter
Jerry F. said: Where o' where is ApplyDamage? It's in this thread, just look back on page 2.
ok, ok, great. It's a very special tool I loves it.
Hey Jakob, I am testing this with the Shaped sheet for the first time. I am testing on a Wight pulled from the MM and also tested on a PC. I have done "!group-check-config --import 5E-Shaped". !group-check --Strength Save results in: "Error: Unable to find attribute named strength_saving_throw_mod for character Wight(-Kg2lGizD3M-_M7k7rAR) in chat command."
1490428495
Jakob
Sheet Author
API Scripter
Arno said: Hey Jakob, I am testing this with the Shaped sheet for the first time. I am testing on a Wight pulled from the MM and also tested on a PC. I have done "!group-check-config --import 5E-Shaped". !group-check --Strength Save results in: "Error: Unable to find attribute named strength_saving_throw_mod for character Wight(-Kg2lGizD3M-_M7k7rAR) in chat command." You're right, something changed recently that messes up the formulae again. Good that you noticed this before my next session... . Anyway, it was relatively easy to update the data for the newest sheet version. 1.3 Updated 5E-Shaped data set.
@Jakob while you're at it maybe you can add support for sheet detection&nbsp;<a href="https://app.roll20.net/forum/post/4714294/character-sheet-detection-for-the-api" rel="nofollow">https://app.roll20.net/forum/post/4714294/character-sheet-detection-for-the-api</a> to automatically apply !group-check-config --import 5E-Shaped when shaped sheet is detected?
1490429658
Jakob
Sheet Author
API Scripter
Roman said: @Jakob while you're at it maybe you can add support for sheet detection&nbsp; <a href="https://app.roll20.net/forum/post/4714294/character-sheet-detection-for-the-api" rel="nofollow">https://app.roll20.net/forum/post/4714294/character-sheet-detection-for-the-api</a> to automatically apply !group-check-config --import 5E-Shaped when shaped sheet is detected? When Aaron finishes his CharacterSheetDetection script, sure. Before that, I don't really feel like spending the effort to write my own character sheet detector to save 1 line that has to be entered only once per campaign.
Ok, sure. I missed the fact that there's no actual script yet. Sorry.
1490430672
Jakob
Sheet Author
API Scripter
Roman said: Ok, sure. I missed the fact that there's no actual script yet. Sorry. Don't worry, that fact was kind of buried under the enthusiasm :).
Jakob said: Arno said: Hey Jakob, I am testing this with the Shaped sheet for the first time. I am testing on a Wight pulled from the MM and also tested on a PC. I have done "!group-check-config --import 5E-Shaped". !group-check --Strength Save results in: "Error: Unable to find attribute named strength_saving_throw_mod for character Wight(-Kg2lGizD3M-_M7k7rAR) in chat command." You're right, something changed recently that messes up the formulae again. Good that you noticed this before my next session... . Anyway, it was relatively easy to update the data for the newest sheet version. 1.3 Updated 5E-Shaped data set. Works great, thanks for the quick fix!
You're right, something changed recently that messes up the formulae again. Good that you noticed this before my next session... . Anyway, it was relatively easy to update the data for the newest sheet version. 1.3 Updated 5E-Shaped data set. I think you missed a bit: "Error: No attribute or sheet field found for character_id -Kg4FhRpLO6qVSOBhtMv named roll_setting" --ro rollsetting, does indeed not work right now.
1490686447
Jakob
Sheet Author
API Scripter
Arno said: You're right, something changed recently that messes up the formulae again. Good that you noticed this before my next session... . Anyway, it was relatively easy to update the data for the newest sheet version. 1.3 Updated 5E-Shaped data set. I think you missed a bit: "Error: No attribute or sheet field found for character_id -Kg4FhRpLO6qVSOBhtMv named roll_setting" --ro rollsetting, does indeed not work right now. Should be fixed. I actually did this two days ago, but forgot to post about it. N.B. I'll not be pushing GroupCheck 1.3. to one-click until Shaped v11 is live as well, because I think &nbsp;the newest version of the formulae only work with v11.
Kind of a weird bug. If you disable chat avatars, the group check result extends off the screen as shown here:
Yeah, that's an issue with using the API. We don't have access to whether or not the chat avatars css/html class is active or not. It just depends on the negative margin being set.
1490981843

Edited 1490981911
So running Shaped Sheet 11.3 with Shaped Companion 8.4.2 and GroupCheck 1.3. &nbsp;I have executed the 5e-Shaped import. &nbsp;Generally the script is not crashing, but what is confusing to me is the results. &nbsp;It looks like the formula may have change... or the way you need to access it. It is spitting out errors: &nbsp; "Error: Unable to find attribute named strength_save_prof for character Efreeti(-Kdm6H6nK4E7shYSPRpg) in chat command." "Error: Unable to find attribute named strength_save_bonus for character Efreeti(-Kdm6H6nK4E7shYSPRpg) in chat command." And looking at the actual roll that is happening it looks like the correct formula for the sheet and it's settings is stored in an attribute called "@{Efreeti|strength_saving_throw_formula}" where Efreeti is obviously the monster and strength is obviously the saving throw.
1491002495
Jakob
Sheet Author
API Scripter
Kevin said: So running Shaped Sheet 11.3 with Shaped Companion 8.4.2 and GroupCheck 1.3. &nbsp;I have executed the 5e-Shaped import. &nbsp;Generally the script is not crashing, but what is confusing to me is the results. &nbsp;It looks like the formula may have change... or the way you need to access it. It is spitting out errors: &nbsp; "Error: Unable to find attribute named strength_save_prof for character Efreeti(-Kdm6H6nK4E7shYSPRpg) in chat command." "Error: Unable to find attribute named strength_save_bonus for character Efreeti(-Kdm6H6nK4E7shYSPRpg) in chat command." And looking at the actual roll that is happening it looks like the correct formula for the sheet and it's settings is stored in an attribute called "@{Efreeti|strength_saving_throw_formula}" where Efreeti is obviously the monster and strength is obviously the saving throw. #KryxHasChangedTheFormulaAgain :P. I'll update it once more.
1491002626
Jakob
Sheet Author
API Scripter
Kevin said: Kind of a weird bug. If you disable chat avatars, the group check result extends off the screen as shown here: Yeah. I can tell you how you can hack the script to remove the negative margin and make it work with avatars off, if you want (it's one-liner)?
Jakob said: Yeah. I can tell you how you can hack the script to remove the negative margin and make it work with avatars off, if you want (it's one-liner)? No worries, just something I noticed, having them on or off doesn't matter to me at this point.
1491044117
Jakob
Sheet Author
API Scripter
1.3.1 Fixed 5E-Shaped data for newest sheets again.
1491831013

Edited 1491833572
So if you use the die_adv or die_dis roll options, should the tooltip show the kh1 or kl1 syntax? &nbsp;The reason I ask is that after configuration I have tried to use the following and didn't see the 2d20kh1 in the tooltip: !group-check --die_adv --Strength Save Edit: &nbsp;If it matters, I am currently testing with the 5E-OGL config.
1491834191
Jakob
Sheet Author
API Scripter
Kevin said: So if you use the die_adv or die_dis roll options, should the tooltip show the kh1 or kl1 syntax? &nbsp;The reason I ask is that after configuration I have tried to use the following and didn't see the 2d20kh1 in the tooltip: !group-check --die_adv --Strength Save Edit: &nbsp;If it matters, I am currently testing with the 5E-OGL config. No, sorry for the confusion. die_adv is for&nbsp; changing&nbsp;the die used when advantage is specified . So you could use "--die_adv 3d20kh1" if you wanted advantage to be "roll 3d20, keep highest". Rolling with advantage/disadvantage (which is what you're actually looking for, if I understand correctly) can be done via "--ro adv" or "--ro dis" (I have not actually tested with the OGL sheet, but it should work).
Thank you, I figured I was doing something wrong there, but couldn't grok it from the directions (it was probably covered earlier in the thread, but I missed it).
1492120687

Edited 1492120763
Jakob said: Arno said: Jakob: yes. Current macro: !group-check {{ --hideformula --status red --public --?{Which Save Stat|Strength,Strength Save|Dexterity,Dexterity Save|Constitution,Constitution Save|Intelligence,Intelligence Save|Wisdom,Wisdom Save|Charisma,Charisma Save} --process --subheader vs DC ?{DC} --button ApplyDamage !apply-damage ~dmg [[?{Damage}]] ~type ?{Damage on Save|Half,half|None,none} ~DC ?{DC} ~saves RESULTS(,) ~ids IDS(,) }} You mean no :). It should instead be: !group-check {{ --hideformula --public --?{Which Save Stat|Strength,Strength Save|Dexterity,Dexterity Save|Constitution,Constitution Save|Intelligence,Intelligence Save|Wisdom,Wisdom Save|Charisma,Charisma Save} --process --subheader vs DC ?{DC} --button ApplyDamage !apply-damage ~dmg [[?{Damage}]] ~type ?{Damage on Save|Half,half|None,none} ~DC ?{DC} ~saves RESULTS(,) ~ids IDS(,) ~status red }} --status is an option for ApplyDamage, not for GroupCheck, so it belongs with the ApplyDamage options. Does anyone have a similar option available for Shaped Sheet?&nbsp; A macro that is or is it suppose to work with Shaped?&nbsp; Cause nothing happening for me.
I use the following on shaped sheet !group-check {{ --?{Ability Save|Strength,Strength Save|Dexterity,Dexterity Save|Constitution,Constitution Save|Intelligence,Intelligence Save|Wisdom,Wisdom Save|Charisma,Charisma Save} --process --subheader vs DC ?{DC} --button ApplyDamage !apply-damage ~dmg [[?{Damage}]] ~type ?{Damage on Save|Half,half|None,none} ~DC ?{DC} ~saves RESULTS(,) ~ids IDS(,) --status red }}
Sounds like maybe you haven't imported the data set? Or is that now automatic
Gary W. said: Sounds like maybe you haven't imported the data set? Or is that now automatic Nope sounds like thats what I did not do. &nbsp;Have to go back and try it again.
1492368341

Edited 1492371251
Where do I find the applydamage API, it doesn't appear to be any where obvious. &nbsp;NM - Page back I think.
So I have experienced some really strange behavior with the --process options tool tips. &nbsp;While it doesn't seem to impact the actual results of the roll (therefore is a very low priority issue), it did make the tool tip confusing. &nbsp;This is using latest version of the script (1.3.1) and the Shaped-Sheet 11.5. Here is the macro: !group-check {{ --whisper --ro roll1 --process --?{Ability Save|Strength,Strength Save|Dexterity,Dexterity Save|Constitution,Constitution Save|Intelligence,Intelligence Save|Wisdom,Wisdom Save|Charisma,Charisma Save} }} I used --process option with the intention that I would use ApplyDamage, but I noticed this unusual behavior. &nbsp;I placed 3 monsters and rolled a Dexterity Save using the above macro and got essentially 2 different results (1 and 1a below are basically the same problem). Result 1 - Varix: &nbsp;The result of 11 is correct as Varix rolled an 8 and has a +3 dex bonus and is not proficient, however notice the tooltip has a 03 instead of a 0*3. Result 1a - Ancient Blue Dragon: &nbsp;The result of 25 is correct, but again the tooltip is quite odd looking, notice the 17 below where it looks like it should be a "1*7" : Result 2 - Adult Blue Dragon: &nbsp;I would have thought this to be a consistent problem, however on the 3rd mob, the tooltip appear entirely correct. So while all of the actual results of the checks are correct (which is awesome), the strangeness from the tooltip definitely made for a double-take when looking at the results. &nbsp;Again, definitely not a major issue, just figured I would report it. &nbsp;Also, to note this only happens with --process, I was unable to reproduce this with the --direct option.
1493059711

Edited 1493059793
Jakob
Sheet Author
API Scripter
Interesting observation, Kevin! I think &nbsp;that the strange behaviour is the result of Markdown applied to the text in the tooltips: *text* will appear as text . For the --process tooltips, I actually construct the tooltip myself from the roll data, so it's understandable that this would not happen with --direct, where the rolls are simply normal inline rolls (that's also why I can control the appearance for --process). Anyway, I can try to escape the stars in the tooltips so it does not happen.
1493108429

Edited 1493108461
Jakob
Sheet Author
API Scripter
Okay, fixed it. It was a one-line solution, luckily. 1.3.2 Fixed issue with asterisks in tooltips (thanks Kevin!).
5e OGL trying to add passive perception for my sheet. !group-check-config --add { "Passive Perception" : { "name" : "Passive Perception", "formula" : "[[@{passive_wisdom}]]" } }
1493190389
Jakob
Sheet Author
API Scripter
Craven . said: 5e OGL trying to add passive perception for my sheet. !group-check-config --add { "Passive Perception" : { "name" : "Passive Perception", "formula" : "[[@{passive_wisdom}]]" } } I guess you are looking for help, even if you didn't say it? Anyway, the following should work: !group-check-config --add { "Passive Perception" : { "name" : "Passive Perception", "formula" : "[[%passive_wisdom%]]" } } If Roll20 complains, use \[%passive_wisdom%\] instead.
Jakob said: Craven . said: 5e OGL trying to add passive perception for my sheet. !group-check-config --add { "Passive Perception" : { "name" : "Passive Perception", "formula" : "[[@{passive_wisdom}]]" } } I guess you are looking for help, even if you didn't say it? Anyway, the following should work: !group-check-config --add { "Passive Perception" : { "name" : "Passive Perception", "formula" : "[[%passive_wisdom%]]" } } If Roll20 complains, use \[%passive_wisdom%\] instead. TY it did complain so i had to use \[%passive_wisdom%\]
Jakob said: Okay, fixed it. It was a one-line solution, luckily. 1.3.2 Fixed issue with asterisks in tooltips (thanks Kevin!). Thanks, looks perfect now! &nbsp;I just want to say thanks for this script, such a simple concept, well executed, that really helps to speed up play!
1494167826

Edited 1494167864
Just an FYI... the 12.x Shaped-Sheet has changed the formulas again. &nbsp;The global bonuses have been removed and replaced by "modifiers". &nbsp;"modifiers" don't seem applicable to NPC's (at least so far), but if anyone uses them for PC's the modifiers wouldn't take effect. &nbsp;&nbsp;