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 .
×

Macro reformatting itself

1533175943

Edited 1533176127
I have been trying to create a macro that uses a template and gives a drop down menu option and the one I have works fine for a few minutes, but after a few minutes it will somehow reformat itself and the macro breaks. It is for magic missile in DnD 5E to select it at different levels, and since it is a spell that has multiple potential targets I have it roll for each potential target at once. The macro I currently have that allows for this is: &{template:default} {{name=?{Weapon |Magic Missile Lv 1,Magic Missile Lv 1}} {{[[1d4+1]] force [[1d4+1]] force [[1d4+1]] force |Magic Missile Lv 2,Magic Missile Lv 2}} {{[[1d4+1]] force [[1d4+1]] force [[1d4+1]] force [[1d4+1]] force |Magic Missile Lv 3,Magic Missile Lv 3}} {{[[1d4+1]] force [[1d4+1]] force [[1d4+1]] force [[1d4+1]] force [[1d4+1]] force |Magic Missile Lv 4,Magic Missile Lv 4}} {{[[1d4+1]] force [[1d4+1]] force [[1d4+1]] force [[1d4+1]] force [[1d4+1]] force [[1d4+1]] force } }} However after a few minutes it will reformat to and break the drop down/template is: &{template:default} {{name=?{Weapon |Magic Missile Lv 1,Magic Missile Lv 1}} {{[[1d4+1]] force [[1d4+1]] force [[1d4+1]] force |Magic Missile Lv 2,Magic Missile Lv 2}} {{[[1d4+1]] force [[1d4+1]] force [[1d4+1]] force [[1d4+1]] force |Magic Missile Lv 3,Magic Missile Lv 3}} {{[[1d4+1]] force [[1d4+1]] force [[1d4+1]] force [[1d4+1]] force [[1d4+1]] force |Magic Missile Lv 4,Magic Missile Lv 4}} {{[[1d4+1]] force [[1d4+1]] force [[1d4+1]] force [[1d4+1]] force [[1d4+1]] force [[1d4+1]] force } }} I have no idea why it would be reformatting itself in this way, and whether this post belongs here or in the bugs section; but it hasn't been the only issue I've experienced today, with the particular campaign I'm adding this to not allowing any new posts until I cleared the chat log. I've had this happen on multiple computers using both Chrome and Firefox, and even on two different local networks, which is why I think it might be just a formatting issue rather than a bug. Also sorry guys, don't know how to do that fancy box with the scroll bar to make the macro look pretty.
This is a problem I ran into myself, some time ago, and it caused all kinds of trouble and confusion until we realized the core issue: If you make a macro using the html code (ie: &#125 etc), it will save properly, and work properly, and all is well. UNTIL you try to OPEN that macro again (even just to look!) At this point, the system will automatically convert that code, and your macro will no longer work! There is no good workaround for this, as far as I know.
1533182195

Edited 1533182337
GiGs
Pro
Sheet Author
API Scripter
This reformatting doesnt happen if you put the macro in an Ability on a character sheet. Players writing their own macros can just create them on their own character. What a lot of GMs do is create a new Character, name it Macros, and put their macros there as an Ability. Some macros will need rewriting a little to work from an Ability, but the example listed above will work fine with no changes.  If it's a macro that players need access to, you also need to make the Macro Character visible to players. If you dont like this, you could simply use the Macros Character as a backup. Run the macro as normal from the Macros section, and keep a copy on the Macros character so that if you ever accidentally edit the Macro in use, you have a backup to restore it from.
Thank you both very much for your replies, and Phnord your answer in particular helped me realize what exactly is going on. I had been searching around for how to do something similar to what I had managed to macro, and settled on what I had found since it worked well enough for what I wanted it for; since I was basically just copy/pasting and editing to experiment with whatever I could find to make it work I hadn't fully understood exactly what I was using to make it work. It's interesting that &#125 in HTML just indicates a closing curly brace (which is why it would get converted as such) but with an actual closing curly brace it stops functioning! In future I suppose I will just need to keep a master list of macros outside the system since I constantly refer back to previous ones in order to make new ones. G G, the extra information you provided will certainly be useful in future as well, and I will certainly look into implementing what you have suggested.
Seidr said: ... and Phnord your answer in particular helped me realize what exactly is going on. Heh... it was GG who (eventually!) figured out the problem I was having and helped me realize what exactly was going on! I've ended up doing what GG suggests, and creating a Macro character to hold abilities and stuff like that. It really helps a lot!
I will certainly need to look more into character sheets using this platform, then. I'm currently running Curse of Strahd with a live group but I use roll20 to display map information and figured it would be easier to put macros in for Ezmerelda, Strahd, and other significant characters which was the whole reason I started looking into these sorts of macros. I've also run a campaign that was entirely on here, and we're all kind of learning this system together; currently one of the previous players is the DM in the current campaign for that group and this information will be immensely helpful, so thank you both one again!
1533225847

Edited 1533225892
MyRoll20Stuffs
API Scripter
Phnord Prephect said: Heh... it was GG who (eventually!) figured out the problem I was having and helped me realize what exactly was going on! I've ended up doing what GG suggests, and creating a Macro character to hold abilities and stuff like that. It really helps a lot! I never thought to take that approach. (Which is odd because I did this with "Attacks" as you'll see explained below) I may do something like this in the future but I haven't had any issue with macros because I have them ALL saved in a text file that I can copy / paste into the macro text area when I make a change. I did, however, make a character named "Attacks" which contains the most commonly used weapon attacks / natural weapon attacks / spells / abilities and so on using my heavily customized template so that when I make a new character from scratch if I don't want to duplicate an existing one I have a sheet I can reference and copy macros from to put on the new character.