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 .
×

Is it Possible to compare a single roll against multiple target's individual attributes??

Hi, i'm pretty new to this and i need help with something, I'm trying to Learn on how to program AoE functionalities that use the same roll but modifies it different times for different targets, so far i have this Macro &{template:default} {{name=@{selected|token_name} Casts Ice Stream}}{{Range=Cone 2}} {{@{target|target1|token_name}=[[4df+@{selected|Magic}+(?{Spheremod|0})-?{Cover|0}-(@{target|target1|Endurance})-(@{target|target1|Scale})]]}} {{@{target|target2|token_name}=[[4df+@{selected|Magic}+(?{Spheremod|0})-?{Cover|0}-(@{target|target2|Endurance})-(@{target|target2|Scale})]]}} {{Frequency=EoT}} {{Effect=Damage from this attack is halved}} Which Yields what's below but my problem is that it makes two separate rolls and it only has two targets when a Cone 2 could easily have way mor epeople inside, so is there any way i can program this as a Query, ehrr target query?? that compares each of the different  targets's individual attributes against an Initial roll? like rolling 4df and then each target substracting their own respective values from the initial roll in separate instances??
1521405221
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
You might want to look into  Apply Damage , a companion to Groupcheck (which is on the One Click). I'm not sure if it will fit all your needs, but it might be a good starting point.
1521405710
Finderski
Pro
Sheet Author
Compendium Curator
keithcurtis said: You might want to look into  Apply Damage , a companion to Groupcheck (which is on the One Click). I'm not sure if it will fit all your needs, but it might be a good starting point. Just a quick note...that would be an API script, which would require a Pro subscriptions to use.
1521406028

Edited 1521406102
GiGs
Pro
Sheet Author
API Scripter
I'm pretty sure you wont be able to do this with a standard macro. There's no way to have a dynamically variable number of targets. You have to manually hardcode a different macro for each number of targets you need. There are API scripts that can do this, but you need a Pro subscription to use them. At the basic, free level, the macro language has a lot of shortcomings (but what it can do, it does pretty well). 
ohh ok, thanks for the quick responses, but if not with a variable number of targets can i at least setup the roll to be the same for different targets that i program manually? so for example in target 2 the 4df part would use the result of the roll for the first target?? 
1521407005
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Finderski said: keithcurtis said: You might want to look into  Apply Damage , a companion to Groupcheck (which is on the One Click). I'm not sure if it will fit all your needs, but it might be a good starting point. Just a quick note...that would be an API script, which would require a Pro subscriptions to use. Doop! I missed that.