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

Possible Nesting Macro

Heylo again,  so I was wondering if there is a way to set up an attack roll macro that after the player inputs their bonus to hit, it will allow the GM to input the AC of their target and then resolve,  So Joe attacks lizardguy with his right hook, does x damage, AC 12 is missed and resolve is no hit or its met and lizardguy takes it on the chin. Thanks
The closest thing to this would be if the GM programmed all their monster tokens with either one of the bars recording AC    (  @{target|bar3} )   or if they're linked to a npc character sheet   @{target|ACAttributeName}. Your macro wouldn't be able to dynamically show or hide a damage roll depending on the result, but you can include in your macro a comparison of your attack result and their AC to visually show whether or not it hit, automatically.   Socially, however, many GM's don't like to advertise their monster's AC, so they may not want to do this. You won't be able to roll a macro that lets one player input values and then prompt another player (or GM) for other values.  A macro only interacts with the person who triggered it.
1455310459

Edited 1455310623
If we combine Mark G. 's advice with the API Script called PowerCards we can totally have a macro conditionally display whether an attack hits or misses! !power {{ --name|Joe attacks lizardguy with his ?{Attack with|right hook}! --Joe rolls|[[ [$A] 1d20 + 2 ]] -- ?? $A >= @{target|AC} ?? |Lizardguy takes it on the chin; x damage! -- ?? $A < @{target|AC} ?? |Joe misses. }} If you really prefer/require that a GM interacts with a player's macro (e.g. via Roll Query ), you could facilitate this back-and-forth interaction via API Command Buttons . /w gm [Joe attacks lizardguy](!power {{ --name|Joe attacks lizardguy with his ?{Attack with|right hook}! --Joe rolls|[[ [$A] 1d20 + 2 ]] -- ?? $A >= ?{lizardguy's AC|10} ?? |Lizardguy takes it on the chin; x damage! -- ?? $A < ?{lizardguy's AC} ?? |Joe misses. }}) The latter is a fairly complex macro, as it involves HTML entities and such. (Macros that involves HTML entites may break unless they've saved as Abilities .)
Awesome information, but thank you Silvyre for taking it a step further : D