Isnt there a maximum of 10, and minimum or -10? Thats what the basic code suggests above. I forgot to include the modifier (weird, I thought it was there), for that: &{template:default} {{name=NAME HERE}} [[{[[{?{THAC0|10} + ?{Modifier?|0} - [[1d20]],10}dh1]],-10}dl1]] {{THAC0=[[?{THAC0}]] }}{{d20 roll=$[[0]]}} {{AC Hit=$[[2]]}} and if you want to show it on the printout &{template:default} {{name=NAME HERE}} [[{[[{?{THAC0|10} + ?{Modifier?|0} - [[1d20]],10}dh1]],-10}dl1]] {{THAC0=[[?{THAC0}]] }}{{Modifier=[[?{Modifier?}]] }} {{d20 roll=$[[0]]}} {{AC Hit=$[[2]]}} I;m not sure how the modifier works, you might want to change it to a - instead of a +.