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, and using roll tables, Need fix?

I'm trying to create an random power generator, /w gm &{template:simple} {{rname=Powers Lotto}} {{?{Choose One|Major Power, #MajorPowers|Minor Power, #MinorPowers} }} &{template:default} {{name=Major Powers Roll}} {{ ?{Powers |Major Def, [[1t[MajDef]]]|Major Off, [[1t[MajOff]]]|} }} &{template:default} {{name=Minor Powers Roll}} {{ ?{Powers |Minor Def, [[1t[MinDef]]]|Minor Off, [[1t[MinOff]]]|} }}
Hey, still need help getting the first drop box to call the Major or Minor, then Off/Def
1605139909
Oosh
Sheet Author
API Scripter
Firstly, you can't nest a template inside a template. Before your first macro runs, the #MajorPowers macro links are expanded to the actual contents, So what you've actually written is this: /w gm &{template:simple} {{rname=Powers Lotto}} {{?{Choose One|Major Power, &{template:default} {{name=Major Powers Roll}} {{ ?{Powers |Major Def, [[1t[MajDef]]]|Major Off, [[1t[MajOff]]]|} }}|Minor Power,&{template:default} {{name=Minor Powers Roll}} {{ ?{Powers |Minor Def, [[1t[MinDef]]]|Minor Off, [[1t[MinOff]]]|} }}} }} Which (no offence) is an unholy tangle of conflicting templates and Query characters. If you need this to be modular (i.e. you will be adding more options later, on top of Major and Minor) then I would strongly suggest a Chat Menu i nstead. If this is all the content that you're going to have, I would get rid of the nesting and just make a single macro with 4 drop-down options. /w gm &{template:default} {{name=Powers Lotto}} {{[[1t[?{Choose one| Major Def,MajDef| Major Off,MajOff| Minor Def,MinDef| Minor Off,MinOff}]]]}}
Okay, thank you, what I was using was a complete mess, and I all need to do was seed the 1t before the ?{Menu option...