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

PF Add-To-Roll Macro Queries

I've found that when I put Queries with the same Input (same Questions and Answers) that it only gets asked once, but it always supplies the value of the first querey. For example when I want to attack as a Paladin and want to add Smite to Attack Rolls, Damage Rolls, and the attack Description. Macro Use ?{Smite?|No,0|Yes,@{CHA-mod}]} Attack Roll ?{Smite?|No,0|Yes,@{class-0-level}} Damage Roll ?{Smite?| No, | Yes, Smite was Used} Description But if only outputs the value of the first query to every use of it. So the Attack Roll, Damage Roll, and the Description output the Charisma Mod. Is there a way to manipulate this so each iteration uses the same input (Smite/Yes/No) but outputs its individual values?
1524531221
vÍnce
Pro
Sheet Author
For the value based queries, try changing them to a boolean. Macro Use ?{Smite?|No,0|Yes,1}*@{CHA-mod} Attack Roll ?{Smite?|No,0|Yes,1}*@{class-0-level} Damage Roll
1524537206
James W.
Sheet Author
API Scripter
Tigrium said: I've found that when I put Queries with the same Input (same Questions and Answers) that it only gets asked once, but it always supplies the value of the first querey. That's unavoidable; Roll20 will only use the first roll query it comes across with a specific title, and use the values from that one.  If you want to use different values, the best you're going to get is Vince's suggestion: 0 for no, 1 for yes, and multiply that by the value you want.
Alright. I tried the boolean method before and it didn't work which is why I came here. But when I copied Vince's answer it somehow worked. I'm guessing there's no way to turn a 0/1 into a String?
1524578811
vÍnce
Pro
Sheet Author
Tigrium said: Alright. I tried the boolean method before and it didn't work which is why I came here. But when I copied Vince's answer it somehow worked. I'm guessing there's no way to turn a 0/1 into a String? NTIKO, but I suppose you could use the boolean along with some explanatory text to help indicate if something was enabled. Smite enabled?(No,0|Yes,1):?{Smite?|No,0|Yes,1}
1524580348
The Aaron
Pro
API Scripter
Depending on where this all is, you could include a label as part of the roll: MacroUse?{Smite?|No,0|Yes, [Smite] 1}*@{CHA-mod} Attack Roll?{Smite?|No,0|Yes, [Smite] 1}*@{class-0-level}Damage Roll