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

[Macro Fu] Nesting Drop Downs

1481532875

Edited 1481533854
Andrew C
Marketplace Creator
Is it possibly to nest a drop down in a drop down? They are being used inside a roll template. Such as... Which do you want? A, B or C A: (do stuff) B: Do you have this bonus? Yes (5), No (0) (do stuff) C: Do you have Bonus 1? Yes (1), No(0). Do you have Bonus 2? Yes (8), No (0) Because I get strange outputs from doing it with the standard sort of character replacements. EDIT: I've tinkered with it some more. And the FIRST option in the drop down is buggy, but the rest work fine. No apparent reason. EDIT 2: The code block has reverted my HTML replacements. I'll try get it sorted again. That damned stuff drives me nuts all the time.  Lines starting with }} are HTML replaced, and the | at the end of a 'block' is HTML replaced, } and | within an inline roll are also HTML replaced.  What I am hoping is to replace ?{Read Minds Yes = 4|0} with ?{Read Minds|Yes, 4|No, 0} (and suitable HTML replacements made of course). /w gm &{template:DnD35StdRoll} {{name=@{selected|token_name} }} {{skillflag=true}} ?{Which skill | Bluff, {{subtags=lies, and deceives }} {{check=Bluff }} {{checkroll= [[1d20 +[[@{selected|npcbluff} +?{Read Minds Yes = 4|0} +?{Modifier|0}]] ]] }}| Diplomacy, {{subtags= charms and negotiates }} {{check=Diplomacy }} {{checkroll= [[1d20 + [[@{selected|npcdiplomacy} +?{Modifier|0}]] ]] }}| Disguise, {{subtags=attempts to become someone else }} {{check=Disguise }} {{checkroll= [[1d20 + [[@{selected|npcdisguise} +?{Acting Yes =2 } +?{Shapechanged Yes=10|0} +?{Read Minds Yes=4|0} +?{Modifier|0}]] ]] }}| Intimidate, {{subtags=threatens one of the party }} {{check=Intimidate }} {{checkroll= [[1d20 + [[@{selected|npcintimidate}+?{Modifier|0}]] ]] }}| Listen, {{subtags=pays attention for sounds }}{{check=Listen }} {{checkroll= [[1d20 + [[@{selected|npclisten} +?{Modifier|0}]] ]] }}| Sense Motive, {{subtags=watches for giveaway signs }} {{check=Sense Motive }} {{checkroll= [[1d20 + [[@{selected|npcsense} +?{Modifier|0}]] ]] }}| Spot,{{subtags=stays observant }} {{check=Spot }} {{checkroll= [[1d20 + [[@{selected|npcspot}+?{Modifier|0}]] ]] }} }
1481548814
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
You need to replace all three of the problem characters; end curly braces, bars, and commas. But do not replace these characters if they are part of an attribute or ability call. I'm guessing that you missed the need to replace the commas since your first option is the only one with a comma in the value text.
1481571524
Andrew C
Marketplace Creator
Yeah I wasn't thinking you had to strip the commas out of the {{Subtags= }} sections either.
1481577442
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Heh, I forget at least one character (usually buried a couple nesting levels deep) every time I make a big nested macro. It's always a pain the arse to hunt down.