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

Drop Down Menu with modifier macro

I am trying to create a Drop Down Menu with a modifier option for a Rifts game I am currently running. I have a the macro down but it seems I cannot get it to ask for a modifier properly. I can make it work with individual rolls but not in this menu format. Any help will be appreciated. WHAT I HAVE: ?{Choose Your Save? | Spell, vs Spell:= [[1d20]] | Ritual, vs Ritual:= [[1d20]] | Psionics, vs Psionics:= [[1d20]] | Poison/Toxin, vs Poison/Toxin:= [[1d20]] | Insanity, vs Insanity:= [[1d20]] | Horror Factor, vs Horror Factor:= [[1d20]] | Possession, vs Possession:= [[1d20]] | Coma/Death, vs Coma/Death:= [[1d100]]} WHAT I WANT: ?{Choose Your Save? | Spell, vs Spell:= [[1d20 + ?{Modifier?}]] etc, etc.
1462769259

Edited 1462769309
When nesting roll queries you need to use HTML entities to replace the ending brackets } with & #125; see&nbsp; <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>
After replacing the ending bracket } with&nbsp; & #125; &nbsp; I am now running into a different issue. When I run the macro it gives me the drop down list and then a modifier box with another drop down list, then a standard modifier box. When the modifier is typed in the macro runs for all items on the drop down list instead of the one I selected. Can you provide an example of how this should be setup please. ?{Choose Your Save? | Spell, vs Spell:= [[1d20 + ?{|Modifier?}&#125;]] | Ritual, vs Ritual:= [[1d20 + ?{|Modifier?}&#125;]] | Psionics, vs Psionics:= [[1d20 + ?{|Modifier?}&#125;]] | Poison/Toxin, vs Poison/Toxin:= [[1d20 + ?{|Modifier?}&#125;]] | Insanity, vs Insanity:= [[1d20 + ?{|Modifier?}&#125;]] | Horror Factor, vs Horror Factor:= [[1d20 + ?{|Modifier?}&#125;]] | Possession, vs Possession:= [[1d20 + ?{|Modifier?}&#125;]] | Coma/Death, vs Coma/Death:= [[1d100]]}
I don't think you want a dropdown on the modifier query. Change it to ?{Modifier&amp;#125; and leave it at that. I think that will solve your issue.&nbsp;
1462804707
Ziechael
Forum Champion
Sheet Author
API Scripter
If the modifiers are attribute values you could hardcode ( @{selected|death-save} etc...) them since they are all separated out, then for additional modifiers (temporary or infrequent ones) follow Ed's advice to have a simple query that can allow for a value to be entered rather than using a further drop-down.
1462813824

Edited 1462815382
@Ed S. Thank you, that fixed the issue. I was leaving the closing bracket and replacing the ending bracket instead of removing/replacing both with &#125; @Ziechael Unfortunately, the Rifts systems have static saving throws with modifiers coming for race / class / misc. That's why I was trying to setup the dropdown this way.
1462815025

Edited 1462815130
I generally recommend that elements common to every drop-down field of a Roll Query be factored out. e.g. ?{Q|A, [[1d20 + 1]]|B, [[1d20 + 2]]|C, [[1d20 + 3]]} → [[ 1d20 + 1 + ?{Q|A, 0|B, 1|C, 2} ]] So, instead of bothering with Advanced stuff in this instance, I'd recommend using this: Save vs ?{Choose Your Save?| Spell, Spell:= [[ 1d20 | Ritual, Ritual:= [[ 1d20 | Psionics, Psionics:= [[ 1d20 | Poison/Toxin, Poison/Toxin:= [[ 1d20 | Insanity, Insanity:= [[ 1d20 | Horror Factor, Horror Factor:= [[ 1d20 | Possession, Possession:= [[ 1d20 | Coma/Death, Coma/Death:= [[ 1d100 } + ?{Modifier?|0} ]]
1462815313

Edited 1462815560
That's even simpler, didn't think I could add the modifier query to the end of the overall macro. I'm still a bit new at this, but I tend to learn quickly.