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

Second roll in custom Rolltemplate is not displayed correctly

Hi all, I'm a bit stuck so I have no option to call for help =( I want to have an option to toggle between roll with advantage or disadvantage using a query inside macro. Display of a second roll is dependent on  addrollflag. I get it form this attribute inside the sheet - <input type="hidden" name="attr_addroll_flag" title="@{addroll_flag}" value="[[ ?{Have Advantage or Disadvantage?|No, 0|Yes, 1} ]]" /> I have following rolltemplate <rolltemplate class="sheet-rolltemplate-FNP35skillcheck">     <div class="container">         <h1>{{name}}</h1>         <div><span class="subheader">{{subtags}}</span></div>         <div class="arrow-container"><div class="arrow-right"></div></div> {{#checkroll}} <div class="rowcolor"><span class="tcat">{{checkroll}}</span></div> {{#rollWasCrit() checkroll}} <div class="rowcolor"><span class="tcat_crit">Critical Success!</span></div> {{/rollWasCrit() checkroll}} {{#rollWasFumble() checkroll}} <div class="rowcolor"><span class="tcat_crit">Critical Fail =( </span></div> {{/rollWasFumble() checkroll}} {{/checkroll}} <div class="arrow-container"><div class="arrow-right"></div></div> {{#addrollflag}} <div class="rowcolor" hidden>{{addrollflag}}</div> {{#rollTotal() addrollflag 1}} {{#addroll}} <div class="rowcolor"><span class="tcat">{{addroll}}</span></div> {{#rollWasCrit() addroll}} <div class="rowcolor"><span class="tcat_crit">Critical Success!</span></div> {{/rollWasCrit() addroll}} {{#rollWasFumble() addroll}} <div class="rowcolor"><span class="tcat_crit">Critical Fail =(</span></div> {{/rollWasFumble() addroll}} {{/addroll}} {{/rollTotal() addrollflag 1}} {{/addrollflag}} <div><span class="tcat">**Check against DC. Success will count if check is > 0**</span></div>     </div> </rolltemplate> This is the roll - &{template:FNP35skillcheck}{{name=**Unarmed check!**}}{{subtags=**@{character_name}** use a skill! }}{{checkroll=@{unarmed_calc}}}{{addrollflag=@{addroll_flag}}}{{addroll=@{unarmed_calc}}} And the variable - <input type="hidden" class="sheet-number" name="attr_unarmed_calc" title="@{unarmed_calc}" value="[[ [[@{unarmed}]] [Skill] - 1d100cs<[[@{skill_critical_chance}]]cf>[[@{skill_critfail_chance}]] [Roll] + @{misc_bonus}]]" > In Normal mode all is working great. But in second mode (Advantage/Disadvantage) the second roll is not correctly rolled. It looks like this -  I've played a bit with a template, and when I drop {{#addrollflag}} section - all logic is working fine. I can get 2 correct rolls. Can I correct my template somehow to get it work?) Or should I look for another way to achieve what I want from the roll?
I've found the solution, I was 2 changes short) <input type="hidden" class="sheet-number" name="attr_unarmed_calc" title="@{unarmed_calc}" value="@{unarmed} [Skill] - 1d100cs<[[@{skill_critical_chance}]]cf>[[@{skill_critfail_chance}]] [Roll] + @{misc_bonus}" > &{template:FNP35skillcheck}{{name=**Unarmed check!**}}{{subtags=**@{character_name}** use a skill! }}{{checkroll=[[@{unarmed_calc}]]}}{{addrollflag=@{addroll_flag}}}{{addroll=[[@{unarmed_calc}]]}} I do not know what was wrong but this placing of [[ ]] brackets seems to work.