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

MACRO: Input field?

November 15 (8 years ago)
Is there anyway to get the macros to ask what the modifier should be just like how they have what spell level should be cast at for DND OGL?
November 15 (8 years ago)
The Aaron
Pro
API Scripter
Sure!
?{Modifier|0}
gets you a prompt for a value which is initially 0. 

You can also build a dropdown:
?{Modifier|-1|0|+1}
if you want to limit choices.  

You can name those choices like this:
?{Modifier|poor,-1|average,0,|good,+1}
So that a prompt offers a dropdown of poor,average,good. 

Additionally, you can repeat the same label to reuse the value in the formula/macro:
[[1d20-?{Modifier|poor,-1|average,0,|good,+1}]] with a Mod of ?{Modifier}.

November 15 (8 years ago)

Edited November 15 (8 years ago)
Nice thanks.

Any idea why I keep getting a crit error for this?

&{template:atkdmg} {{mod=+5}} {{rname=Longsword}} {{r1=[[1d20+3+2]]}} {{always=1}} {{r2=[[1d20+3+2]]}} {{attack=0}} {{range=5 ft.}} {{damage=[[1d8+3]]}} {{dmg1flag=1}} {{dmg1=[[1d8+3]]}} {{dmg1type=Slashing}} {{damage=1}} {{dmg2flag=1}} {{dmg2=3}} {{dmg2type=Radiant }} {{crit1=$[[20]]}} {{crit2=$[[20]]}} {{save=}} {{saveattr=}} {{savedesc=}} {{savedc=}} {{desc=I glow producing 10 feet of bright light and 10 feet of dim light outside of that, dealing 3 radiant damage to one spell or attack target each turn, and deal 1 radiant damage to all creatures in your bright light (including me) at the end of your turn for 1 minute. }} ammo=ammo {{charname=Sir Dorihiem III}}

I realize I need some sort of inline command but I'm not finding any help on the documents site.  Is it as simple as {{crit1=$[[1d8]]}}?
November 15 (8 years ago)

Rom said:

Is it as simple as {{crit1=$[[1d8]]}}?

Pretty much, but you'll need to remove the $