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 .
×

Assistance with a sheet

Hello all, I am trying to get a button to add 2 variables together, the situation for this one is as follows: Ideally the button will add the variable @{Prowess} to the variable @{TempPRW} and then add 10 and divide the total by 10, rounding down, the current line is below and does not work, any help is appreciated, at the moment i am steering away from java. value="/em Attacks: [[[[floor((@{Prowess}+(@{TempPRW})+10)/10)]]>7!]]
1591684811
Kraynic
Pro
Sheet Author
[[floor((@{Prowess}+@{TempPRW}+10)/10)]] If all you are doing is adding the 2 attributes, adding another 10, then dividing by 10, I think this is the calculation you need.  Unless there is something else that needs to happen that you haven't mentioned.
1591685364
GiGs
Pro
Sheet Author
API Scripter
I'm suspecting that expression isnt doing what you want. Can you decsribe how this roll works? Explain it to me as if I was a player in your game about to pick up some dice. Dont use roll20 terms to explain it. For the expression above - that divide by 10 section is incompatible with the >7! part. Dining by 10 means yo uend up with a single number, and you cant use single numbers with the > operator: it needs one or more dice. Replacing it with a /7 instead of >7 would give a result (but you'd need to add round() for rounding purposes probably). But I suspect the expression isnt what you need, hence the question at the start of this post. Answer that and we can tell you the best way to make this roll work.
1591685464
GiGs
Pro
Sheet Author
API Scripter
Kraynic said: [[floor((@{Prowess}+@{TempPRW}+10)/10)]] If all you are doing is adding the 2 attributes, adding another 10, then dividing by 10, I think this is the calculation you need.  Unless there is something else that needs to happen that you haven't mentioned. I suspect the ( ) around TempPRW in the original post indicate that there is an expression of some kind in that attribute, or maybe a dice roll, hence why I asked for the roll to be fully described.
So the system as a whole to attack for instance, you take your static prowess and add your "temp prowess" which is just a placeholder im using for stuff like flanking, prone, and other bonuses to the roll, divide by 10 and thats your modifier. in order to make sure that people always have 1 dice we add another 10 to the roll to divide by 10, (its not a mimum its meant to add one dice)
Kraynic said: [[floor((@{Prowess}+@{TempPRW}+10)/10)]] If all you are doing is adding the 2 attributes, adding another 10, then dividing by 10, I think this is the calculation you need.  Unless there is something else that needs to happen that you haven't mentioned. I tried this, it failed, thats one reason I'm asking here 
Nevermind, I was being dumb and spacing about making it an attribute to begin with, thank you for the assistance