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

Divine Smite Macro

1546712117

Edited 1546712761
Was hoping to get a little help with this macro I was wondering if it would be possible to when the hit or crit buttons are selected to query if I wanted to divine smite instead of having a divine smite button. Warhammer /w "@{character_name}" [Swing](!
%{Corey of the Tailor Clan|WH-to-hit}) WH-to-hit /r ?{RollType|Normal,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1}+@{strength_mod}+ @{pb} + ?{Is Blessed?|No,[[0]]|Yes,[[1d4]]} /w "@{character_name}" [Hit](!
%{Corey of the Tailor Clan|WH-dmg})[Critical Hit](!
%{Corey of the Tailor Clan|WH-crit-dmg})[Miss](!
%{Corey of the Tailor Clan|Melee-miss})[Divine Smite](!
%{Corey of the Tailor Clan|Divine-Smite}) WH-dmg /r 1d10ro<2+@{strength_mod} WH-crit-dmg /r 2d10ro<2+@{strength_mod} Divine-Smite &{template:atkdmg} {{mod=mod}} {{rname=Divine Smite}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[([[{(?{Spell Slot Level|1|2|3|4|5}+?{Smite fiend or undead?|N,1[non-fiend]|Y,2[***fiend or undead***]}),5}kl1]])d8]] }} {{dmg1type=radiant}} {{dmg2flag=1}} {{dmg2=[[([[{(?{Spell Slot Level|1|2|3|4|5}+?{Smite fiend or undead?|N,1[non-fiend]|Y,[***fiend or undead***]}),5}kl1]])d8]] }} {{dmg2type=+  if CRIT}} {{desc=***Smiting*** the *?{Smite fiend or undead?}* **@{target|token_name}** with a level **?{Spell Slot Level|1}** spell slot!}} } So basically I want it to go something like this. Instead of having the Divine Smite as a button when I click Hit or Critical Hit, it query ?{Smite?|No,0|Yes,Divine-Smite} or something like that.
any help at all?
1546794583
Spren
Sheet Author
Pretty sure you can just add the query for smite on a new line. I don't think it can be part of the roll. So if you create a macro with something like: /r ?{RollType|Normal,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1}+@{strength_mod}+ @{pb} + ?{Is Blessed?|No,[[0]]|Yes,[[1d4]]} ?{Smite?|No,[[0]] | Yes,#smite} it should work. How you call the smite macro will be different depending on how and where you set it up. My case assumes you put it in the macros section of the collections tab.
1546812618

Edited 1546812885
I tried this but it isn't producing any result and I don't know why. /r 1d10ro<2+ @{strength_mod} + ?{Smite?| No, 0| Yes, %{Corey of the Tailor Clan|Divine-Smite} }
1546818952

Edited 1546822635
Spren
Sheet Author
You can't do quite what you're asking. Something like "d20+mod+macro" because the d20 and the mod are numbers but the macro isn't really a number, it evaluates to a template from what you posted above. If you're just looking to add the smite damage or a smite modifier of some sort, that's a different story, but it seems to me like you're looking add the smite macro to your attack which isn't possible. Instead you would want to do be something like: /r 1d10ro<2+ @{strength_mod} ?{Smite?| No, 0| Yes, %{Corey of the Tailor Clan|Divine-Smite} } Putting the query for the macro on it's own line.
1546830039

Edited 1546830059
Spren said: You can't do quite what you're asking. Something like "d20+mod+macro" because the d20 and the mod are numbers but the macro isn't really a number, it evaluates to a template from what you posted above. If you're just looking to add the smite damage or a smite modifier of some sort, that's a different story, but it seems to me like you're looking add the smite macro to your attack which isn't possible. Instead you would want to do be something like: /r 1d10ro<2+ @{strength_mod} ?{Smite?| No, 0| Yes, %{Corey of the Tailor Clan|Divine-Smite} } Putting the query for the macro on it's own line. This is the result of putting it on it's own line. It queries everything fine, then when it outputs to chat that's the result. /r 1d10ro<2+ @{strength_mod} ?{Smite?| No, 0| Yes, %{Corey of the Tailor Clan|Divine-Smite} }
1546832209
Spren
Sheet Author
Hmm it works fine for me. This is exactly my macro with your character's name: /r 1d10ro<2 + @{strength_mod} ?{Smite?| No, | Yes, %{Corey of the Tailor Clan|Divine-smite} }
1546864267
Spren
Sheet Author
Sorry that wasn't a very helpful response. I slept it off. It honestly should work. I changed a character in my game to your characters name and created a divine-smite macro in their abilities tab and new macro in both the abilities section and the collections tab and it worked as expected every time. Looking at it there's zero difference between your macro and mine, so yours should have worked also. If you're up for it I'd be happy to find some time and sync up with you on Discord or something and we can figure this out.
This was my result when I copy and pasted your dmg macro over mine... picture wasn't loading as just the picture so I put it on imgur <a href="https://imgur.com/9gxWRvi" rel="nofollow">https://imgur.com/9gxWRvi</a>