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

Group rolling a macro

June 22 (8 years ago)
Dougansf
Pro
Sheet Author
I'm wondering if there is a way to have multiple characters make the same macro at once.  

I'm running Earthdawn, which uses the Step system, the dice you roll are always changing.  So each character will be rolling different dice depending on many factors.  I've set up a token macro for each character to roll their initiative quickly.  Would it be possible to set up a way to roll this macro for multiple targets at once?

I've taken a little look at Group Initiative and Group Check, but I'm not seeing how they could do it.
June 22 (8 years ago)

Edited June 22 (8 years ago)
Jakob
Sheet Author
API Scripter
Can the number and type of dice every character rolls be expressed as a formula in the character's attributes (+maybe a global modifier)?
If it can, then GroupCheck can do it.

EDIT: Sorry, after rereading your question: Specifically for Initiative, GroupCheck can not roll it and add things to tracker, and you will have to resort to GroupInitiative instead, which may not be able to do what you want. (It can just roll initiative for multiple tokens, but that by itself is not very useful.)

Although I'm now imagining an addon script to GroupCheck similar to ApplyDamage, which can add tokens to the tracker with an extra click ... hmm.
June 22 (8 years ago)
Dougansf
Pro
Sheet Author
Glad I could inspire something.  :)

Here's the macro I currently use to make Initiative work.  It's using Power Cards for formatting and your ChatSetAttr to track expendables.

The Step is determined by adding up a number of attributes (Dex+Mods-ArmorPenalty-Wounds... some of which can change mid-combat).
The Result is then determined by rolling the dice assigned to that Step.

While I have a button for this on my character sheet, I also have this as an Ability (as a token macro) on all my characters, to make things faster when GMing multiple creatures.

!power {{--format|grey
--titlefont|arial
--titlefontsize|16px
--bodyfontsize|12px
--charid|@{character_id}
--name|**@{Name} Initiative**
--Step|[[ ?{Step|@{DexStep}+@{DexMod}+@{InitMod}-@{ArmorMod}-@{Wounds}} ]] + [[ ?{Karma #|0} ]] Karma, [[ ?{Strain #|0} ]] Strain
--Result|**[[ [TRKR] [[{1e3, 8}<[[{?{Step} - 11, 0}kh1 % 11]] + floor([[{?{Step} - 11, 0}kh1]] / 11)]]d20! + [[{2, 4, 5, 6, 7}=[[{?{Step}, 0}kh1 % 11]] + {1, 3}=[[{?{Step}, 0}kh1]] + {1e3, 3}=[[{?{Step} - 11, 0}kh1 % 11]] * 2]]d[[{{(?{Step} - 1) * 2, 4}kh1, {12} }kl1]]! + [[{1e3, 8}<[[{?{Step}, 0}kh1]] * (1 - {3, 6, 10}=[[{?{Step}, 0}kh1 % 11]] + {1, 4, 8}=[[{?{Step}, 0}kh1 % 11]])]]d[[10 - {4, 5, 8, 9}=[[{?{Step}, 0}kh1 % 11]] * 4]]! + [[{1e3, 8}<[[{?{Step}, 0}kh1]] * ({0, 5, 7, 9}=[[{?{Step}, 1}kh1 % 11]] + 2 * {6, 10}=[[{?{Step}, 0}kh1 % 11]])]]d8! - [[{1, 2}=[[{?{Step}, 0}kh1]] * (3 - [[{?{Step}, 0}kh1]])]] + [?{Karma #|0} Karma] [[?{Karma #} * ({1e3, 8}<[[{@{KarmaStep} - 11, 0}kh1 % 11]] + floor([[{@{KarmaStep} - 11, 0}kh1]] / 11))]]d20! + [[?{Karma #} * ({2, 4, 5, 6, 7}=[[{@{KarmaStep}, 0}kh1 % 11]] + {1, 3}=[[{@{KarmaStep}, 0}kh1]] + {1e3, 3}=[[{@{KarmaStep} - 11, 0}kh1 % 11]] * 2)]]d[[{{(@{KarmaStep} - 1) * 2, 4}kh1, {12} }kl1]]! + [[?{Karma #} * ({1e3, 8}<[[{@{KarmaStep}, 0}kh1]] * (1 - {3, 6, 10}=[[{@{KarmaStep}, 0}kh1 % 11]] + {1, 4, 8}=[[{@{KarmaStep}, 0}kh1 % 11]]))]]d[[10 - {4, 5, 8, 9}=[[{@{KarmaStep}, 0}kh1 % 11]] * 4]]! + [[?{Karma #} * ({1e3, 8}<[[{@{KarmaStep}, 0}kh1]] * ({0, 5, 7, 9}=[[{@{KarmaStep}, 1}kh1 % 11]] + 2 * {6, 10}=[[{@{KarmaStep}, 0}kh1 % 11]]))]]d8! - [[?{Karma #} * ({1, 2}=[[{@{KarmaStep}, 0}kh1]] * (3 - [[{@{KarmaStep}, 0}kh1]]))]] ]]**
}}
!modattr {{
--silent
--charid @{character_id}
--Karma|-?{Karma #}
--Uncon|?{Strain #}
}}
June 22 (8 years ago)
The Aaron
Pro
API Scripter
For the initiative side, if you can express the formula without any Roll Queries, you can put it in an attribute and set that in one of the attribute rules for GroupInitiative and it will roll it with each character as the context for the attributes.
June 22 (8 years ago)
Dougansf
Pro
Sheet Author
Thanks Aaron, I think I've got it now.

I changed my macro to this, to remove the queries, but keep the important attributes that change in combat.

[[ [[{1e3, 8}<[[{(@{DexStep}+@{DexMod}+@{InitMod}-@{ArmorMod}-@{Wounds}) - 11, 0}kh1 % 11]] + floor([[{(@{DexStep}+@{DexMod}+@{InitMod}-@{ArmorMod}-@{Wounds}) - 11, 0}kh1]] / 11)]]d20! + [[{2, 4, 5, 6, 7}=[[{(@{DexStep}+@{DexMod}+@{InitMod}-@{ArmorMod}-@{Wounds}), 0}kh1 % 11]] + {1, 3}=[[{(@{DexStep}+@{DexMod}+@{InitMod}-@{ArmorMod}-@{Wounds}), 0}kh1]] + {1e3, 3}=[[{(@{DexStep}+@{DexMod}+@{InitMod}-@{ArmorMod}-@{Wounds}) - 11, 0}kh1 % 11]] * 2]]d[[{{((@{DexStep}+@{DexMod}+@{InitMod}-@{ArmorMod}-@{Wounds}) - 1) * 2, 4}kh1, {12} }kl1]]! + [[{1e3, 8}<[[{(@{DexStep}+@{DexMod}+@{InitMod}-@{ArmorMod}-@{Wounds}), 0}kh1]] * (1 - {3, 6, 10}=[[{(@{DexStep}+@{DexMod}+@{InitMod}-@{ArmorMod}-@{Wounds}), 0}kh1 % 11]] + {1, 4, 8}=[[{(@{DexStep}+@{DexMod}+@{InitMod}-@{ArmorMod}-@{Wounds}), 0}kh1 % 11]])]]d[[10 - {4, 5, 8, 9}=[[{(@{DexStep}+@{DexMod}+@{InitMod}-@{ArmorMod}-@{Wounds}), 0}kh1 % 11]] * 4]]! + [[{1e3, 8}<[[{(@{DexStep}+@{DexMod}+@{InitMod}-@{ArmorMod}-@{Wounds}), 0}kh1]] * ({0, 5, 7, 9}=[[{(@{DexStep}+@{DexMod}+@{InitMod}-@{ArmorMod}-@{Wounds}), 1}kh1 % 11]] + 2 * {6, 10}=[[{(@{DexStep}+@{DexMod}+@{InitMod}-@{ArmorMod}-@{Wounds}), 0}kh1 % 11]])]]d8! - [[{1, 2}=[[{(@{DexStep}+@{DexMod}+@{InitMod}-@{ArmorMod}-@{Wounds}), 0}kh1]] * (3 - [[{(@{DexStep}+@{DexMod}+@{InitMod}-@{ArmorMod}-@{Wounds}), 0}kh1]])]] ]]

I set this up as an Ability on each of the characters.  Then set the Group Initiative API Attribute to that Ability.  Did a few test rolls, and it seems to work great.

Is there a way to show the individual dice results?  Usually I can mouse-over and see the individual dice.  Right now it's showing the roll result plus a bonus (in this case "dice total + 0")
June 22 (8 years ago)
The Aaron
Pro
API Scripter
hmm.. It needs to be in an Attribute, not an Ability.  Once it's there, you should get the base die rolled before the + and the sum of the formula after it.
June 22 (8 years ago)
Dougansf
Pro
Sheet Author
Ah, I see.  It looks like it was actually rolling 1d20 + 0 for initiatives.  Not using this formula.

So putting this formula into an Attribute (current) slot, and then choosing that Attribute as the Dice Count Attribute doesn't seem to work.  No results at all.
June 22 (8 years ago)
The Aaron
Pro
API Scripter
You'd need to change the stat groups in GroupInitiative to use that attribute, not the Dice Count Attribute.  Something like:
!group-init --del-group 1
!group-init --add-group --bare SomeAttribute

June 22 (8 years ago)
Dougansf
Pro
Sheet Author
I'm afraid that didn't work either.  It seems that made it "1d20+Attribute" which kept crashing the API with the formula.

The formula is supposed to take a Step number, and reference that against a chart of possible dice combinations to roll and total (the dice also explode).
For example: Step 4 = 1d6, Step 5 = 1d8, Step 14 = 2d12
June 22 (8 years ago)
The Aaron
Pro
API Scripter
If you want to send me an invite to your game and GM me, I can see if I can get it working for you.