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

Using one roll as a variable for another.

Good day forums. I wanted to know if there was a way to take the result I qet from one equation or roll, and automatically apply it to another within the same ability. For example, I have a character use an ability and he rolls 1d8+@{ModOne}+@{ModTwo}. In our particular homebrew system, he can choose to pay 50% more resources to have the attack do 50% more damage. This is very easy to do in the head, but I would like a way to put it in the ability as well if possible. So, I want to take the answer to the previous equation, and multiply it by 50%. So, something like this: [[1d8+@{ModOne+@{ModTwo}]] = X damage. [[X*1.5]] damage if modified. Thank you very much for any assistance.
1382232895
Gauss
Forum Champion
Using the current (non-API) tools you cannot do this. However, the API may be able to do it, I would ask the guys in the API forum. - Gauss
I see. Thank you very much then.
Can you use the variable system that's already in place and decide whether you want to use the resources in advance? So something like: [[(1d8+@{ModOne}+@{ModTwo})*?{Enter 1 if using no extra resources or 1.5 if using extra resources|1}]]
That might work. What does the '1' on the end represent? I have never tried to use an equation like that.
1382607790
Gauss
Forum Champion
Alexander, queries can be set to a default value by inputting |value after the query name. Examples: With default value: ?{query name|default value} Without default value: ?{query name} Every time you hit the macro the query box will pop up and if you have a default value in it you can just hit enter if you don't want to change anything. In Nathan's example you would change "1" to "1.5" when the query pops up if you wanted to use extra resources. - Gauss