I have this macro that works, the query is so if its not a sneak attack the damage is 0 [[ ?{Sneak?|No,0|yes,1}*[[ ceil((@{class-0-level}) / 2) ]]d6 ]] One thing to keep in mind is this in one of the attacks on the sheet fields or a separate token action macro or global macro? If it either of those latter 2 are the case you may need to do @{selected| instead. Also my macro use the pathfinder community however i checked it against the legacy. The one i have above works. Additionally yours does not work because of the order of operation in an inline roll. If you changed it to this [[[[ceil(@{level}/2)]]d6]] then iit would also work.