I'm trying to simplify my spell macros to auto roll the appropriate number of dice based on caster level using only inline expressions. I've seen posts suggesting use of "/r [[{floor(@{casterlevel}/2),5}dh1]]d4" to roll caster level variable dice, however that solution is not what I need. I need something that is completely inline to replace my current [[?{Number of Dice (½Caster Level, Max:5)|5}d4]] expression to remove the need for user input when casting such spells. Formulas that I have tried: [[{{floor(@{casterlevel}/2),5}dh1}d4]] (returns Undefined) [[{{@{casterlevel}/2,5}dh1}d4]] (returns Undefined) [[({floor(@{casterlevel}/2),5}dh1)d4]] (returns #dice does not roll) ex: [[({floor(10/2),5}dh1)d4]] returns 5 [[({@{casterlevel}/2,5}dh1)d4]] (returns #dice does not roll) ex: [[({10/2,5}dh1)d4]] returns 5 [[((@{casterlevel}-1)/2)d4]] (rolls correctly but does not cap #dice) I have read the dice reference article on order of operations and have sense learned that the floor() function resolves at the end of the expression and as such cannot be used in this sort of formula I believe that the dh1 function likely also can't be used in this formula either since [[((@{casterlevel}-1)/2)d4]] works but lacks the caster level cap for the spell so is there any other way to accomplish this?