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

[5e OGL] Small issue with a macro

So, I've been using the OGL sheets for quite some time, and have used a macro for my NPC character saves. But something has gone wrong with it, if I open the macro and save it, it works fine in one campaign, not in another, copying it leads to it breaking somehow.  The macro in question is: &{template:simple} {{rname=SAVE}} {{mod=?{Save| STR,[[ {0@{selected|npcd_str_save}, @{selected|strength_mod}}kh1 ]] [STR]| DEX,[[ {0@{selected|npcd_dex_save}, @{selected|dexterity_mod}}kh1 ]] [DEX]| CON,[[ {0@{selected|npcd_con_save}, @{selected|constitution_mod}}kh1 ]] [CON]| INT,[[ {0@{selected|npcd_int_save}, @{selected|intelligence_mod}}kh1 ]] [INT]| WIS,[[ {0@{selected|npcd_wis_save}, @{selected|wisdom_mod}}kh1 ]] [WIS]| CHA,[[ {0@{selected|npcd_cha_save}, @{selected|charisma_mod}}kh1 ]] [CHA] }}} {{r1=[[ 1d20 + ?{Save} ]]}} {{normal=1}} Anyone have any idea where the issue could be?
1508678209
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
I'm guessing that you have this saved as a global macro. The global macro editor eats html entities when reopened. See the advanced roll query wiki section for full details on this, but the short version is that you need to replace the commas and end curly braces that are part of the kh syntax with their html code. Note that I highly recommend saving macros like this as character abilities as the abilities editor does not eat the html code. wiki entry:<a href="https://wiki.roll20.net/Macros#Advanced_Usage_for_Roll_Queries" rel="nofollow">https://wiki.roll20.net/Macros#Advanced_Usage_for_Roll_Queries</a>
I cannot say I understand what you told me to do, but I did it, and it fixed it. Thank you for the quick and helpful response! i will endeavor to save it somewhere that it won't be gobbled up by copying games in the future!
The global macro editor is really awful for anything complicated.&nbsp; The macros on the attribute and abilities tab of character sheets are much better behaved.&nbsp; I have a couple of character sheets dedicated to macros.&nbsp; Then I can put a short macro in the global editor that calls the macros in the character sheets, even when those characters are not on the tabletop.&nbsp; I also doctored the character sheets I use with my favorite macros, to make a sheet called "character template," and when I create a new character or NPC, instead of using the plus sign, I duplicate my customized template complete with macros.
1508690057

Edited 1508690121
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Valerie M. said: The global macro editor is really awful for anything complicated.&nbsp; The macros on the attribute and abilities tab of character sheets are much better behaved.&nbsp; I have a couple of character sheets dedicated to macros.&nbsp; Then I can put a short macro in the global editor that calls the macros in the character sheets, even when those characters are not on the tabletop.&nbsp; I also doctored the character sheets I use with my favorite macros, to make a sheet called "character template," and when I create a new character or NPC, instead of using the plus sign, I duplicate my customized template complete with macros. This is a very good tip for people to use. We should really add it to the wiki. Ivy K. said: I cannot say I understand what you told me to do, but I did it, and it fixed it. Thank you for the quick and helpful response! i will endeavor to save it somewhere that it won't be gobbled up by copying games in the future! Advanced roll queries are very confusing the first dozen or so times you work on making a macro with them. After that they just become frustrating as you realize you forgot an html code somewhere. Glad you understood my ramble well enough to get the fix in though. Happy rolling.