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

Links in roll templates

1582121078
David
Sheet Author
In the Official Roll20 CoC sheet how  exactly do the  bonus/penalty dice and pushed rolls work from the roll template results in chat . I cannot seem to find anything on placing links to  roll template macros anywhere.
1582124724
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
For those of us not in the know about CoC, can you give a little more explanation about what you're looking for?
1582125005

Edited 1582125025
David
Sheet Author
I have since posting figured most of it out. They are using  Ability Command Buttons. I am now trying to get it . Ability Command Button in the roll template to roll a hidden button on the sheet. 
1582126639
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Ah, yeah, that would be it.
1582126972
David
Sheet Author
How do reference a button on the sheet? This does not work. <button type="roll" id="test" name="test" value="&{template:default} {{msg=Hi there}}"></button> &{template:Roll} {{rollname=[Fumble](~@{character_name}|test)}} nor this &{template:Roll} {{rollname=[Fumble](~@{character_name}|sheet-test)}}
1582128114

Edited 1582128347
Andreas J.
Forum Champion
Sheet Author
Translator
David said: How do reference a button on the sheet? This does not work. To reference the wiki documentation on Buttons: the optional name -attribute allows the roll to be referenced in external Macros and Abilities. The name must be prefixed with roll_ for this to work, and each roll button should have a unique name. Buttons in repeating sections automatically gain a unique prefix/suffix in their name. To call a named roll button in the chat, it works similarly like calling a defined Ability macro from the A & A tab , e.g. %{Bob|BluffCheck} . This will call the "BluffCheck" button of the character named "Bob". Off course I'm not sure about the exact implementation in getting that worked into a roll template.
1582128249
David
Sheet Author
Figured it out the roll button name has to be prefixed with "roll_".&nbsp; It would be nice if this was referenced here&nbsp;&nbsp; <a href="https://wiki.roll20.net/Macros#Ability_Command_Buttons" rel="nofollow">https://wiki.roll20.net/Macros#Ability_Command_Buttons</a>
1582128543
Andreas J.
Forum Champion
Sheet Author
Translator
David said: Figured it out the roll button name has to be prefixed with "roll_".&nbsp; It would be nice if this was referenced here&nbsp;&nbsp; <a href="https://wiki.roll20.net/Macros#Ability_Command_Buttons" rel="nofollow">https://wiki.roll20.net/Macros#Ability_Command_Buttons</a> I've never used Ability Command Buttons nor about having buttons on roll templates, so if you with this new info can provide us with an example, I can update that section to include it.
1582128620
David
Sheet Author
Thank you Andrea I should have went and had lunch instead of&nbsp; BFIing my way through forum posts trying to figure it out.
1582128634

Edited 1582129054
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Just in case you are talking about in-game use, and not character sheet design code: If you are putting the button into an action (macro stored on a character sheet), you do not need to specify the character. This should work. [Fumble](~test) ...Assuming "test" is also a sheet ability. It should not matter if the called ability is custom or built-in. You can find out syntax options for different macro/ability combinations in the post on&nbsp; Chat Menus .
1582128815

Edited 1582128900
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
David &nbsp;said: Figured it out the roll button name has to be prefixed with "roll_".&nbsp; It would be nice if this was referenced here&nbsp;&nbsp; <a href="https://wiki.roll20.net/Macros#Ability_Command_Buttons" rel="nofollow">https://wiki.roll20.net/Macros#Ability_Command_Buttons</a> The information on sheet rolls is documented here
1582128906
David
Sheet Author
&lt;button type="roll" name="roll_test" value="&amp;{template:default} {{msg=Hi there}}"&gt;&lt;/button&gt; &amp;{template:Roll} {{rollname=[Fumble](~@{character_name}|test)}} &lt;rolltemplate class="sheet-rolltemplate-Roll"&gt; {{rollname}} &lt;/rolltemplate&gt;
1582129381
David
Sheet Author
Scott C. said: David &nbsp;said: Figured it out the roll button name has to be prefixed with "roll_".&nbsp; It would be nice if this was referenced here&nbsp;&nbsp; <a href="https://wiki.roll20.net/Macros#Ability_Command_Buttons" rel="nofollow">https://wiki.roll20.net/Macros#Ability_Command_Buttons</a> The information on sheet rolls is documented here It would be a lot more useful if the link to Sheet Roll buttons here&nbsp; <a href="https://wiki.roll20.net/Macros#Ability_Command_Buttons" rel="nofollow">https://wiki.roll20.net/Macros#Ability_Command_Buttons</a> &nbsp;was changed to the link you posted above &nbsp;as it gives a lot more required information than the Sheet Roll buttons entry.
1582130634

Edited 1582131677
Kraynic
Pro
Sheet Author
I'm not sure how that should be handled, because the link you are looking at was put there for players/DMs using an existing sheet.&nbsp; The link GiGs &nbsp;Scott&nbsp;gave you is for people creating a sheet.&nbsp; They are 2 very different use cases.
1582131572
GiGs
Pro
Sheet Author
API Scripter
Ahem, i think you meant Scott :)
1582131704
Kraynic
Pro
Sheet Author
GiGs said: Ahem, i think you meant Scott :) Oops!&nbsp; Fixed that.
1582131769
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Just to clarify, since there's some potential for misunderstanding here: David, are you talking about coding buttons into a roll template as part of designing a character sheet, or are you talking about putting buttons into a roll template as a user of said sheet in a game? Those are two entirely different things.
1582133276

Edited 1582133287
David
Sheet Author
keithcurtis said: Just to clarify, since there's some potential for misunderstanding here: David, are you talking about coding buttons into a roll template as part of designing a character sheet, or are you talking about putting buttons into a roll template as a user of said sheet in a game? Those are two entirely different things. I posted in the Character Sheet&nbsp; forum because I am working on a character sheet not macros or I would have posted it in&nbsp;Specific Use Questions &amp; Macros
1582133613
David
Sheet Author
Kraynic said: I'm not sure how that should be handled, because the link you are looking at was put there for players/DMs using an existing sheet.&nbsp; The link GiGs &nbsp;Scott&nbsp;gave you is for people creating a sheet.&nbsp; They are 2 very different use cases. Is there reference for&nbsp; Ability Command Buttons specifically for sheet creators only? I have already got it working and posted the functioning code.
1582134350
Kraynic
Pro
Sheet Author
The link Scott posted goes directly to the section (of a very long page) that speaks about creating roll buttons.&nbsp; There is nothing different about creating a roll button with a roll template, really.&nbsp; Your value just has to include the call for the template.&nbsp; In another section on that page is a link to another page dedicated to roll templates. The main page Scott provided is one about building character sheets:&nbsp;&nbsp; <a href="https://wiki.roll20.net/Building_Character_Sheets" rel="nofollow">https://wiki.roll20.net/Building_Character_Sheets</a> It contains a link for the roll templates:&nbsp;&nbsp; <a href="https://wiki.roll20.net/Roll_Templates" rel="nofollow">https://wiki.roll20.net/Roll_Templates</a> The pages you referred to earlier weren't providing info for sheet authors, but users of existing sheets, so the info they provided is different.&nbsp; It might cause confusion for there to be a link from user info direct to creator info.&nbsp; That is my only concern about changing that link.&nbsp; Do you see where I am coming from that there is a divide between info related to using sheets and creating sheets?&nbsp; The wiki generally keeps them separated.
1582140840
Andreas J.
Forum Champion
Sheet Author
Translator
David, if you provide some context with the snippet you just posted, why how it works, I can add it to the documentation on how buttons work in character sheets, which I linked already in my first reply, and which is linked in the related section in the "Building Character Sheets" article. <a href="https://wiki.roll20.net/Button" rel="nofollow">https://wiki.roll20.net/Button</a>