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

roll template issue

1462009661

Edited 1462091826
Phoxounet
Sheet Author
Translator
Hi there.&nbsp; First of all, I requested help in several topics and had awesome answers. Thx for all. :) Here is my last issue (and I will be able to complete my new sheet :D) Here is the roll template code : &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;rolltemplate class="sheet-rolltemplate-war2_combat"&gt; &nbsp; &nbsp; &nbsp; &nbsp; &lt;table&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;tr&gt;&lt;th COLSPAN="2"&gt;{{name}}&lt;/th&gt;&lt;/tr&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;tr&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;tr&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td COLSPAN="2"&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;img class="sheet-imghr" src="<a href="https://lh3.googleusercontent.com/-ptR_NzBo340/VYslrf-t9NI/AAAAAAAAV4Q/rV7U24IJdAc/w745-h10-no/co_hr.png" rel="nofollow">https://lh3.googleusercontent.com/-ptR_NzBo340/VYslrf-t9NI/AAAAAAAAV4Q/rV7U24IJdAc/w745-h10-no/co_hr.png</a>" /&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/td&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/tr&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td class="tcat"&gt;Base :&lt;/td&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td&gt;{{Carac}} %&lt;/td&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/tr&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {{#Roll}} &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;tr&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td class="tcat"&gt;Jet :&lt;/td&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td&gt;{{Roll}}&lt;/td&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/tr&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;tr&gt; &nbsp; {{#rollGreater() Roll Carac}} &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td COLSPAN="2" style="text-align:center;font-style:oblique;font-weight:bolder;color: #B31515;"&gt;Echec&lt;/td&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {{/rollGreater() Roll Carac}} &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{{#rollLess() Roll Carac}} &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td class="tcat"&gt;Dégâts :&lt;/td&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td&gt;{{degats}}&lt;/td&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {{/rollLess() Roll Carac}} {{/Roll}} &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/tr&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;tr&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {{#rollWasCrit() degats }} &lt;tr&gt; &lt;td class="tcat" style="font-style:oblique;font-weight:bolder;color: #3FB315;"&gt;Test Critique :&lt;/td&gt; &lt;td&gt;{{Rollbis}} &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; {{#rollGreater() Rollbis Carac}} &lt;td COLSPAN="2" style="text-align:center;font-style:oblique;font-weight:bolder;color: #B31515;"&gt;Critique échoué&lt;/td&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {{/rollGreater() Rollbis Carac}} &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{{#rollLess() Rollbis Carac}} &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td class="tcat" style="text-align:center;font-style:oblique;font-weight:bolder;color: #3FB315;"&gt;Dégâts &nbsp;critiques:&lt;/td&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td&gt;{{degatsbis}}&lt;/td&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {{/rollLess() Rollbis Carac}} {{/rollWasCrit() degats }} &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/tr&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td COLSPAN="2"&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;img class="sheet-imghr" src="<a href="https://lh3.googleusercontent.com/-ptR_NzBo340/VYslrf-t9NI/AAAAAAAAV4Q/rV7U24IJdAc/w745-h10-no/co_hr.png" rel="nofollow">https://lh3.googleusercontent.com/-ptR_NzBo340/VYslrf-t9NI/AAAAAAAAV4Q/rV7U24IJdAc/w745-h10-no/co_hr.png</a>" /&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/td&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/tr&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/table&gt; &lt;/rolltemplate&gt; and the macro : &nbsp;&lt;button &nbsp;type="roll" style="margin-left:0px;line_height:10px;height:20px;margin-bottom:2px;" title="Combat" name="roll_Arme1" value="&{template:war2_combat}{{name=@{Arme1_Nom}}} {{Carac=[[@{CC_Actuel}+?{mod|0}]]}} &nbsp;{{Roll=[[1D100cs&lt;[[@{CC_Actuel}+?{mod|0}]]cf&gt;[[@{CC_Actuel}+?{mod|0}]]]]}} {{Rollbis=[[1D100cs&lt;[[@{CC_Actuel}+?{mod|0}]]cf&gt;[[@{CC_Actuel}+?{mod|0}]]]]}}{{degats=[[1D10+@{Arme1_Deg}]]}} {{degatsbis=[[1D10!+@{Arme1_Deg}]]}} "&gt;&lt;/button&gt; My problem is that when I have the rollbis roll in the macro, the template fails and display :&nbsp; FLÉAU 1M Base :62&nbsp;% Jet :[[1D100cs&lt;62cf&gt;62]] If I remove it, it is working as intended : FLÉAU 1M Base :62&nbsp;% Jet :44 Dégâts :12 I don't understand why the rollbis section is not working. rollbis is in a rollWasCrit trigger : when a player rolls 10 on the damage die, he has to roll for his attack to confirm the crit. If the crit is confirmed, then he rolls for damages again (and then rerolls for damages each time he rolls 10 on the damage die.). Moreover, the error seems to depend on where the Roll is located in the macro. Base :142&nbsp;% Jet :53 Dégâts :16 Test Critique :[[1D100cs&lt;62cf&gt;62]] Dégâts critiques:10 Anyway not sure about that. I tried to have the same parameter (Roll) in the base and the crit checks. It is working (my crit conditional is working as intented) but it then displays the same value for the base roll and the crit confirmation roll (as intended since parameters are parsed before the macro is executed. So the Roll parameter only takes one value as expected and this value is used on the base and the crit checks. I want to have 2 rolls : base attack check and then crit confirmation check if a crit is possible. Again, thx for helping. Regards ! :)
1462026312
Silvyre
Forum Champion
Try adding spaces to the inside of your inline roll brackets, i.e. [[1D100cs&lt;62cf&gt;62]] becomes [[ 1D100cs&lt;62cf&gt;62 ]], etc.
1462033254
Phoxounet
Sheet Author
Translator
Did it but still not working : Base :142&nbsp;% Jet :38 Dégâts :15 Test Critique :[[ 1D100cs&lt;142cf&gt;142]]
1462034254
Silvyre
Forum Champion
Phoxounet said: [[ 1D100cs&lt;142cf&gt;142]] Could you try [[ 1D100cs&lt;142cf&gt;142 ]] instead of [[ 1D100cs&lt;142cf&gt;142]]?
1462039970
Phoxounet
Sheet Author
Translator
Damn. i did not put the space at the correct position in the roll macro. However, the problem is still there... :( Base :142&nbsp;% Jet :63 Dégâts :15 Test Critique :[[ 1D100cs&lt;142cf&gt;142&nbsp;]]
1462091303

Edited 1462091806
Phoxounet
Sheet Author
Translator
Made a step forward success today : &nbsp;{{Rollbis=[[ [[1D100]]cs&lt;[[@{CC_Actuel}+?{mod|0}]]cf&gt;[[@{CC_Actuel}+?{mod|0}]] ]]}}&nbsp; Added brackets for the 1D100 part of the roll and the result is working, yet not aesthetic :&nbsp; Base :112&nbsp;% Jet :34 Dégâts :15 Test Critique :[[&nbsp;5cs&lt;112cf&gt;112&nbsp;]] Dégâts critiques:8 Each part of the roll appears as inline roll and not the whole formula.. don't understand why the whole thing doesn't want to appear as a global inline roll... :( Could it be a bug or do I miss something ? :( Edit : Finally got it working ! : I had to add brackets in each part of the formula and then remove all spaces : Base :112&nbsp;% Jet :24 Dégâts :15 Test Critique :42 Dégâts critiques:9