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

How do you add two attributes together for a macro to roll dice in a Vampire type system?

I can look up the values of say Perception and Alertness on a character sheet by using @{Character|Perception} and @{Character|Alertness} I want to then be able to roll that value of dice against a difficulty I set and give me the outcome. The thing I have made doesn't do anything:  &{template:default} {{name=Vampire Die Roller}} {{Perception and Alertness}**: [[@{Character|Perception}d10cs0cf0+@{Character|Alertness}d10cs0cf0>?{Difficulty|6}}]]}} I think it wants a Difficulty for the Perception part? I have no idea how to make it use the difficulty I set for the whole thing. 
I think you just need to wrap the difficulty query in double brackets, but I’m not at my computer to confirm. 
1663828206

Edited 1663828397
Hi, I'm not familiar with Vampire sheets on Roll20, but have you tried to add both values before rolling D10's? [[@{Character|Perception}+@{Character|Alertness}]]D10 I can't validate your whole code, but I feel that would be a start? Depending on what you're trying to do, either parenthesis of double brackets. Then you should be able to follow with your cs cf Query.
If you do that, then it seems to add the raw value of the attribute but not as a number of d10. So for example, if the attributes are 2 and 3, it would come up with a result of 2 + 3d10. 
1663867178
Kraynic
Pro
Sheet Author
If you look at Neo's example, the double brackets around the attributes before the D10 are very important.  They force the addition to resolve to a single number before the d10 are rolled. You just need to plug it into your existing macro: &{template:default} {{name=Vampire Die Roller}} {{Perception and Alertness}**: [[[[@{Character|Perception}+@{Character|Alertness}]]D10cs0cf0>?{Difficulty|6}}]]}}
Yes, that seems to have done the trick - thanks very much!