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 with multiple outcomes - Necklace of Prayer Beads

Hi all, Tricky question here... I'm new to all this and I appreciate this may be making this more complicated than necessary but if anyone is able to help that would be amazing! I'm trying to create a macro to determine both the number of beads remaining on a necklace of prayer beads (1d4 + 2), which will in turn determine the spells contained within each of those beads: This is what I have come up with so far... Rollable Table:  Prayer-Necklace-Spells Outcomes:  Weight 6:   Bless Weight 6:   Cure Wounds Weight 6:  Lesser Restoration Weight 2:  Greater Restoration Weight 2:  Branding Smite Weight 1:  Planar Ally Weight 1:  Wind Walk Macro: #Prayer-Necklace-Bead-No Code: [[1d4+2]] Macro: Necklace-of-Prayer-Beads Code: &{template:default}{{name=Necklace of Prayer Beads}}{{You found a Necklace of Prayer Beads with #Prayer-Necklace-Bead-No beads remaining!}} &{template:default}{{name=Beads}}{{[[ _ insert_answer_here?_ t[Prayer-Necklace-Spells]]]}} _insert_answer_here?_ Right now I can't work out how to have the #Prayer-Necklace-Bead-No  macro determine how many times the t[Prayer-Necklace-Spells] table rolled. Secondly, at the moment when I roll the  t[Prayer-Necklace-Spells], say, 3 times, only the first result shows on the chat output (if you hover over, however, the others will show): For the screenshot example above I have the #Prayer-Necklace-Bead-No Macro rolling the 4 , and I have keyed in the 3  for the t [Prayer-Necklace-Spells] table. Can anyone help with these issues I'm having? Please let me know if you need anything clarifying! Many thanks in advance!
1628784244
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Doing it seemlessly is unfortunately beyond the scope of basic macros. However, we can get a pretty easy use flow for it. For this to work well, I really recommend using a macro mule . But, you'll need to two macros and your rollable table: NumberBeads &{template:default} {{Number of Beads=[[1d4+2]]}} {{[Roll Bead Types](~beadSpells)}} beadSpells &{template:default} {{name=Beads}} {{Bead [[[{1,?{roll}}kl1]]](#)=[[1t[Prayer-Necklace-Spells] ]]}} {{Bead [[[{2,?{roll}}kl1]]](#)=[[1t[Prayer-Necklace-Spells] ]]}} {{Bead [[[{3,?{roll}}kl1]]](#)=[[1t[Prayer-Necklace-Spells] ]]}} {{Bead [[[{4,?{roll}}kl1]]](#)=[[1t[Prayer-Necklace-Spells] ]]}} {{Bead [[[{5,?{roll}}kl1]]](#)=[[1t[Prayer-Necklace-Spells] ]]}} {{Bead [[[{6,?{roll}}kl1]]](#)=[[1t[Prayer-Necklace-Spells] ]]}} You'll call numberBeads, which will output the number of beads for the necklace. Then you'll click on the button to roll the bead types. It will present a query prompt for the number, and will only display a number of bead table rolls based on the number you entered. I tried getting the roll value to feed into the button automatically, but couldn't get it to work. This is all based on Oosh's overwriting template fields trick . And, finally a note. If you don't go with a macro mule character, you'll need to change the button format to an API button call, and then never ever open numberBeads in the global macro editor again or it will eat the html replacements that are needed for the API button call.
Legend, thank you so much!