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

Help me make a Sneak damage macro. ceil(expr)d6 doesn't work.

I'm playing a Pathfinder rogue atm, and I'm making macros to automatically calculate various things like attack rolls, damage rolls, BAB, attacks per round etc. Right now I'm trying to make one that automatically rolls the proper amount of sneak damage, which is [[ceil(@{herpderp|Level}/2)d6]] but it doesn't work. So I tried putting the ceiling function in its own ability, and doing [[%{herpderp|SneakDmg}d6]] instead but that doesn't work either. Ideas?
Simple solution don't do half level. Just have a value for your number of sneak attack dice, if you multiclass it will no longer be ceil(lvl/2) anymore anyway.
If I need to add an extra attribute field for half-level then it defeats the purpose. Also, I'm not going to multiclass just to make my macros easier. wtf?
What I am saying is just make an attribute called "SAdice" or something similar, because if you do multiclass at some point the half level formula would no longer work anyway. If you take prestige class levels or say take 4 level of fighter or something, it is just best to have a value for the number of sneak attack dice.
That is not what I need. I'm not taking levels in any other classes. I need to know why what I'm trying isn't working, and how to make it work without adding extra attribute fields.
it doesnt like the way you formatted the input. the( ) before the d6 doesnt work right. i used sneak attack /r [[ceil(@{Level}/2)]]d6 for the rogue in my campaign. its inside an ability so it doesnt need to have the character name in the formula.
unfortunately you cant nest the inline rolls so you have to deal with the extra chat stuff.
Roger A. said: unfortunately you cant nest the inline rolls so you have to deal with the extra chat stuff. I need it to work inline T_T Oh well, I'll just do it manually then. Thanks.
1401056888
GiGs
Pro
Sheet Author
API Scripter
You don't need the ceiling function with number of dice. Roll20 automatically rounds fractions to nearest, when its for number of dice rolled. So if you need to round up, you can use: /r (@{Level}/2)d6 If you need to round down, you can use /r ((@{Level}-1)/2)d6 If you want to put them in inline brackets to hide the working, you need to do it like this: /r [[(@{Level}/2)d1]]d6 The bit inside the inline roll wont work unless it's a dice roll, so making them d1's fixes it.
As G G indicated you can make these without using ceil/floor macros by using the natural rounding mechanics. The following is what I use for sneak attack: [[(@{level}/2)d6]] And similarly this is what I use for Lay on Hands (similar, but even level dice increase vs. odd level die increase with sneak attack): [[((@{level} -1)/2)d6]] Both work perfectly as inline rolls.
G G said: You don't need the ceiling function with number of dice. Roll20 automatically rounds fractions to nearest, when its for number of dice rolled. So if you need to round up, you can use: /r (@{Level}/2)d6 If you need to round down, you can use /r ((@{Level}-1)/2)d6 If you want to put them in inline brackets to hide the working, you need to do it like this: /r [[(@{Level}/2)d1]]d6 The bit inside the inline roll wont work unless it's a dice roll, so making them d1's fixes it. Kevin said: As G G indicated you can make these without using ceil/floor macros by using the natural rounding mechanics. The following is what I use for sneak attack: [[(@{level}/2)d6]] And similarly this is what I use for Lay on Hands (similar, but even level dice increase vs. odd level die increase with sneak attack): [[((@{level} -1)/2)d6]] Both work perfectly as inline rolls. Thank you guys so much :D
@ I don't understand why you used the d1? You can put anything that's not a string (text that doesn't reference a number) in there and be fine.
The d1 method automatically rounds off fractions for you.
1401479635
GiGs
Pro
Sheet Author
API Scripter
d1 means that bit before it gets treated like a dice roll, so as Mark points out, it gets rounded automatically. There are several situations when building macros that this is a useful workaround. It might not be always needed in this case, though, Kevin's approach works. I used the d1 approacht because I tried Kevin's approach first and it didn't work, but I'd probably had a typo or left a space in there - roll20 can be finicky about that.