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

empower spell macro help (pathfinder)

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?
1496631964
vÍnce
Pro
Sheet Author
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.  
1496651898
Ziechael
Forum Champion
Sheet Author
API Scripter
[[ floor ( (7d6+7)*1.5 ) ]] would prevent any non-whole numbers ;)
1496675439

Edited 1496675451
vÍnce
Pro
Sheet Author
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.  
1496675812
The Aaron
Pro
API Scripter
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 )
1496677250
vÍnce
Pro
Sheet Author
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
So probably a dumb question, but what does the word floor do exactly?
1496935109
The Aaron
Pro
API Scripter
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". &nbsp;"Always rounds up" is the ceil() function. &nbsp;round() will go up at .5 and higher and down below that, and abs() will give you the signless value. See:&nbsp;<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>
good to know. thanks for the help.