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

Invoke roll template from handout link

1637349454

Edited 1637349539
I am aware that we can create links at Handouts and set their URLs so that they can roll Macros (E.g. `#my-macro-name} , inline rolls (E.g. `[[1d20+4]]) , or just type something in the chat (E.g. `/desc Hello from the handout!) I am also aware that macros can invoke rolltemplates and therefore a handout can invoke a macro that invokes a rolltemplate. However, I am interested to know if it is possible to invoke roll templates directly from links at handouts . The problem I am currently experiencing is that the URL seems to be escaping the character ":" and&nbsp; &amp;{template:my-template}&nbsp; becomes&nbsp; &amp;{template&amp;#58;my-template} When the link is pressed at the handout and it is sent to the chat, Roll20 does not seem to be able to recognize the template name. Can this be done?&nbsp; Any ideas? PS: The following user faced the same problem 3 years ago <a href="https://app.roll20.net/forum/post/6528875/rolling-from-handout/?pageforid=6740097#post-6740097" rel="nofollow">https://app.roll20.net/forum/post/6528875/rolling-from-handout/?pageforid=6740097#post-6740097</a>
1637366705
Oosh
Sheet Author
API Scripter
I'm not sure if it'll work - the only way to stop the colon from being URI escaped I can think of is to use an HTML entity escape - &amp;colon; But that doesn't get parsed when sent to chat form a handout, so it won't work. You have two options, as far as I can tell: 1. Use a macro 2. Buttonify what you send to chat, giving the parser an extra crack at unescaping. It means another click, unfortunately, so it's not very useful: `[link](`#&amp;amp;{template&amp;colon;default} {{name=stuff}} {{this=that}})
I can confirm that &amp;colon; does not work either. The buttonify approach would be preferred compared to create a macro for each link, however it does not seem to work as expected. I have also tried a third option: I opened the handout using the API and replaced the escaped colon. Unfortunately this breaks the link. It looks like I do not have an alternative to create macros.
Iniciativa+4 said: It looks like I do not have an alternative to create macros. You can reduce some of the macro work by making a single macro with the template which you then reference in the link. So you could have a macro #template with content &amp;{template:my-template} Then in your handouts use a link `#template {{name=stuff}} {{this=that}}
Your proposal works like a charm @RainbowEncoder!! This resolves my problem as I only need one macro for the template invocation and then I can pass different values to the variables of the template in different links.&nbsp; Awesome, thanks!