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

[Request] 5e (Player Character) Group Check script?

December 08 (6 years ago)

Edited December 08 (6 years ago)

Hi folks,

Just wondering if anyone has made a script that would allow the collection of player rolls to average against a certain DC? I have a vague sense of how this might be done in the API, but I don't want to smash my face against a wall trying to make it work if someone's already cracked that nut ;)

edit: I am aware of Kyle's awesome GroupCheck script, but it is more DM focused in my opinion and it would take away player-agency if I used it to roll these group checks.


For reference on Group Checks (from the 5e PHB):

Group Checks

When a number of individuals are trying to accomplish something as a group, the DM might ask for a group ability check. In such a situation, the characters who are Skilled at a particular task help cover those who aren’t.

To make a group ability check, everyone in the group makes the ability check. If at least half the group succeeds, the whole group succeeds. Otherwise, the group fails.

Group Checks don’t come up very often, and they’re most useful when all the characters succeed or fail as a group. For example, when adventurers are navigating a swamp, the DM might call for a group Wisdom (Survival) check to see if the characters can avoid the quicksand, sinkholes, and other natural hazards of The Environment. If at least half the group succeeds, the successful characters are able to guide their companions out of danger. Otherwise, the group stumbles into one of these hazards.

December 09 (6 years ago)

Edited December 09 (6 years ago)
Spren
Sheet Author

There is a group check script: https://app.roll20.net/forum/post/3631602/script-groupcheck-roll-checks-saves-et-cetera-for-many-tokens-at-once/?pagenum=1

I've never used it, but it looks like if you use the "--process" option, then you can add the "--showaverage" option.

Documentiation is here: https://github.com/roll20/roll20-api-scripts/blob/master/GroupCheck/1.8/README.md

December 09 (6 years ago)
keithcurtis
Forum Champion
Marketplace Creator
API Scripter

That script also has the indispensable "Apply Damage" companion. Great for fireballs.

December 09 (6 years ago)
Jakob
Sheet Author
API Scripter

Technically, you care about the median though when it comes the rules... The script does not have an option to calculate the median instead of the average.

December 10 (6 years ago)

Edited December 10 (6 years ago)
Spren
Sheet Author

Hmm you're right. I don't know why I've been doing them that way. Rereading the rule though I think what is actually needed is more akin to tallying up the successes and failures given a DC. So you have 10 goblins sneaking around and you roll a group check, you need at least 5 to succeed. What you'd want in that case is just a quick number of "__ successes, _ failures", then you just determine if the successes at least half of the number in the group. Sadly, I don't know of a script that does that Evan.

December 10 (6 years ago)
keithcurtis
Forum Champion
Marketplace Creator
API Scripter

Unless you have an extremely large group, it wouldn't be difficult to eyeball the results of a Group Check call.

December 10 (6 years ago)

Thanks for your input folks!

keith: it's not that it's too hard to do, but if we can offload stuff onto the platform why shouldn't we? :)

I didn't really explain myself super well, but my hope is that it would go something like this:

DM (me): OK guys! You are trying to stealth past the guards," *clicks the macro to start a Party Group Check (call to action command), enters a DC* "everyone roll stealth!"

Players start rolling stealth and the script gathers the rolls. After all the rolls are in, DM clicks a different macro button to end the call to action, and aggregate the results. The script outputs the values against the DC and determines whether the >50% threshold was met and outputs that info as well.

From an API perspective I see the script being something like:

Listener -- on(chat:message) - listening for the call to action API command, then listening for ANY rolls (maybe a future version locks into a certain skill check?), then listening for the close of results

Functions -- the functions would be something to parse the rolls and add them to an array, then some math to compare them to the DC and count the number of successes or failures, finally it would need one to output the results to the DM.

I'll try my hand at writing something over the next few weeks/months (I only have a basic understanding of Javascript and the Roll20 API), unless someone thinks it would be easy to bang out, in which case fill your boots :)