Presuming a d100 (but it can be changed) this macro will have a result of 10 on a roll of 40; otherwise the result will be the same as the roll. &{template:default} {{Roll=$[[0.computed]]}} {{Result=[[ [[ (ceil([[ [[ {abs(floor(([[1d100]]-40)*2000.001)),61}k1 /-2 ]].0 *-1]])+40000)%999 ]] ]]}}