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

Gm-roll button

1590868774

Edited 1590868903
Hi guys, I'm currently working on a d100 system basing on the warhammer d100 system. Now I wanted to implement a button for gmrolls, but it keeps posting the results in the regular chat and I don't know how to change that. the char sheet html line are these:                             <tr>                                 <td>                                     <div class="sheet-row">                                         <div class="sheet-item sheet-DHBtn2" style="width:45%">                                             <button name="roll_Dodge" type="roll" value="&{template:darkheresy2} {{name=@{character_name}}} {{Action=nutzt Ausweichen}} {{Test=[[floor((([[@{Agility} + @{advanceAg} + @{AgMod} + @{AgRacialMod} + @{DodgeMod} + (-20 + @{Dodge1} + @{Dodge2} + @{Dodge3} + @{Dodge4}) + ?{Modifier|0}]] - 1d100)/10))]]}} {{Unnat=[[floor(@{UnAg}/1)]]}}">                                                 <span>Ausweichen</span>                                             </button>                                         </div>                                         <div class="sheet-item sheet-Gmroll" style="width:10%">                                             <button name="roll_Dodge" type="roll" value="&{template:darkheresy2} {{name=@{character_name}}} {{Action=nutzt Ausweichen}} {{Test=[[floor((([[@{Agility} + @{advanceAg} + @{AgMod} + @{AgRacialMod} + @{DodgeMod} + (-20 + @{Dodge1} + @{Dodge2} + @{Dodge3} + @{Dodge4}) + ?{Modifier|0}]] - 1d100)/10))]]}} {{Unnat=[[floor(@{UnAg}/1)]]}}"></button>                                         </div>                                         <div class="sheet-item" style="width:17%;">                                             <input name="attr_DodgeMod" type="number" value="0" style="text-align: center;" />                                         </div>                                     </div>                                 </td>                                 <td class="sheet-grayborders"><input name="attr_Dodge1" type="checkbox" value="20"></td>                                 <td class="sheet-grayborders"><input name="attr_Dodge2" type="checkbox" value="10"></td>                                 <td class="sheet-grayborders"><input name="attr_Dodge3" type="checkbox" value="10"></td>                                 <td class="sheet-grayborders"><input name="attr_Dodge4" type="checkbox" value="10"></td>                             </tr> The first button (sheet-DHBtn2) is the regular roll button to post in the chat, the 2nd button (sheet-Gmroll) should be the gmroll. I made a gmroll button style in css and it works fine. But it still rolls in the regular chat. So, what do I have to change in the formula that I get the gm wisper instead of the regular chat lines? Hope someone can help me...
1590871636

Edited 1590871705
Pantoufle
Pro
Sheet Author
Translator
Hello just add /w gm between value=" and & in the gm button
1590873044
GiGs
Pro
Sheet Author
API Scripter
Even better, create a hidden attribute to hold the button code, to reduce the duplication, like so: <tr>                                 <td>                                     <div class="sheet-row">                                         <div class="sheet-item sheet-DHBtn2" style="width:45%">                                             <input name="attr_DodgeRoll" type="hidden" value="&{template:darkheresy2} {{name=@{character_name}}} {{Action=nutzt Ausweichen}} {{Test=[[floor((([[@{Agility} + @{advanceAg} + @{AgMod} + @{AgRacialMod} + @{DodgeMod} + (-20 + @{Dodge1} + @{Dodge2} + @{Dodge3} + @{Dodge4}) + ?{Modifier|0}]] - 1d100)/10))]]}} {{Unnat=[[floor(@{UnAg}/1)]]}}" />                                             <button name="roll_Dodge" type="roll" value="@{DodgeRoll}">                                                 <span>Ausweichen</span>                                             </button>                                         </div>                                         <div class="sheet-item sheet-Gmroll" style="width:10%">                                             <button name="roll_Dodge" type="roll" value="/w gm @{DodgeRoll}"></button>                                         </div>                                         <div class="sheet-item" style="width:17%;">                                             <input name="attr_DodgeMod" type="number" value="0" style="text-align: center;" />                                         </div>                                     </div>                                 </td>                                 <td class="sheet-grayborders"><input name="attr_Dodge1" type="checkbox" value="20"></td>                                 <td class="sheet-grayborders"><input name="attr_Dodge2" type="checkbox" value="10"></td>                                 <td class="sheet-grayborders"><input name="attr_Dodge3" type="checkbox" value="10"></td>                                 <td class="sheet-grayborders"><input name="attr_Dodge4" type="checkbox" value="10"></td>                             </tr>
YAY! It works! Thank you very much.