The % is the modulo operator, or remainder function. You divide by a certain number, and it tells you what the remainder is after the division. Sometimes when you have something before a roll (d6), normal brackets ( ) aren't enough, and you have to enclose it in inline roll brackets [[ ]] to force the result to be treated as a number. This should work: &{template:default} {{name=@{selected|character_name}s Ini}}
{{result=[[ [[floor((@{selected|A}+@{selected|B})/3)]]d6+((@{selected|A}+@{selected|B})%3)+?{modifier|0}]]}} You can use inline roll brackets to neaten up the output, so this will look better on mouseovers: &{template:default} {{name=@{selected|character_name}s Ini}}
{{result=[[ [[floor((@{selected|A} + @{selected|B}) / 3)]]d6+[[(@{selected|A} + @{selected|B}) %3 ]] + ?{modifier|0} ]] }} Note also you can use spaces to break up a long line and make it more readable in the macto or ability. Finally, if you are using that as an Ability and it's only meant to be used by the character whose sheet it is on, you can dispense with the selected| part, like so &{template:default} {{name=@{character_name}s Ini}}
{{result=[[ [[floor((@{A} + @{B}) / 3)]]d6+[[(@{A} + @{B}) %3 ]] + ?{modifier|0} ]] }} For Abilities (and only abilities) you can skip providing a name or selected, and it will use the stats found on that character.