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

D&D 5e Drop Down macro help.

I'm trying to build a kind of complex macro and I'm trying to figure out if it's possible with the way the macro system works as of right now.  So this macro is for the homebrew Blood Hunter class, its suppose to ask in this order: What attack you want to do (Rapier or Green Flameblade ), If you activated your Crimson Rite (Yes or No), and the part I'm having trouble with what Crimson Rite you activated (Flame, Ice, Lightning,etc.) This is what I have right now. /me The hunter strikes... ?{Which Attack are you using?| Rapier, [[1d20 + @{selected|ATK Bonus} [Attack Bonus]]] / [[1d20 + @{selected|ATK Bonus} [Attack Bonus]]] vs AC [[1d8+ 2 + @{selected|STR Mod}]] ?{Did you activate your Rite?|Yes, Piercing Damage [[1d8]] Additional if Crit [[@{selected|Rite Damage Dice}]] Rite damage [[@{selected|Rite Damage Dice}]] Additional if Crit|No, Piercing Damage [[1d8]] Additional if Crit}| Rapier Green-Flame Blade, [[1d20 + @{selected|ATK Bonus} [Attack Bonus]]] / [[1d20 + @{selected|ATK Bonus} [Attack Bonus]]] vs AC [[1d8+2+ @{selected|STR Mod}]] ?{Did you activate your Rite?|Yes, Piercing Damage [[1d8]] Additional if Crit [[1d8]] Fire Damage [[1d8]] Additional if Crit [[@{selected|Rite Damage Dice}ro<1]] Rite damage [[@{selected|Rite Damage Dice}ro<1]] Additional if Crit|No, Piercing Damage [[1d8]] Additional if Crit [[1d8]] Fire Damage [[1d8]] Additional if Crit}} I have tried replacing the Rite Damage dice section of the macro with this macro but I can't get it to work. Any recommendations or is this not possible? ?{Rite Type|Fire,[[@{selected|Rite Damage Dice}ro<1]] Fire |Cold,[[@{selected|Rite Damage Dice}]] Cold|Acid,[[@{selected|Rite Damage Dice}]] Acid|Lightning,[[@{selected|Rite Damage Dice}]] Lightning|Thunder,[[@{selected|Rite Damage Dice}]] Thunder}
What I would do is split it into separate queries rather than continuing to nest the queries together. For example I see that each attack rapier/green-flame have nothing to do with whether you activate your rite, or not. So we can make that separate. It also makes it so that you do not have to have a rite query within each attack type. I would also suggest that you only put the differences inside of the queries rather than everything. For example, regardless of attack, you are still rolling to see if you hit and are rolling piercing damage for the rapier. So now I see that we can simplify your macro to this basic structure. [[To Hit]] | [[To Hit]] vs Ac [[Rapier Damage]] [[Rapier Crit Damage]] ?{Green Flame?} ?{Did you activate your Rite?} The first part is simple and can basically be copy-pasted from your original. [[1d20 + @{selected|ATK Bonus}[Attack Bonus] ]] / [[1d20 + @{selected|ATK Bonus}[Attack Bonus] ]] vs AC [[1d8 + 2 + @{selected|STR Mod}[Strength Mod] ]] Piercing Damage [[1d8]] Additional if crit Now we need the queries that will possibly add to this damage ?{Which attack are you using? |Rapier,  |Green-Flame Blade, [[1d8]] Fire damage [[1d8]] Additional if crit } Notice that it is perfectly ok for us to have the normal rapier not actually have a value in this query. We already have accounted for in the previous section so when you select rapier it will in essence just pass over this query.  Also notice that I purposefully separate each of the options to separate lines. This is a great way to visually separate the macro for your ease of making changes and it makes it much easier to distinguish each option in the query. It has no impact when the macro is run. Finally the Rite. First I will put the original rite query, then we will break it down to how to change it for your new query. ?{Did you activate your Rite? |Yes, [[@{selected|Rite Damage Dice}ro<1]] Rite damage [[@{selected|Rite Damage Dice}ro<1]] Additional if crit |No, } Again, we have a blank option and that's ok. So when we put all of these together we get [[1d20 + @{selected|ATK Bonus}[Attack Bonus] ]] / [[1d20 + @{selected|ATK Bonus}[Attack Bonus] ]] vs AC [[1d8 + 2 + @{selected|STR Mod}[Strength Mod] ]] Piercing Damage [[1d8]] Additional if crit ?{Which attack are you using? |Rapier,  |Green-Flame Blade, [[1d8]] Fire damage [[1d8]] Additional if crit } ?{Did you activate your Rite? |Yes, [[@{selected|Rite Damage Dice}ro<1]] Rite damage [[@{selected|Rite Damage Dice}ro<1]] Additional if crit |No, }
Ok, now that we have things separate, let's look at changing the Rite Query to be able to specify the Damage Type. For this, I think it would be easiest to use  HTML Equivalents to nest the type query inside the Rite Query. It's basic structure is going to be ?{Did you activate your Rite? |Yes, [[Rite Damage]] ?{Rite Type} |No } In order to put a query inside of another query we will need to replace some, but not all, instances of ',', '|', and '}, with their HTML equivalents. For more information on which ones see the link above. Here is the nested query ?{Did you activate your Rite? |Yes, [[@{selected|Rite Damage Dice}ro<1]] ?{Rite Type&124;Fire&124;Cold&124;Acid&124;Lightning&124;Thunder} [[@{selected|Rite Damage Dice}ro<1]] |No, } Putting that all together [[1d20 + @{selected|ATK Bonus}[Attack Bonus] ]] / [[1d20 + @{selected|ATK Bonus}[Attack Bonus] ]] vs AC [[1d8 + 2 + @{selected|STR Mod}[Strength Mod] ]] Piercing Damage [[1d8]] Additional if crit ?{Which attack are you using? |Rapier,  |Green-Flame Blade, [[1d8]] Fire damage [[1d8]] Additional if crit } ?{Did you activate your Rite? |Yes, [[@{selected|Rite Damage Dice}ro<1]] ?{Rite Type&124;Fire&124;Cold&124;Acid&124;Lightning&124;Thunder} [[@{selected|Rite Damage Dice}ro<1]] Additional if crit |No, }
1505178364

Edited 1505179101
Thank you for the assistance, everything except the Rite Quarry seems perfect and easier to see. When I used it the Rite Quarry does not have a drop-down option for the type being used, in addition to that, the Rite Damage roll won't always be [[@{selected|Rite Damage Dice}ro<1]] this is specific to the fire version none of the others, how would this be nested into the quarry?
Ok, I had noticed that difference but I had hoped it was left out for ease of writing. We can still work with that. Now that I'm looking at it a bit more, I think it would be easier if we just combined the Rite Query with the Rite Type Query into a series of options without a nested query. This will make it slightly easier to maintain as you do not need the HTML equivalents any more. ?{Did you activate your Rite? |Yes - Fire, [[@{selected|Rite Damage Dice}ro<1]] Fire damage [[@{selected|Rite Damage Dice}ro<1]] Additional if crit |Yes - Cold, [[@{selected|Rite Damage Dice}]] Cold damage [[@{selected|Rite Damage Dice}]] Additional if crit |Yes - Acid, [[@{selected|Rite Damage Dice}]] Acid damage [[@{selected|Rite Damage Dice}]] Additional if crit |Yes - Lightning, [[@{selected|Rite Damage Dice}]] Lightning damage [[@{selected|Rite Damage Dice}]] Additional if crit |Yes - Thunder, [[@{selected|Rite Damage Dice}]] Thunder damage [[@{selected|Rite Damage Dice}]] Additional if crit |No, }
I like it! Thank you so much. Do you by any chance know of any formatting tricks to remove the No and large blank space in the Rapier and non-Rite macros?
Alright, so that is interesting, but I know why that's happening. Clearly the blank line when choosing Rapier is because we have it on a separate line. The Rite - No is interesting because it appears that a macro will use the option for the value if there is no value (nothing after the comma) AND it is the last option. If you move the No option anywhere else (I recommend setting it as the first option to keep all the yes options together) it will work properly. To prevent these options from creating blank lines, we will simply move them to the end of the previous line like so. [[1d20 + @{selected|ATK Bonus}[Attack Bonus] ]] / [[1d20 + @{selected|ATK Bonus}[Attack Bonus] ]] vs AC [[1d8 + 2 + @{selected|STR Mod}[Strength Mod] ]] Piercing Damage [[1d8]] Additional if crit ?{Which attack are you using? |Rapier,  |Green-Flame Blade, [[1d8]] Fire damage [[1d8]] Additional if crit } ?{Did you activate your Rite? |No, |Yes - Fire, [[@{selected|Rite Damage Dice}ro<1]] Fire damage [[@{selected|Rite Damage Dice}ro<1]] Additional if crit |Yes - Cold, [[@{selected|Rite Damage Dice}]] Cold damage [[@{selected|Rite Damage Dice}]] Additional if crit |Yes - Acid, [[@{selected|Rite Damage Dice}]] Acid damage [[@{selected|Rite Damage Dice}]] Additional if crit |Yes - Lightning, [[@{selected|Rite Damage Dice}]] Lightning damage [[@{selected|Rite Damage Dice}]] Additional if crit |Yes - Thunder, [[@{selected|Rite Damage Dice}]] Thunder damage [[@{selected|Rite Damage Dice}]] Additional if crit }
If you want to, we can clean up the macro further by using  Roll Templates .
That won't be necessary now it's perfect! Thank you for all of your help.