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

Choosing one of multiple available attacks

1546982913

Edited 1546983566
Hi. I have a monster. Lets say he has 2 different ways of attacking. I'm using 3.5 DnD char sheet. My macro right now is (not working) /w gm &{template:DnD35Attack} {{pcflag=false}} {{name=@{character_name}}} {{subtags=attacks with a @{npcattack} }} }}{{attack1=hitting AC [[ 1d20 + 4 ]]}} {{critconfirm1=Crit?: [[ 1d20 + 4 ]] ([[1d100]])}} {{fumbleroll=Fumble: [[ d20 ]] ([[1d100]]) }}  &{template:DnD35Attack} {{pcflag=false}} {{name=@{character_name}}} {{subtags=attacks with a ?{Which Weapon?|Sword|Dagger}}} {{attack1=?{Which Weapon?|Sword|Dagger} DMG:}} {{damage1=?{Which Weapon?|Sword,[[1d6]]|Dagger,[[1d4]]} }} It rolls attack perfectly, but the damage (public one) is not working in a way I want it to work. It shows damage as "Sword" or "Dagger", instead of rolling damage. What I want it to do, Is based on a choice, to display different name in a macro, and change damage, without making separate macros (such as #sword or #dagger), and without asking 2 times (such if I would change {{damage1=?{Which Weapon?|Sword,[[1d6]]|Dagger,[[1d4]]} }} to  {{damage1=?{Which Weapon again?|Sword,[[1d6+4]]|Dagger,[[1d4+4]]} }} Is there any way to do it? I tried moving things around and replacing symbols with HTML entries (the right ones), but it didn't help
1546994246

Edited 1546994282
So alas, a query can either be totally identical, in which case you'll only get asked it once, and it will paste the same value to all instances of the query, or totally different, in which case it will be asked for each query, but can have different outputs from each. The only way to do what you want, is the way you didn't want to do, which is to have a separate sword macro and dagger macro, then a third macro that asks which weapon you want and then goes on to call the right macro.  I also suggest that you use a 'chat menu' style call for that third macro, rather than a query, to avoid nested query shenanigans.
Aranador said: I also suggest that you use a 'chat menu' style call for that third macro, rather than a query, to avoid nested query shenanigans. How does 'chat menu' style work? Can you please give me the link or example? Couldn't find anything myself. Thanks.
1547043922

Edited 1547044531
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Chat Menus  are basically a list of commands, macros, or other code in chat form, using API Command Buttons or Ability Command Buttons. The look will vary depending upon the sheet and roll template (if any) used.