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

GroupCheck w/ It's a Trap 5e

Hi, I was wondering how i could combine groupcheck/applydamage and it's a trap in one go, mainly to apply damage and/or add status conditions to tokens based on save against the trap. I have the api command filled by my macro for groupcheck/applydamage, but the issue i run into is having the trap selected when I activate it and therefore not being able to select the tokens for the groupcheck Macro: !group-check {{ --Dexterity Save --ro roll1 --process --subheader vs DC 15 --button ApplyDamage !apply-damage ~dmg $[[0]] ~type half ~DC 15 ~saves RESULTS(,) ~ids IDS(,) ~status Prone }}
1625584912
timmaugh
Forum Champion
API Scripter
Look at SelectManager and possibly Muler . These are meta-scripts, so they will handle some pre-processing before your macro command reaches GroupCheck. SM has a {& select...} syntax that lets you virtually select tokens. You could have the list pre-populated with the tokens to be included for GroupCheck. Since meta-scripts handle work *after* the Roll20 parsers but before normal scripts, they can do things like respond to roll queries... so if you wanted to use the same macro for different groups, you could offer a roll query that would resolve to the list of tokens to use for this particular call. But commas and roll queries don't play nicely, so we could use Muler to store a list of variables that represent the various groups you might want to affect: Party=Bob the Bling, Black Jitter, Sally Sparklepants CaveNPCs=Udar Understench, Holser Howlsabout, -M1234567890abcdef TownNPCs=Mayor Trestonwiggit, Lord Barnlabberty Then use that in our {& select...} statement: {& select get.?{Group|Party,Party|CaveNPCs,CaveNPCs|TownNPCs,TownNPCs}/get } {& mule GroupPicker} ...where "GroupPicker" was the name of the mule ability storing that data. By the time GroupCheck sees the message, this list has turned into a set of virtually selected tokens, and the text of the meta-structures has been removed from the command line.