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

floor / ceil function on non-dice rolls macros?

Hi there I try to make a nice macro for Shield of Faith. Basically you get bonus to AC depending on your level (2 plus 1 for every six levels). I wrote this macro /em casts Shield of Faith, granting +[[2+@{selected|level}/6]] deflection bonus to AC to @{target|token_name} for @{selected|level} minutes. which works fine, however the actual bonus is returned as a fraction. I tried to use this: /em casts Shield of Faith, granting +floor([[2+@{selected|level}/6]]) deflection bonus to AC to @{target|token_name} for @{selected|level} minutes. as well es using double brackets (( )) for floor. However that is of no use. So I wonder, can floor() only be used on dice rolls? If not, how would I need to alter my macro?
1419842423

Edited 1419842843
vÍnce
Pro
Sheet Author
Floor needs to go inside your inline roll. [[floor(2+@{selected|level}/6)]]
ah, cool :) thx :)