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

Is it possible to run and show one part of the macro before the next part?

I’m running a campaign with a few new people, so it streamline things I’m making character macros to make things easier for everyone and more aesthetically pleasing. I’ve run across an issue with the Paladin’s smite ability because he can choose to smite after seeing what his attack roll is. Ideally I would like to place the smite macro in the attack macro so all he has to do is attack and it will roll an attack roll, a damage roll, and a smite roll if he chooses to do it. Is there a way to stop the macro and force it to show his attack roll before asking him if he’d like to smite? Or do I have to create a separate macro for that? 
1580574857

Edited 1580575034
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Absolutely. This answer assumes you are using the D&D 5e by Roll20 sheet. If it is another sheet, there are other methods. Create the Divine Smite macro as a character ability if you have not done so already. Let's call it "Divine-Smite". Let's assume your paladin is named "Roland". In the description field for each weapon that Roland is likely to use, place the following code: [Divine Smite](~Roland| Divine-Smite) Like this: Whenever you use that weapon, the output will look something like this: By pushing the Divine Smite button, the Divine Smite ability will be activated. It does require you adding that button code to each weapon, but there probably aren't that many weapons Roland carries around. Alternatively, you can just click the "Show as Token Action" setting for the "Divine-Smite" ability, and it will be in the token action bar whenever Roland's token is selected, but this method puts a button down where the focus of attention already is, which will likely speed game play.
keithcurtis said: Absolutely. This answer assumes you are using the D&D 5e by Roll20 sheet.  Is there anyway to do it without using any sheets? So far I've been doing everything manually because I know how to edit my macros and feel more comfortable with it. If not its fine, I just probably won't use this method. 
1580601700
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I can't really answer that without an example of the macro code. It's certainly possible to do, but there are a lot of ways it can be done. Why don't you post your attack macro and your Divine Smite macro? Also, let me know if you are writing your macros as Collections Macros (in the Collections tab), or as Character Abilities (on the Attributes and Abilities tab of your character). It can affect the syntax.
@keithcurtis This is the macro in my player's character sheet under the Attributes and Abilities tab:  ?{Attack Type|  Battleaxe, attacks with a battleaxe **Attack roll:** [[1d20+ @{STR} + @{Prof}]] **vantage:** [[1d20+ @{STR} + @{Prof}]] **Damage:** [[1d8+ @{STR}]] **Crit:** [[2d8+ @{STR}]] bludgeoning damage| Javelin, attacks with a javelin **Attack roll:** [[1d20+ @{STR} + @{Prof}]] **vantage:** [[1d20+ @{STR} + @{Prof}]] **Damage:** [[1d6+ @{STR}]] **Crit:** [[2d6+ @{STR}]] piercing damage} ?{Smite?| No, **Chose not to smite.** |  Yes, smited with a level [[?{Spell slot?}]] spell slot Damage: [[(1+?{Spell slot?})d8]] Crit: [[(2*(1+?{Spell slot?}))d8]] **radiant** damage }
1580754202
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Construct another Ability called "Smite": Smited with a level [[?{Spell slot?}]] spell slot Damage: [[(1+?{Spell slot?})d8]] Crit: [[(2*(1+?{Spell slot?}))d8]] **radiant** damage Then re-write your base attack Ability as:  ?{Attack Type|  Battleaxe, attacks with a battleaxe **Attack roll:** [[1d20+ @{STR} + @{Prof}]] **vantage:** [[1d20+ @{STR} + @{Prof}]] **Damage:** [[1d8+ @{STR}]] **Crit:** [[2d8+ @{STR}]] bludgeoning damage| Javelin, attacks with a javelin **Attack roll:** [[1d20+ @{STR} + @{Prof}]] **vantage:** [[1d20+ @{STR} + @{Prof}]] **Damage:** [[1d6+ @{STR}]] **Crit:** [[2d6+ @{STR}]] piercing damage} [Smite](~Smite) That will roll the attack as normal, and give the player a button to push if they choose to use the Smite Ability.
That worked!!! Thank you so much @keithcurtis!