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

Adding conditional modifier to my Query

1551087776
Rogue
Pro
Marketplace Creator
Okay I have tried looking it up I must turn to the masters again... &{template:default} {{name=@{character_title} Attack Result}} {{to Hit Roll = ?{Form of Attack|Unarmed,[[d20+@{selected|unarmed_combat_to_hit}]] **Unarmed**|Short Bow,[[d20+1]] **Short Bow**|LongSword,[[d20+1]] **LongSword** } }} The way the sheet is made it has a field for getting the unarmed attack bonus and pulling it straight off of the sheet, but I have to manually add the weapon bonuses due to the Demon Gate sheet weapon slots being made on repeating fields (unless this has been updated somehow). However If not I do not really mind the work of adding it in manually to each characters attributes. The real question though is how do I get a conditional modifier to apply at the end of this thing? In their normal macros I have them seperate but I would love to condense the buttons on the page so I would like the different forms of attack to be available  for each character's forms of attack. Also how do I get this modifier to work at the end? +?{Modifier|0}
1551093535
Rogue
Pro
Marketplace Creator
Oh I see, I was looking up the wrong thing, this is a drop down menu meant for different forms of attack like: Unarmed, Sword, Short Bow, Spells, etc. Then it will pull the normal +to hit from the sheet (not the repeating fields though) unless this is possible too which would be fantastic. I still would like to add the option of adding a conditional modifier due to buffs or situations etc.
So, to add a conditional modifier, you are staring down the barrel of nesting a query inside of a query, which means character substitution, which means horribly unreadable macros.  Check the handy tricks thread for information on using chat menus, and do your initial option that way, then put your conditional query into your sub-macros, should be a lot more readable - or look into the wikia on the character substitutions for nested macros.