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

Seperate Strength rolls

Good day all, I have the following macro that requires that the selected token and the selected target each input their strengths values. It then divides that by 5 to get the number of dice to be rolled. Unfortunately it only accepts the first strength value added  and assumes that number for both rolls. Is there a way of inputting two seperate values?  &{template:default} {{name=**STR vs STR Roll**}} {{ @{selected|token_name} **STR Roll** [[((?{Strength|0}/5))d6sd]] **VS** @{target|token_name} **STR Roll** [[((?{Strength|0}/5))d6sd]]    *Count Body only.* }} Thanks for any help.
1694171134
Ziechael
Forum Champion
Sheet Author
API Scripter
Make sure you are referencing the target required in the second query too (identical queries will reuse initial values):  &{template:default} {{name=**STR vs STR Roll**}} {{ @{selected|token_name} **STR Roll** [[((?{Strength|0}/5))d6sd]] **VS** @{target|token_name} **STR Roll** [[((?{Target strength|0}/5))d6sd]]    *Count Body only.* }}
1694176402
timmaugh
Forum Champion
API Scripter
Also worth noting that you can access attributes directly from the tokens. If you are going to have one selected and target another, you can bypass the queries completely and just do: &{template:default} {{name=**STR vs STR Roll**}} {{ @{selected|token_name} **STR Roll** [[(@{selected|strength}/5)d6sd]] **VS** @{target|token_name} **STR Roll** [[(@{target|strength}/5)d6sd]]    *Count Body only.* }} However, seeing the "Count Body only" note, and the d6 base for the roll, I wonder if this is a Hero/Champions roll? If so, you can get even more streamlined with a rollable table. I created one called "BodyConversion" and added 3 items: 0 (weight: 1) 1 (weight: 4) 2 (weight: 1) Then you can roll against it and get Body totals easily: &{template:default} {{name=**STR vs STR Roll**}} {{@{selected|token_name}= [[(@{selected|strength}/5)t[BodyConversion]]] }} {{@{target|token_name}= [[(@{target|strength}/5)t[BodyConversion]]]  }}
Thanks for that. I will try both and see which one suits.
1694240320
GiGs
Pro
Sheet Author
API Scripter
timmaugh said: Then you can roll against it and get Body totals easily: Do you get stun totals as well?