The roll would be something like [[ [[{@{casterlevel},10}kl1]]d6 ]] the {@{casterlevel,10}kl1 would compare the caster level to 10 and keep the lowest of the two. Since it is in a nested in-line roll, it would then use the result of that comparison to determine how many d6 to roll. More on macros and dice in the wiki. edit: if you're using the D&D3.5 Character Sheet Template, one way to write the macro is: &{template:DnD35StdRoll} {{spellflag=true}} {{name=@{selected|token_name} }} {{subtags=casts [Fireball]( <a href="http://www.dandwiki.com/wiki/SRD:Fireball" rel="nofollow">http://www.dandwiki.com/wiki/SRD:Fireball</a> ) }} {{School:=Evo [Fire]}} {{Level:= Sor/Wiz 3}} {{Comp:=V, S, M}} {{Cast Time:= 1 std action}} {{Range:= Long ([[400+40*(@{selected|casterlevel})]]ft) }} {{Area:= 20-ft radius spread }} {{Dur:= Instantaneous}} {{Save:= Reflex half (DC: [[@{selected|spelldc3} + @{selected|sf-evocation}]]) }} {{SR:= Yes ([[1d20+@{selected|casterlevel}+@{selected|spellpen}]] vs SR) }} {{checkroll= A glowing, pea-sized bead streaks from your finger and blossoms into the fireball. If the bead is sent through a narrow passage, such as an arrow slit, you must “hit” the opening with a ranged touch attack, or the bead strikes the barrier and detonates early. }} {{notes= Fireball sets fire to combustibles and damages objects. It can melt metals with low melting points. If damage caused to a barrier shatters or breaks through, the fireball may continue; otherwise it stops at the barrier. See full description for more details. PHB p.231}} &{template:DnD35Attack} {{pcflag=true}} {{attack1=An explosion of flame detonates with a low roar and deals }} {{damage1=[[([[{@{selected|casterlevel},10}kl1]])d6]] points of fire damage to every creature within the area.}} {{fullattackflag=[[d1]]}} {{attack2=Unattended objects also take damage. The explosion creates almost no pressure. }}