Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

reuse dice in description of another roll of dice

Hello I want use a previous roll for a description like : &{template:spell}{{description=[[d6]] [[@{selected|repeating_attack_$0_atkbonus}[test]]] --> works [[@{selected|repeating_attack_$0_atkbonus}[$[[0]]]]] --> don't works good [$[[0]]] }} I test some htlm replacements but nothing it's posible or not ? thanks in advance
1696502680
timmaugh
Forum Champion
API Scripter
If scripts are available in your game, you can do this with metascripts. Are scripts available? The owner of the game would have to be at the Pro level...
no  available scripts free user
1696523440
Andrew R.
Pro
Sheet Author
You want to use a dice roll as a description? Is that correct?  I suspect that is a use case that the creators of the Roll20 macro system did not expect, and you can’t do it.  You probably need something with actual variables like ScriptCards to get that to work. 
1696539732

Edited 1696539760
yes I want to use a dice roll as a description thanks Timmauhg and Andrew for your answer
1696602798

Edited 1696603238
With the example given in your first post, it is possible (with several tricks) to make believe a roll is used as a description of another roll. The roll may be a dice or a rollable table. Depending on the level of complexity you want to achieve, simple tricks may be insufficent and a pro account needed. light mode UI: &{template:default}{{name=Test}}{{desc=$[[1.computed]] [[@{selected|repeating_attack_$0_atkbonus}[test]]] --> works [[@{selected|repeating_attack_$0_atkbonus}[$[[1.computed]]]]]) --> does not work [@{selected|repeating_attack_$0_atkbonus}](#" style="background:#fef68e; color:#404040; border:2px solid #fef68e; padding:0px 3px; font-weight:bold; font-size:1.1em; text-decoration:none; cursor:help" class="showtip" title="Rolling @{selected|repeating_attack_$0_atkbonus}[[[1d6]]] = @{selected|repeating_attack_$0_atkbonus}) --> illusion #1 [@{selected|repeating_attack_$0_atkbonus}](#" style="background:#fef68e; color:#404040; border:2px solid #fef68e; padding:0px 3px; font-weight:bold; font-size:1.1em; text-decoration:none; cursor:help" class="showtip" title="Rolling @{selected|repeating_attack_$0_atkbonus}[$[[1]]] = @{selected|repeating_attack_$0_atkbonus}) --> illusion #2 [$[[1]]] }} dark mode  UI: &{template:default}{{name=Spell}}{{desc=$[[1.computed]] [[@{selected|repeating_attack_$0_atkbonus}[test]]] --> works [[@{selected|repeating_attack_$0_atkbonus}[$[[1.computed]]]]]) --> does not work [@{selected|repeating_attack_$0_atkbonus}](#" style="background:#702c91; color:#ffab00; border:2px solid #702c91; padding:0px 3px; font-weight:bold; font-size:1.1em; text-decoration:none; cursor:help" class="showtip" title="Rolling @{selected|repeating_attack_$0_atkbonus}[[[1d6]]] = @{selected|repeating_attack_$0_atkbonus}) --> illusion #1 [@{selected|repeating_attack_$0_atkbonus}](#" style="background:#702c91; color:#ffab00; border:2px solid #702c91; padding:0px 3px; font-weight:bold; font-size:1.1em; text-decoration:none; cursor:help" class="showtip" title="Rolling @{selected|repeating_attack_$0_atkbonus}[$[[1]]] = @{selected|repeating_attack_$0_atkbonus}) --> illusion #2 [$[[1]]] }}
Thanks Erik H. works fine after modify my macro for incorporate yours