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 .
×
This post has been closed. You can still view previous posts, but you can't post any new replies.

Nesting templates into a query first worked, then broke the macro, then broke the campaign.

Hi, I've created a macro that would allow my players to select the type of grenade they wanted to throw and display all required rolls and some additional info in a template. At first everything worked as intended. Then the macro stopped working. Now my campaign is broken. Even /roll 1d20 does not work.&nbsp; The basic idea of the macro looked like this: ?{Grenade Type|Grenade Type 1, &{template:default&#125; {{name=Grenade 1&#125;&#125; {{Thrown by=@{selected|character_name} &#125;&#125;&nbsp;{{more stuff...&#125;&#125; |Grenade Type 2,&nbsp;&{template:default&#125; {{name=Grenade 2&#125;&#125; {{Thrown by=@{selected|character_name} &#125;&nbsp;{{more stuff...&#125;&nbsp;} At first it worked as intended. A query would asked for the grenade type and show the corresponding template. It looked like this: For some indeterminable reason it stopped working. The query would now have the options like &nbsp;"Grenade Type 1" and "0" selecting any would display parts of the macro "code" and sometimes parts of the template. Rolls in [[ ]] would execute as expected though.&nbsp; I opened the macro to fix it and noticed that all html entities are replaced by their corresponding characters, for example } instead of &#125;.&nbsp; I backed up the macro once a got it working, so no big deal. Deleted the macro; copy pasted from backup.&nbsp;It still wouldn't work. Typing out the except characters I just copy pasted got the macro working again. After a while, it broke again, showing the some behavior as before. &nbsp; Having lost 10+ hours of work, I was to frustrated to continue. The rest of the macros/rolls worked fine at this point. Coming back now to see what I can salvage form the macro, the campaign is completely broken. No macros, rolls or chat would show up in game. Even /roll 1d20 doesn't work, although it would show up in the external chat log.&nbsp; Tested on:&nbsp; Mac OS X 10.11 Chrome version 45.0.2454.101 (64-bit) and Safari version 9.0 (11601.1.56) Chromes debug console on starting up the campaign and only typing /roll 1d20:&nbsp; Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval' https://*.googlesyndication.com https://*.doubleclick.net https://*.googlesyndication.com <a href="https://www.googletagservices.com" rel="nofollow">https://www.googletagservices.com</a> https://*.googlesyndication.com <a href="https://www.google-analytics.com" rel="nofollow">https://www.google-analytics.com</a> https://*.googlesyndication.com <a href="https://d3clqjduf2gvxg.cloudfront.net" rel="nofollow">https://d3clqjduf2gvxg.cloudfront.net</a> https://*.googlesyndication.com https://*.firebaseio.com https://*.googlesyndication.com https://*.opentok.com https://*.googlesyndication.com <a href="http://www.google-analytics.com" rel="nofollow">http://www.google-analytics.com</a>". Either the 'unsafe-inline' keyword, a hash ('sha256-0ivVzesoPOexPIPAFShdIlWqBiAPfBy2Dq3xktftijk='), or a nonce ('nonce-...') is required to enable inline execution. Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval' https://*.googlesyndication.com https://*.doubleclick.net https://*.googlesyndication.com <a href="https://www.googletagservices.com" rel="nofollow">https://www.googletagservices.com</a> https://*.googlesyndication.com <a href="https://www.google-analytics.com" rel="nofollow">https://www.google-analytics.com</a> https://*.googlesyndication.com <a href="https://d3clqjduf2gvxg.cloudfront.net" rel="nofollow">https://d3clqjduf2gvxg.cloudfront.net</a> https://*.googlesyndication.com https://*.firebaseio.com https://*.googlesyndication.com https://*.opentok.com https://*.googlesyndication.com <a href="http://www.google-analytics.com" rel="nofollow">http://www.google-analytics.com</a>". Either the 'unsafe-inline' keyword, a hash ('sha256-v19duySXMwXd3zUU660hZgcRTRW_BoLT6eLuziV0Xdk='), or a nonce ('nonce-...') is required to enable inline execution. Refused to load the script 'data:application/javascript;base64,dmFyIHVyY2hpblRyYWNrZXI9ZnVuY3Rpb24oKXt9…JVcmw6ZnVuY3Rpb24obyl7cmV0dXJuIG87fSxfdHJhY2tFdmVudDpmdW5jdGlvbigpe319fX07' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval' https://*.googlesyndication.com https://*.doubleclick.net https://*.googlesyndication.com <a href="https://www.googletagservices.com" rel="nofollow">https://www.googletagservices.com</a> https://*.googlesyndication.com <a href="https://www.google-analytics.com" rel="nofollow">https://www.google-analytics.com</a> https://*.googlesyndication.com <a href="https://d3clqjduf2gvxg.cloudfront.net" rel="nofollow">https://d3clqjduf2gvxg.cloudfront.net</a> https://*.googlesyndication.com https://*.firebaseio.com https://*.googlesyndication.com https://*.opentok.com https://*.googlesyndication.com <a href="http://www.google-analytics.com" rel="nofollow">http://www.google-analytics.com</a>". 70 TOUCH SUPPORTED: false USING WEBGL ACCELERATION... WEBGL STARTUP SUCCESS select Switch mode to select Initializing new dice engine with randomness... Using random entropy Compiling sheet... Finding sheet rolls... window resize Final set zoom! UPDATE GL SIZE! Final set zoom! tuts loaded Mixed Content: The page at '<a href="https://app.roll20.net/editor/" rel="nofollow">https://app.roll20.net/editor/</a>' was loaded over HTTPS, but requested an insecure image '<a href="http://imgsrv.roll20.net/?src=i.imgur.com/rVbRWKo.png%3F2" rel="nofollow">http://imgsrv.roll20.net/?src=i.imgur.com/rVbRWKo.png%3F2</a>'. This content should also be served over HTTPS. Final page load. Refresh jukebox List! Auth'ed. Go post auth! initial setup refershing page listings! Scan for new plays! Got players value... joining game... Full load page! We have 4 pages I think I should be first? FIRST PLAYER: -K-JAi0Vm6F55QFsBxaM THREE.WebGLRenderer 69 1 1 Player -K-mmpDIddnWkR3h1fPe is offline... Player -K-nIFe2AY_2qpoQ6ZMi is offline... Player -K0CnUNunIQHRFg93nUU is offline... Deferred finish joining... Firebase Online Refresh Journal List! Search took 21ms handle page changes false refershing page listings! init active page! activate page! FULLY ACTIVATE VIEWS FOR PAGE. Graphics: 0 Paths: 0 Reorder by ZORDER Scan for new plays! refershing page listings! initiatlizing video chat Connecting to WebRTC Refresh jukebox List! Do refresh link cache! Reorder by ZORDER Swapping <a href="https://s3.amazonaws.com/files.d20.io/images/6268" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/6268</a>... to <a href="https://s3.amazonaws.com/files.d20.io/images/6268" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/6268</a>... Swapping <a href="https://s3.amazonaws.com/files.d20.io/images/1288" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/1288</a>... to <a href="https://s3.amazonaws.com/files.d20.io/images/1288" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/1288</a>... Swapping <a href="https://s3.amazonaws.com/files.d20.io/images/1276" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/1276</a>... to <a href="https://s3.amazonaws.com/files.d20.io/images/1276" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/1276</a>... Swapping <a href="https://s3.amazonaws.com/files.d20.io/images/1288" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/1288</a>... to <a href="https://s3.amazonaws.com/files.d20.io/images/1288" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/1288</a>... Swapping <a href="https://s3.amazonaws.com/files.d20.io/images/6266" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/6266</a>... to <a href="https://s3.amazonaws.com/files.d20.io/images/6266" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/6266</a>... setting src Swapping <a href="https://s3.amazonaws.com/files.d20.io/images/1280" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/1280</a>... to <a href="https://s3.amazonaws.com/files.d20.io/images/1280" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/1280</a>... Cols: 2 Rows: 2 Took 2ms to generate cache. setting src Reorder by ZORDER Refresh Journal List! Search took 159ms GET <a href="https://s3.amazonaws.com/files.d20.io/images/1290" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/1290</a>... 403 (Forbidden) Error loading image, probably due to cors. Trying once without CORS for <a href="https://s3.amazonaws.com/files.d20.io/images/1290" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/1290</a>... Updating character sheet values Uncaught Error: Syntax error, unrecognized expression: #sheet-rolltemplate-default {{name=Frag Grenade &lt;----------- macro code parts GET <a href="https://s3.amazonaws.com/files.d20.io/images/1290" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/1290</a>... 403 (Forbidden) Updating character sheet values Connected to session Someone just connected. It's us? Finished after going 2 levels deep. Begin processing op! Inline rolls complete! remote Roll! Found existing ID! Uncaught Error: Syntax error, unrecognized expression: #sheet-rolltemplate-default {{name=Frag Grenade &nbsp;&lt;----------&nbsp; window resize Final set zoom! UPDATE GL SIZE! Final set zoom! I hope you can help me get the campaign working again. My players expect me in 3 hours...&nbsp; Best regards!&nbsp;
1444560276
Ziechael
Forum Champion
Sheet Author
API Scripter
When html entities are used in macros they only get replaced with their equivalent when the macro is opened again as you found when going to debug it. However if this was the first time you had opened the macro and no-one else is likely to have then it shouldn't have broken... have you tried setting it as an ability for each of the players (abilities are sometimes more stable when using the nesting workaround)? Please note that is isn't intended behaviour to nest queries like this, just a fortunate bit of wizardry that allows for some awesome macros like yours. As for your chat breaking? I would fully reset the chat archive (on the game settings page as opposed to the in game settings tab), you can back it up first by using 'select all' and copying/pasting it into a text programme if you need any of the information in it. If nothing else it may get the game up and running again for you. Thanks for providing the console log, it will be easier for the developers to identify any potential issues with that.
1444574735

Edited 1444576461
I had the same problem. I resolved it by changing the character sheet that I was using, and then re-joining the game as a player (in options, at the bottom). Maybe re-joining is enough (I would say probably, because you are not using a custom rolltemplate) For the macro thing, you can create an ability and call it from a macro. This is probably the best way to do it.&nbsp; Note that playing with html in macro seems to be the problem here (I was doing that too before my game start to break), so I wouldn't recommend leaving any html entity in macro (ability is fine) until it's fixed.
Following your advice, I was able to get the campaign running again and the session went without further trouble.&nbsp; I now have a macro for each type and assign them to each (N)PC as abilities. It's time consuming but works. Thanks a lot!
1444638476
Ziechael
Forum Champion
Sheet Author
API Scripter
The main thing is that the session went ahead in time and ok... I just hope the dice gods favoured you for all the effort GM's go to give that bit of happiness to their players :) As this is now 'resolved' I'll close this thread, feel free to open a new one if you have any further issues.