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 Properties - Embedded in a URL

1616584130

Edited 1616584166
Mike
Sheet Author
I found an exploit where you could use the Roll Template Properties inside a url. This allowed a set of dice icons to be switched through the following options. d4-blank-280x280.png d6-blank-280x280.png d8-blank-280x280.png d10-blank-280x280.png d12-blank-280x280.png d4-blank-280x280-hitch.png d6-blank-280x280-hitch.png d8-blank-280x280-hitch.png d10-blank-280x280-hitch.png d12-blank-280x280-hitch.png Using the properties in the URL calling these images to change the dice value and to add -hitch if the result #rollWasFumble. &lt; div class =" sheet-rolltemplate-result " style =" background-image: url(<a href="https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/CortexPrime-Hammerheads/assets/d{{physical_dice_size}}-blank-280x280{{#rollWasFumble()" rel="nofollow">https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/CortexPrime-Hammerheads/assets/d{{physical_dice_size}}-blank-280x280{{#rollWasFumble()</a> physical}}-hitch{{/rollWasFumble() physical}}.png); " &gt; github link Something has changed since Monday - and now the {{properties}} in curly braces are being encoded before they are run, which means they are breaking the URL. When it worked it produced this kind of output - Now it produces this kind of output (font colour change was me trying something else) I'm considering alternative ways to do this. Possibly coding the different versions of the url call for each possible variation... this will cause a lot more code bloat. But I can see it as more stable. But I was really impressed with the discovery that embedding the logic in the URL call worked. Is this function going to be available again? Or was the exploit something that caused too many other issues and has had to be crushed? Just want to know how much work I need to redo.
1616584501
Mike
Sheet Author
Below is one block of the code First I check if the attribute being rolled is the first second or third option - #rollTotal() trait_name 1 Then I output the corresponding roll {{physical}} I have inline CSS add a background-image and use&nbsp; {{physical_dice_size}} &nbsp;and&nbsp; {{#rollWasFumble() physical}}-hitch{{/rollWasFumble() physical}} &nbsp;to edit the file name of the image to display the right dice icon behind the actual result of the roll. {{#rollTotal() trait_name 1}} &lt;div class="sheet-rolltemplate-result" style="background-image: url(<a href="https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/CortexPrime-Hammerheads/assets/d{{physical_dice_size}}-blank-280x280{{#rollWasFumble()" rel="nofollow">https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/CortexPrime-Hammerheads/assets/d{{physical_dice_size}}-blank-280x280{{#rollWasFumble()</a> physical}}-hitch{{/rollWasFumble() physical}}.png);"&gt; {{physical}} &lt;/div&gt; &lt;div class="sheet-rolltemplate-name"&gt; Physical &lt;br /&gt; &lt;span style="font-size: 0.75em; color: #b6b473"&gt;d{{physical_dice_size}}&lt;/span&gt;&lt;span style="font-size: 0.75em;"&gt; &amp;bull; Attribute&lt;/span&gt; &lt;/div&gt; {{/rollTotal() trait_name 1}} Hope this is a clear indication of what the code is meant to be doing. I get that this is not a common or ordinary application. But it worked. Now it doesn't. Will it work again?
1616664397
Mike
Sheet Author
Possibly this went to the wrong thread... or you're hinting that my code is so complex I might as well try these other complex ideas too. But I don't see how adding video, or running a cron job would solve this?
1616665420
Ziechael
Forum Champion
Sheet Author
API Scripter
New account, no time spent in game and a single post... spammer, bot or spambot... either way ignore the message and click that report button like I'm about to ;)