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 .
×

Question about variable macro

Hi guys, Apologies for my English by advance ^^ I make a macro with the default template with a variable : &amp;{template:default} {{name=Attaque}} {{Résultat= [[?{Santé| Normal, 1d20 + @{selected|DISTANCE} + @{selected|FORCE} | Blessé, 1d20 + @{selected|DISTANCE} + @{selected|FORCE} | Critique, 2d20kl1 + @{selected|DISTANCE} + @{selected|FORCE}}]] }}&nbsp; &amp;{template:default} {{name=Dégats}} {{Résultat= [[?{Dégats| Normal, 2d12kh1 + @{selected|ARME} | Blessé, 2d10kh1 + @{selected|ARME} | Critique, 1d6 + @{selected|ARME}}]] }} It works but it make 2 differents board like&nbsp; Attaque Résultat <span class="inlinerollresult showtip tipsy-n-right" title=" Rolling 1d20 + 0 + 3 = ( 3 )+0+3" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(254, 246, 142); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">6 Dégats Résultat <span class="inlinerollresult showtip tipsy-n-right fullcrit" original-title=" Rolling 1d6 + 1 = ( 6 )+1" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(63, 179, 21); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">7 My question is : Can i have this two variable result in the same board ? I just have the free version so i don't have script. If it's not possible doesn"t matter, but i want to know. :D Thanks a lot.
1585730041
Ziechael
Forum Champion
Sheet Author
API Scripter
Combining them into a single template will keep them together: &amp;{template:default} {{name=Attaque}} {{Attaque = [[?{Santé| Normal, 1d20 + @{selected|DISTANCE} + @{selected|FORCE} | Blessé, 1d20 + @{selected|DISTANCE} + @{selected|FORCE} | Critique, 2d20kl1 + @{selected|DISTANCE} + @{selected|FORCE}}]] }} {{Dégats = [[?{Dégats| Normal, 2d12kh1 + @{selected|ARME} | Blessé, 2d10kh1 + @{selected|ARME} | Critique, 1d6 + @{selected|ARME}}]] }}
1585730160

Edited 1585730318
Ow Okay, Thanks a lot !!!! :D And maybe a last question. Can i combine the variable choice. If i Choose Santé = Normal the Dégats = normal can be launch automatically ? Or i have to submit the two windows ?
1585735192
Ziechael
Forum Champion
Sheet Author
API Scripter
You sure can, although it gets a bit messier and complex the more you reduce the number of queries: &amp;{template:default} {{name=Attaque}} {{Attaque = [[?{Santé| Normal, 1d20 + @{selected|DISTANCE} + @{selected|FORCE}]] &amp;#125;&amp;#125; {{Dégats = [[ 2d12kh1 + @{selected|ARME}| Blessé, 1d20 + @{selected|DISTANCE} + @{selected|FORCE} ]] &amp;#125;&amp;#125; {{Dégats = [[ 2d10kh1 + @{selected|ARME} | Critique, 2d20kl1 + @{selected|DISTANCE} + @{selected|FORCE} ]] &amp;#125;&amp;#125; {{Dégats = [[ 1d6 + @{selected|ARME}} ]] }}