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

Nesting Macros with Templates and Roll Tables

1587760444
Christopher K
Plus
Marketplace Creator
It might be my ignorance of R20 or the tendency of my brain to default to javascript syntax but I'm having some difficulty creating a macro to call other macros with templates. The Goal I want to give my players a drop down menu that serves up fun, flavored fumble text when they crit fail. The Setup I created three Roll Tables representative of three attack types: Spells, Melee and Ranged. Additionally, I've created 3 macros that call said tables individually. For example: &{template:npcaction} {{rname= Critical Failure! }} {{name= You done effed up }} {{description= [[1t[CritFumble_Spell]]]}} That works great. I get the flavor text in the chat window formatted all pretty like in the npcaction template. The Problem I start running into issues when I try create the drop down that calls those macros. I started simply with: &{template:npcaction}{{desc= ?{Choose an Attack Type|Spell,#rollFumbleSpell|Melee,#rollFumbleMelee|Ranged,#rollFumbleRanged}} } Drop down looks good. I get the three choices, but submitting any of them only display the little red line associated with the template and nothing else. I've tried a bunch of combos, changing syntax like adding spaces before hashtags or braces and what have you, but either it remains the same or gets worse by breaking the dropdown. For example, if I add spaces before the # and after the macro name (before the |) the drop down breaks and no longer displays the choices, but submitting gives me the flavored styled text. I tried doing the long form and escaping characters where necessary, but that just seemed to make things worse and more complicated. So, before I go look up how to do the whisper route, I thought I'd ask the code gurus here. 'preciate any help.
1587762340

Edited 1587762356
Kraynic
Pro
Sheet Author
Instead of doing a dropdown, you might want to consider a chat menu, which is much easier to put together and alter as needed.&nbsp; If you haven't checked out the Stupid Roll20 Tricks thread (pinned at the top of this forum), you should.&nbsp; Chat menus are one one of the tricks on there.&nbsp; You might also consider the macro character (so you can vault it from game to game as needed) which is listed right after chat menus in the index (first post).&nbsp; The direct link to the chat menus post: <a href="https://app.roll20.net/forum/permalink/5927072/" rel="nofollow">https://app.roll20.net/forum/permalink/5927072/</a>
1587766864
Christopher K
Plus
Marketplace Creator
That was next step if I couldn't get this working right. I feel like I'm really close to get it the way I initially described. I swapped around spaces between things and got to a point where it would give me most of the stylized text ("you done effed up" but not the "Critical X Failed" text about it and the Roll table it pulled from was always only the last one added.
1587767627
Christopher K
Plus
Marketplace Creator
I should also mention in case it wasn't obvious that I'm using the free account and limited in terms of API usage. If it matters.