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

Some Maths at Roll20?

  Hello guys, I thought I'd post this section for questions involving some of useful mathematics in roll20 and how to use it. I have some questions to begin! 1) How can I call the maximum value of a variable? Ex: My variable is "HP" and I have the current value of "10" and the max value of "20". How can I proceed, to make a macro that call the max value? I know that, if I make @{selected|HP} then I'll call the value "10" but, about the value "20"? How can I proceed? ( In @{selected|HP} the token linked to the character sheet have to be selected. ) 2) How can I make powers at roll20? Ex: How can I do a macro that calculates "2^3=8"? Exist a symbol that represents "^" at roll20 language? More generally , what operations and mathematical functions are available for use in this language offered by roll20 ? ( Other than "Floor" for example. )
1473461181
The Aaron
Roll20 Production Team
API Scripter
1). You use |max: @{selected|HP|max} see (near the end of the section):&nbsp; <a href="https://wiki.roll20.net/Macros#Using_a_Selected_To" rel="nofollow">https://wiki.roll20.net/Macros#Using_a_Selected_To</a>... 2). &nbsp;There are the basic 4: + - / * and some math special functions. I don't think there are power functions, but check the docs.&nbsp; See:&nbsp;<a href="https://wiki.roll20.net/Dice_Reference#Rounding_Rolls_and_Math_Functions" rel="nofollow">https://wiki.roll20.net/Dice_Reference#Rounding_Rolls_and_Math_Functions</a>
1473463061
vÍnce
Pro
Sheet Author
I think there is a suggestion for power here: Additional math functions for character sheets and macros .
1473489667
Lithl
Pro
Sheet Author
API Scripter
The Aaron said: 2). &nbsp;There are the basic 4: + - / * and some math special functions. Modulus operator is also available.
I thank you guys! =D