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 here.
×
×
Cookie Preferences
We use Cookies to help personalize and improve Roll20. For more information on our use of non-essential Cookies, visit our Privacy Policy here.
How would i enter this into macros? i'm kinda new here, but at the moment i want it to do this-- (7d6+7)*1.5 how would i do this in roll20 macros?
You can use [[ floor(7d6+7)*1.5 ]] in any "roll-time" macro field (all macro-text fields on the sheet have a superscript a,b,c,or d with a key in the footnote of the sheet). What are you trying to do? If this is an attack, you can simply add each part into an appropriate field of the attack.
Ziechael said: [[ floor ( (7d6+7)*1.5 ) ]] would prevent any non-whole numbers ;) Thanks Ziechael. I thought that by using floor, the resultant would be rounded down to the nearest whole number. ie 22.5 becomes 22.
Only your 7d6+7 was being floored, so an odd number result would then be multiplied by 1.5 and result in a fractional result (or non-whole number! =D )
The Aaron said: Only your 7d6+7 was being floored, so an odd number result would then be multiplied by 1.5 and result in a fractional result (or non-whole number! =D ) Duh. I suppose the parentheses are important. lol
It drops a decimal portion from a number: floor(5.2) == 5
floor(5.7) == 5
floor(5) == 5 You can think of it as "always rounds down". "Always rounds up" is the ceil() function. round() will go up at .5 and higher and down below that, and abs() will give you the signless value. See: <a href="https://wiki.roll20.net/Dice_Reference#Math_Operators_and_Functions" rel="nofollow">https://wiki.roll20.net/Dice_Reference#Math_Operators_and_Functions</a>