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 square and curly braces not matching on default weapon

1760321556

Edited 1760327459
Below is Ranger build first level with purchased One Hand Crossbow (eventual Gloomstaker with Crossbow Expert feat) To get One Handed crossbow dragged 2014 compendium to character sheet rolled and used cursor up.  No customization. There are 13 sections below, the sixth one appears to have an issue with the curly braces (They are not matching.) First the full macro:   @ {MacroBug|wtype} & {template:atk} {{mod=+5}} {{rname=[Hand Crossbow](~-427630833_14381484|repeating_attack_-ObQGXOAHXReLsKzbCQP_attack_dmg)}} {{rnamec=[Hand Crossbow](~-427630833_14381484|repeating_attack_-ObQGXOAHXReLsKzbCQP_attack_crit)}} {{r1=[[@{MacroBug|d20}cs>20 + 3[DEX] + 2[PROF]]]}} @{MacroBug|rtype}cs>20 + 3[DEX] + 2[PROF {{range=30/120}} {{desc=}} {{spelllevel=}} {{innate=}} {{globalattack=@{MacroBug|global_attack_mod}}} ammo= @ {MacroBug|charname_output}   The code in question: {{r1=[[@{MacroBug|d20}cs>20 + 3[DEX] + 2[PROF]]]}} @{MacroBug|rtype}cs>20 + 3[DEX] + 2[PROF]]]}}   There are 2 open curly, 2 open square. squares around MacroBug, Dex and Prof are matching. two closing square two closing curly we match at this point MacroBug DEX and Prof are matching  then we get to the part I am having trouble with ]]]}} (at the end of the line)    They don't match anything.    Can someone explain this?   My goal in understanding this is I am trying to convert this from atk template to atkdmg template and for the most part have it working. 
What is the output if you type @{MacroBug|rtype} into the chat window?  The rtype attribute has the opening double brackets and braces that will be matched by what you have at the end. E.g. if you have the character sheet Advantage/Disadvantage roll set to 'Always' then the rtype will be '{{always=1}} {{r2=[[@{d20}', so that line then becomes: {{r1=[[@{MacroBug|d20}cs>20 + 3[DEX] + 2[PROF]]]}} {{always=1}} {{r2=[[@{d20}cs>20 + 3[DEX] + 2[PROF]]]}}
1760330690

Edited 1760330754
Hi Jarren, Thanks for taking the time to answer my question.     I thought I had introduced something in my level3 Gloomstalker so I created a new lvl1 Ranger and added the One Hand crossbow.  I forgot the character sheet for the new character had the default 'Roll Queries' option of 'Always roll Advantage'   The output in that scenario was:   @{MacroBug|rtype} {{always=1}} {{r2=[[1d20   I switched to 'Advantage Toggle' same as the account I originally had this issue on:   Normal {{query=1}} {{normal=1}} {{r2=[[0d20   Advantage {{query=1}} {{advantage=1}} {{r2=[[1d20   Disadvantage {{query=1}} {{disadvantage=1}} {{r2=[[1d20   I guess that part is ok and that is not where my issue is. Getting back to my original problem, 3rd level Ranger GloomStalker named  DarkXStrike I have  'Advantage Toggle' set and this is where I had the original issue.  (I have Crossbow Expert and  Dread Ambusher for a total of up to three attacks and I have Favorite Foe for optional damage.) What I am trying to do is create two sets of Macro's: 1) Role Playing Macros in game (I have a series of Macros setup that work fine in game and allow me to progress as the story and action unfolds and I have Macros setup to dynamically roll my 3 attacks and optional damage.  These are all working fine with the main macro being: @ {DarkXStrike|wtype} & {template:atk} {{mod=+7}} {{rname=[  DarkBoltRed](~-1665403557_14311983|repeating_attack_-ObKG-dXLAGLkKnTQut4_attack_dmg)}} {{rnamec=[  DarkBoltRed](~-1665403557_14311983|repeating_attack_-ObKG-dXLAGLkKnTQut4_attack_crit)}} {{r1=[[@{DarkXStrike|d20}cs>20 + 3[DEX] + 2[MOD] + 2[PROF]]]}} @{DarkXStrike|rtype}cs>20 + 3[DEX] + 2[MOD] + 2[PROF]]]}} {{range=30/120}} {{desc=  DarkBoltRed}} {{spelllevel=}} {{innate=}} {{globalattack=@{DarkXStrike|global_attack_mod}}} ammo= @ {DarkXStrike|charname_output} 2) Quick Macros that I will use interchangeably with # 1 above where I roll and let the DM assess the damage for a quicker outcome (no roll-playing etc. Attack and Damage for the three attacks included potentiation optional damage for that attack are all presented with one dice roll along with a list of targets . I took the Macro above (Hand Crossbow) and translated it from template:atk to template:atkdmg so I can see attack and damage in one roll.   For some reason the second attack roll is always rolling a 7.   I thought it was the brackets but I think you are pointing out this is fine. This is the converted Macro I am using where roll2 is always rolling a 7 and now that you mention it  appears this only occurs when > 'ROLL QUERIES: Advantage Toggle' in the character sheet is set to Normal   @ {DarkXStrike|wtype} & {template:atkdmg} {{mod=+7}} {{rname=[  DarkBoltRed](~-1665403557_14311983|repeating_attack_-ObKG-dXLAGLkKnTQut4_attack_dmg)}}  {{r1=[[@{DarkXStrike|d20}cs>20 + 3[DEX] + 2[MOD] + 2[PROF]]]}} @{DarkXStrike|rtype}cs>20 + 3[DEX] + 2[MOD] + 2[PROF]]]}} {{ always=1 }} {{r2=[[@{DarkXStrike|d20}cs>20 + 3[DEX] + 2[MOD] + 2[PROF]]]}} @{DarkXStrike|rtype}cs>20 + 3[DEX] + 2[MOD] + 2[PROF]]]}} {{attack=1}} {{range=30/120}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[1d6+3[DEX]]]}} {{dmg1type=dmg1type}} {{dmg2flag=1}} {{dmg2=[[1d4]]}} {{dmg2type=dmg2type}} {{crit1=[[1d6]]}} {{crit2=[[1d4]]}} {{desc=  DarkBoltRed}} {{spelllevel=}}   As you point out when when > 'ROLL QUERIES: Advantage Toggle' in the character sheet is set to Advantage or disadvantage the second roll is rolling correct. (Not always a 7 which is what my dec + Archery  + Proficiency add up to.   The damage rolls are always correct Is the issue that I should not be providing r2 when using normal mode? Obviously I am confused. Thanks for any insight. Don
1760333713

Edited 1760333739
Gauss
Forum Champion
Your last macro has r2 three times in the macro. That will not work. Additionally the "always=1" may conflict with the rtype.  One thing I find helps me work on macros like this is to split up the sections (put them back together before using). It clarifies each line.  I bolded the 4 lines that are the problem.  Either remove both rtype lines and stick with " {{always=1}}  {{r2=[[@{DarkXStrike|d20}cs>20  + 3[DEX] + 2[MOD] + 2[PROF]]]}}" OR remove  " {{always=1}} {{r2=[[@{DarkXStrike|d20}cs>20  + 3[DEX] + 2[MOD] + 2[PROF]]]}}" and one of the rtypes.  @{DarkXStrike|wtype} &{template:atkdmg} {{mod=+7}} {{rname=[DarkBoltRed](~-1665403557_14311983|repeating_attack_-ObKG-dXLAGLkKnTQut4_attack_dmg)}}  {{r1=[[@{DarkXStrike|d20}cs>20 + 3[DEX] + 2[MOD] + 2[PROF]]]}} @{DarkXStrike|rtype}cs>20 + 3[DEX] + 2[MOD] + 2[PROF]]]}} {{always=1}} {{r2=[[@{DarkXStrike|d20}cs>20  + 3[DEX] + 2[MOD] + 2[PROF]]]}} @{DarkXStrike|rtype}cs>20 + 3[DEX] + 2[MOD]  + 2[PROF]]]}} {{attack=1}} {{range=30/120}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[1d6+3[DEX]]]}} {{dmg1type=dmg1type}} {{dmg2flag=1}} {{dmg2=[[1d4]]}} {{dmg2type=dmg2type}} {{crit1=[[1d6]]}} {{crit2=[[1d4]]}} {{desc=DarkBoltRed}} {{spelllevel=}}
1760504020

Edited 1760504088
Ahh Thanks that is what I was missing. So now I have two sets of Macros in my Macro Bar. The first set is for roll playing and I use a macro to call DarkBolt1 DarkBolt2 and Dread Ambusher one at a time interactively.  I use a question in the damage field to ask if Favored Foe is applied and if so include that damage. The second set is for quick fire and go it displays all dice rolls for attacks and damage including rolls for optional Favored Foe.  In this way the DM can calculate the damage quickly if we are having a tough drawn out battle and things don't get too boring.  The best of both worlds. To create the second set of macros I just took the output from the first three and converted then from atk to atkdmg.   Pretty neat system. I just stick all of the below (minus the titles for each in one macro and press 1 button and let the DM have their fun.   DarkBoltRed Complete @ {DarkXStrike|wtype} & {template:atkdmg} {{mod=+7}} {{rname=[  DarkBoltRed](~-1665403557_14311983|repeating_attack_-ObKG-dXLAGLkKnTQut4_attack_dmg)}}  {{r1=[[@{DarkXStrike|d20}cs>20 + 3[DEX] + 2[MOD] + 2[PROF]]]}}  @{DarkXStrike|rtype}cs>20 + 3[DEX] + 2[MOD] + 2[PROF]]]}} {{attack=1}} {{range=30/120}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[1d6+3[DEX]]]}} {{dmg1type=Piercing}} {{dmg2flag=1}} {{dmg2=[[1d4[FF]]]}} {{dmg2type=Piercing - (FF)}} {{crit1=[[1d6]]}} {{desc=  DarkBolt1}} {{spelllevel=}}   DarkBoltBlue Complete @{DarkXStrike|wtype}&{template:atkdmg} {{mod=+7}} {{rname=[ DarkBoltBlue](~-1665403557_14311983|repeating_attack_-ObKHrL4PqJJ3N376hZp_attack_dmg)}}  {{r1=[[@{DarkXStrike|d20}cs>20 + 3[DEX] + 2[MOD] + 2[PROF]]]}} @{DarkXStrike|rtype}cs>20 + 3[DEX] + 2[MOD] + 2[PROF]]]}} {{attack=1}}  {{range=30/120}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[1d6+3[DEX]]]}} {{dmg1type=Piercing}} {{dmg2flag=1}} {{dmg2=[[1d4[FF]]]}} {{dmg2type=Piercing - (FF)}} {{crit1=[[1d6]]}}  {{desc= 榏 DarkBolt2}} {{spelllevel=}}   DarkAmbush Complete @{DarkXStrike|wtype}&{template:atkdmg} {{mod=+7}} {{rname=[  DarkAmbush](~-1665403557_14311983|repeating_attack_-ObKKksTApdgyc6xk2qT_attack_dmg)}} {{r1=[[@{DarkXStrike|d20}cs>20 + 3[DEX] + 2[MOD] + 2[PROF]]]}} @{DarkXStrike|rtype}cs>20 + 3[DEX] + 2[MOD] + 2[PROF]]]}}  {{attack=1}} {{range=30/120}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[1d8[Ambush]+3[DEX]]]}} {{dmg1type=Piercing}} {{dmg2flag=1}} {{dmg2=[[1d4[FF]]]}} {{dmg2type=Piercing - (FF)}} {{crit1=[[1d8]]}} {{desc=  DarkAmbush}} {{spelllevel=}}  Thanks again everyone!