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

Great Weapon Fighting Within Query Macro

I'm having a lot of issues with the roll20 2024 D&D sheet, so I've decided to jump into macros to give myself back some of the functionality lost from the transition from the 2014 sheet. Currently, I'm trying to effectively replace 'Effects' with a query menu that opens up every time I make an attack roll, asking if I want to add various effects - in this case they are Psionic Strike (1d6) and Fire's Burn (1d10). I've scoured these forums and come up with a working macro for my Greatsword attack damage which I'm very happy with. However, I'm trying to go a level higher and create a macro which allows me to query weapon type first, so if I switch between my weapons to make good use of my Weapon Masteries I only need 1 macro. All would be good in the world if I didn't have Great Weapon Fighting. My macros: GreatswordDamage (WORKING): [[{1d6, 0d1+3}kh1 +{1d6, 0d1+3}kh1+@{Zakan 'Nameless' Ulanathi|strength_mod}+?{Psionic Strike|No,[[0]]|Yes,[[1d6]]}+?{Fire's Burn|No,[[0]]]]|Yes,[[1d10]]]]} WeaponDamage (NOT WORKING): ?{Weapon|Greatsword,[[{1d6,0d1+3}kh1 +{1d6, 0d1+3}kh1]]|Greataxe,[[{1d12,0d1+3}kh1]]+@{Zakan 'Nameless' Ulanathi|strength_mod}+?{Psionic Strike|No,[[0]]|Yes,[[1d6]]}+?{Fire's Burn|No,[[0]]]]|Yes,[[1d10]]]]} Now there may be some other problems going on, but I *believe* the main problem to be the  [[{1d6,0d1+3}kh1 +{1d6, 0d1+3}kh1]] within the query, since the } breaks it all. Is there a way for me to have the functionality of this part of the macro without it destroying the query? Or should I attempt to come at this from a completely different perspective? I attempted to have nested macros so that it would instead just call on a macro only containing  [[{1d6,0d1+3}kh1 +{1d6, 0d1+3}kh1], but it seems that, at least for me, calling on macros doesn't work on 2024 sheets.
1732123073

Edited 1732123347
Just put } in place of } and , in place of , and you should be fine. Both of those have functions in queries, but at the end of the query, html entities are resolved, so they'll work just fine in the inline roll, as that is resolved after the query. Also, nesting a macro wouldn't have worked either way, because the macro is resolved before the query is, so you'd just end up with the same situation. EDIT: Order of Operations on the wiki , for reference. Very useful to know when writing macros.
That's worked perfectly, thanks! It's my first time making macros so I didn't know about the & fix.
Another issue that I'm now running into is that when I crit (1 or 20), I can't get the numbers to show as green or red. Any idea what could be causing the problem? My plan for crits currently is just to roll another macro which is only damage dice with no modifiers (same queries) and add that to the original damage roll. If there's a way to calculate crits within the same macro I'd appreciate that too but it's not a priority for me. Current macro: &{template:default} {{name=Strength Weapon Attack}} {{attack=[[ [[1d20cf=1cs=20]]+@{Zakan 'Nameless' Ulanathi|strength_mod}+@{Zakan 'Nameless' Ulanathi|pb}]] / [[ [[1d20cf=1cs=20]]+@{Zakan 'Nameless' Ulanathi|strength_mod}+@{Zakan 'Nameless' Ulanathi|pb}]]}} {{damage=?{Weapon|Greatsword,[[{1d6,0d1+3}kh1+{1d6,0d1+3}kh1+@{Zakan 'Nameless' Ulanathi|strength_mod}]] **Slashing**|Greataxe,[[{1d12,0d1+3}kh1+@{Zakan 'Nameless' Ulanathi|strength_mod}]]**Slashing**} ?{Psionic Strike|No, ** |Yes,[[1d6]] Force} ?{Fire's Burn|No, ** |Yes,[[1d10]] Fire}}}
That would be because the d20 roll is nested - inline rolls only show highlights for rolls in the outermost roll. Unless you need to reuse the unmodified d20 roll somewhere, you don't need the double brackets around it - and you don't need to specify cf or cs if they're going to be the min and max rolls anyway, as those are the defaults for the highlights.
I've removed the cs/cf, but if I remove the double brackets then it doesn't roll anything. Could you show an example? 
Noodle said: I've removed the cs/cf, but if I remove the double brackets then it doesn't roll anything. Could you show an example?  [[ [[1d20cf=1cs=20]]+@{Zakan 'Nameless' Ulanathi|strength_mod}+@{Zakan 'Nameless' Ulanathi|pb}]] / [[ [[1d20cf=1cs=20]]+@{Zakan 'Nameless' Ulanathi|strength_mod}+@{Zakan 'Nameless' Ulanathi|pb}]] You would need to remove the inner brackets like this (also removing the cs and cf) - untested: [[ 1d20+@{Zakan 'Nameless' Ulanathi|strength_mod}+@{Zakan 'Nameless' Ulanathi|pb}]] / [[ 1d20+@{Zakan 'Nameless' Ulanathi|strength_mod}+@{Zakan 'Nameless' Ulanathi|pb}]] Out of curiosity, I see two 1d20 rolls with a strength mod and proficiency bonus added to them - is this intending to be an Advantage/Disadvantage roll? If so then it could be simplified: Advantage: [[ 2d20kh1+@{Zakan 'Nameless' Ulanathi|strength_mod}+@{Zakan 'Nameless' Ulanathi|pb}]] Disadvantage: [[ 2d20kl1+@{Zakan 'Nameless' Ulanathi|strength_mod}+@{Zakan 'Nameless' Ulanathi|pb}]]
1732142455

Edited 1732142497
Jarren said: You would need to remove the inner brackets like this (also removing the cs and cf) - untested: [[ 1d20+@{Zakan 'Nameless' Ulanathi|strength_mod}+@{Zakan 'Nameless' Ulanathi|pb}]] / [[ 1d20+@{Zakan 'Nameless' Ulanathi|strength_mod}+@{Zakan 'Nameless' Ulanathi|pb}]] That works, but still doesn't give me green/red numbers unless I hover over them. At this point I'm assuming that it's the fault of the template? Also, how would I make the text align to the left? It's ordinarily fine but on this one in particular it's pretty far to the right. Current macro: &{template:default} {{name=Strength Weapon Attack}} {{Attack=[[ 1d20+@{Zakan 'Nameless' Ulanathi|strength_mod}+@{Zakan 'Nameless' Ulanathi|pb}]] / [[ 1d20+@{Zakan 'Nameless' Ulanathi|strength_mod}+@{Zakan 'Nameless' Ulanathi|pb}]]}} {{?{Weapon|Greatsword,Greatsword Damage= [[{1d6,0d1+3}kh1+{1d6,0d1+3}kh1+@{Zakan 'Nameless' Ulanathi|strength_mod}]] *Slashing*|Greataxe,Greataxe Damage= [[{1d12,0d1+3}kh1+@{Zakan 'Nameless' Ulanathi|strength_mod}]]*Slashing*} ?{Psionic Strike|No, ** |Yes,[[1d6]] *Force*} ?{Fire's Burn|No, ** |Yes,[[1d10]] *Fire*}}} As for the Advantage/Disadvantage, I like to see both rolls like the inbuilt sheet roller shows. So although that method might be cleaner, it's less clear at a glance that everything has gone correctly if that makes sense.
Well this is obnoxious, the D&D 2024 sheet replaces the default template with its own styled version, which blocks the critical highlights. So much for it being a default template - they couldn't bother to give it a different name so that you could use a normalized template, no, they had to completely overwrite it.
Tuo said: Well this is obnoxious, the D&D 2024 sheet replaces the default template with its own styled version, which blocks the critical highlights. So much for it being a default template - they couldn't bother to give it a different name so that you could use a normalized template, no, they had to completely overwrite it. Honestly at this point I’m not sure if I’ll ever make the change to the 2024 sheet or Jumpgate.