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

Can macros iterate?

1584842516

Edited 1584842645
I'm very new to Roll20, as are my players - we're unable to meet in person since two of my players are ill - and I'm doing my best to stay a step ahead of said players so that I can help them as we learn the system. I have two token macros set up now, fairly simple initiative and perception (5ed) things that I found on these forums and modified to my needs, looking like this: /w GM @{selected|token_name} Initiative [[1d20 + @{selected|initiative_bonus} &{tracker}]] What I'd really like is for my macros to iterate across a group - which is to say I'd like to hit Perception and have it iterate across all the characters, and hit Initiative and have it iterate over all selected tokens (so I can do my NPCs too). I realise I could hard-code the perception bit, but it's a bit clunky since I don't know from session to session which players/characters will be present. Is any of this possible?
1584846257
GiGs
Pro
Sheet Author
API Scripter
It's not possible to do that without a pro level subscription. The selected method you already have is the best option available at the free level. It doesnt take too long to click each token and use it.
1584846627
The Aaron
Roll20 Production Team
API Scripter
Specifically, if you wanted to do this, you'd need the API Pro Subscriber Perk.  There are a few scripts that can support these capabilities, GroupCheck for the various rolls, GroupInitiative for the one click initiative roll.
So essentially what you're telling me is that these are API scripting things, not macro things?
1584857026
The Aaron
Roll20 Production Team
API Scripter
Correct. Macros and Character Abilities just simple text substitution commands, they have no image logic. To get dynamic functionality requires the API.
Gotcha, thanks.