The order of operations is pretty clear that this doesn't work sadly: Abilities are expanded (meaning the definition of the ability is placed in the formula anywhere that ability appears; e.g. %{character name|ability_name} becomes /r 1d4 ). Macros are expanded (e.g. #macro-name becomes /r 1d4 ). Attribute calls are resolved. (e.g. @{attribute_name} becomes 4 ) The 3 above steps are repeated up to 99 levels deep or there are no longer any expansions required. Roll queries are executed up to 99 levels deep (the player making the roll is asked to provide a value for each query, and that value is substituted in where the roll query appears in the formula). HTML entities within roll queries are parsed once after each roll query (e.g. } becomes }, but } becomes }) By the time the query is resolved the attribute calls have already been made :( You need to consider nesting more in the result of the query like: &{template:default} {{name=test}} {{attack=?{foo|1,1}} {{str=@{1|strength}|2,2}} {{str=@{2|strength}|3,3}} {{str=@{3|strength}|4,4}} {{str=@{4|strength} }}} As you can see it takes some amount of repetition and makes dynamic attribute selection more effort than it is probably worth... the easiest way to do things like that is to use the @{selected or @{target keywords which do require there to be tokens on the page that are linked to journal entries however. &{template:default} {{name=test}} {{attack=@{selected|token_name}}} {{?{Attribute|Str,str=@{selected|strength}|Dex,dex=@{selected|dexterity}} }} etc