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

Chat freeze after using roll query that calls another macro

I've noticed an issue after using a roll query that calls another macro. The macros will work fine, but after I leave the game and return, chat does not work at all. I can type in the box, but nothing is posted, and rolls from character sheets, /r 1dX, and inline rolls don't work. To get it to work again, I have to clear the chat archive every time I leave the game. This occurs for me both as a player and a GM, in games that both do and don't have a sheet template.  In the game that has a sheet template, I'm using 5e OGL, and also had the same occur with other templates, namely atkdmg. I've recreated the issue on the latest builds of both Firefox (71.0 64-bit) and Chrome ( Version 79.0.3945.88 (Official Build) (64-bit) ) . The macros in question:  ?{Which Attack? |Scimitar, #Scimitar |Shillelagh, #Shillelagh } #Shillelagh: &{template:default} {{name=Crag's Shillelagh}}  {{To Hit=[[1d20+7]] / [[1d20+7]]}} {{ =5 ft range}}  {{Damage=[[1d8+4]] magical slashing}}  #Scimitar: &{template:default} {{name=Crag's Scimitar}}    {{To Hit=[[1d20+4]] / [[1d20+4]]}}  {{ =5 ft range}}  {{Damage=[[1d8+1]] slashing}}   Visually, when I re-enter an affected game before I clear the chat archive, any rolls using templates that were previously in chat have collapsed, showing only the top "line" of the template (such as a thin purple bar for the default template), and trying to roll any macros/sheet rolls with templates sometimes creates new collapsed template rolls in chat, although they don't always seem to show up.  For posterity, I'm doing macros like this for a game in which the DM has set up a sheet-free game.  EDIT: See below - The macros alone (not the roll query) also cause the issue (with proper closed brackets of course); Returning to the game before clearing chat archive, opening the called macros, replacing the resolved brackets with html replacements, and running the query macro again also causes the issue to persist. 
1577040522
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
This is likely caused by the Roll20 parser resolving the html replacements in your macros if they are closed and opened again. It shouldn't  happen just from re-entering a game, but I don't know what else you might have done. Does anyone else in the game (the GM you mention, maybe?) have access to the macros who might have opened them to "take a look" and closed them again? Two solutions spring to mind: 1) Keep a pristine copy of the macros in a text file somewhere that you use to make edits and updates. Or, 2) Use Character Abilities instead, which do not resolve html replacements.
So far, I'm the only one (plus my wife's account that I have access to) in the games - both accounts and both games each this affects. I've been using a pair of games I've created just for character and macro generation, and they're the ones I'm having issues with.  I haven't copied the macros to the game I'm actually playing in as I don't want the GM to have to deal with it.  I've got the macros saved in a text file and replace them using the html replacements each time I open them. EDIT: Even before clearing the chat archive, if I go to the game(s) and open the macros and replace the closing brackets with the HTML replacements, the issue persists.  BUT, I just found that the two macros above are also causing the same problem alone. I went ahead and opened them both, allowing them to resolve the html replacements, then just tried to run them by themselves. They worked fine. I left the game and re-entered it, and the issue returned.  I would use character abilities, but the game I'm actively playing in has no character sheets - we're using external methods of character tracking. Is that possible without a sheet? 
1577045491

Edited 1577056353
vÍnce
Pro
Sheet Author
Not sure what exactly would cause the issues you are describing... ;-(  I agree with Keith that it would probably be better to create these as ability macros (you can do this even without a sheet since you would use the attributes/abilities tab). If you want to stick with a global macro, maybe use a Chat menu instead of a query. You'll still need some substitutions on the primary macro( !
# used to call each secondary macro), but the secondary macros won't need them since you aren't using a query to call them...  Just an option. #which-attack &{template:default}{{name=Attacks}}{{=[Scimitar](!
#Scimitar) [Shillelagh](!
#Shillelagh)}} #Shillelagh &{template:default} {{name=Crag's Shillelagh}}  {{To Hit=[[1d20+7]] / [[1d20+7]]}} {{ =5 ft range}}  {{Damage=[[1d8+4]] magical slashing}} #Scimitar &{template:default} {{name=Crag's Scimitar}}    {{To Hit=[[1d20+4]] / [[1d20+4]]}}  {{ =5 ft range}}  {{Damage=[[1d8+1]] slashing}}