I was just reading a page on the internet about CP2020's combat system. Are you sure you roll 30 dice for attacks? What I read suggested you roll one die, and you get 1 hit for each point you beat the target. If that's the case, this is the macro you want: /roll {d10+@{rifle_Skill}+@{ref}+floor(?{ROF|30}/10)-?{Target Number|15}+1,0d0}k1 Here are a couple of prettier ways of displaying it Method one &{template:default} {{name=Autofire Attack, ?{ROF|30} Shots}} {{Target [[?{Target Number|15}]]=Hits Scored: [[ {d10+@{rifle_Skill}+@{ref}+[[floor(?{ROF}/10)]]-?{Target Number}+1,0d0}k1 ]] }} Method 2 &{template:default} {{name=Autofire Attack, ?{ROF|30} Shots}} {{Target=[[?{Target Number|15}]]}} {{Hits Scored=[[ {d10+@{rifle_Skill}+@{ref}+[[floor(?{ROF}/10)]]-?{Target Number}+1,0d0}k1 ]] }}