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

Automatic initiative for a group of tokens

Hi there, I hope someone can help me here. I just started working with more complex macros and the one for initiative I used thus far goes like this: /em The @{selected|character_name} reacts to your presence /w gm @{selected|token_name} rolls [[1d20+@{selected|ini} &{tracker}]] for initiative. for closed rolls I skip the /em and don't open the turn tracker Now a neat way I use attacking macros is this: /em The Githyanki Corsair deftly stabs his silver longsword at you Target : @{target|Target1|character_name} Attack [[1d20+16]] vs AC [[@{target|Target1|AC}]] Damage [[2d8+4]] + [[1d6]] psychic damage What I find neat about it: It shows the relevant AC (or Ref, or what ever) for the target I'm attacking, without me having to always ask (Does a 23 on AC hit?) It can even work with area attacks and multiple targets, totally cool. Now I had thought I could combine the two, that would be really awesome, but I can't make it work. What I came up with was: /w gm @{target|Target1|token_name} rolls [[1d20+@{target|Target1|ini} &{tracker}]] for initiative. It works fine for rolling, but cannot send the value to the turn tracker [message: You wanted to send the result of this roll to the turn tracker, but no valid token was selected!] (note: if I select the token and then use the macro it works, but I wanted to skip the selecting part. And if I wouldn't mind selecting each token I wanted to add I'd be using a different macro: /em The @{selected|character_name} reacts to your presence /w gm @{selected|token_name} rolls [[1d20+@{selected|ini} &{tracker}]] for initiative. My plan was to have a macro where I could simply click on the macro, and then click on4-7 (or whatever) targets and their values for initiative would all be automatically rolled and send to the turn tracker. The rolling works fine, but the turn tracker seemingly only gets the value of selected tokens. So to my actual question: Does anybody either know a way around that, or already has a macro where that works?
1424036341
Gen Kitty
Forum Champion
What you want is here, read the WHOLE thread because the post topic is a bit misleading: <a href="https://app.roll20.net/forum/post/1066916/script-groupinitiative-roll-initiative-for-a-group-of-tokens-take-the-lowest-value-and-add-them-to-the-turn-order" rel="nofollow">https://app.roll20.net/forum/post/1066916/script-groupinitiative-roll-initiative-for-a-group-of-tokens-take-the-lowest-value-and-add-them-to-the-turn-order</a>
1424036509

Edited 1424036569
vÍnce
Pro
Sheet Author
I think you can only add one token to the tracker. With API(mentor) I would suggest using groupinitiative . EDIT: sniped...
1424037422
Gen Kitty
Forum Champion
*snicker* As soon as i saw the subject, I was grabbing my link for the script. Such a useful script!
1424051179
The Aaron
Pro
API Scripter
:) Note that the GroupInitiative script requires the API, a Mentor level feature. Vince is right, a macro can only add one token to the turn order, and it only works on the first selected token.