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 help] How to ask me for X?

1499337735

Edited 1499337757
Hi there, I'm just trying to figure out how to get a a macro to do a dice roll and ask me if I spend x resource to add x to the total number generated. For example d20+4+x (x=resource spent). I'm having trouble reading the wiki. Also, can I get to let me name X in the box?
1499339258

Edited 1499339368
Ziechael
Forum Champion
Sheet Author
API Scripter
Hi Cat, you want to use a 'query' for this kind of functionality. Check out this part of the wiki for more info. However, if the wiki is giving you problems as mentioned then a quick summary for a basic query would be as below: d20 + 4 + ?{Resource Spent| 0 } The bolded number is the default value in the prompt and can be any value you desire, negatives will also calculate correctly when preceded by a + sign too if needed.
Thanks man.
1499423449
Ziechael
Forum Champion
Sheet Author
API Scripter
Anytime, happy rolling!