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

I need a macro for using green flame blade and sneak attack in the same attack.

1588315139

Edited 1588315179
I'm new to using macros. My problem is as stated above. I need to be able to use green flame blade and possibly sneak attack in the same attack. I plan to use a dagger, so I need to include that damage as well. Please help. This is 5th Edition.
An important first question is what Character sheet is your game using. If it's the 5th Edition by Roll20 sheet, you can use the Global Damage Modifier for one or both of those. Some people don't like that for Green Flame Blade because of the extra damage to the 2nd target, but that can be an additional Global Damage Modifier. I don't know templates for any other sheets, so if it's not that one, I can't help. If it is that one but you don't want Global Damage modifiers, let me know and I can help you write macros that will generate templates for both Sneak Attack and Green Flame Blade damage.
Yes it is the Roll20 character sheet. I forgot to mention that.
Okay, so what is it that you're looking for other than the Global Damage Modifiers? How are you looking for them to appear? What kind of interaction in the UI are you hoping for? If it's just a matter of not knowing how to setup the Global Damage Modifiers, that can be worked out as well.
1588323671
Ziechael
Forum Champion
Sheet Author
API Scripter
So I'm a macro-nerd and this is how I handle it, I use an attack menu first and foremost: /w @{character_name} &{template:atk} {{desc=**Attacks** **------------------------------------** **Melee** [@{repeating_attack_$0_atkname}](~@{character_name}|repeating_attack_$0_attack) [@{repeating_attack_$2_atkname}](~@{character_name}|repeating_attack_$2_attack) [@{repeating_attack_$4_atkname}](~@{character_name}|repeating_attack_$4_attack) [@{repeating_attack_$5_atkname}](~-LRn7aLSlHKyelJDpB4s|Rapier) [@{repeating_attack_$8_atkname}](~-LRn7aLSlHKyelJDpB4s|rapier2) **------------------------------------** **Ranged** [@{repeating_attack_$1_atkname}](~@{character_name}|repeating_attack_$1_attack) [@{repeating_attack_$2_atkname}](~@{character_name}|repeating_attack_$2_attack) **------------------------------------** **Magic** [@{repeating_attack_$3_atkname}](~@{character_name}|repeating_attack_$3_attack) [@{repeating_attack_$7_atkname}](~@{character_name}|repeating_attack_$7_attack) [@{repeating_attack_$6_atkname}](~@{character_name}|repeating_attack_$6_attack) }} In there you might be able to pick out that I've rerouted some of the repeating calls to specific character abilities (namely Rapier and rapier2), taking the Rapier example the button would result in a call to this ability: @{Kaloth 'Kal' Za'gur|wtype}&{template:atk} {{mod=+[[@{Kaloth 'Kal' Za'gur|pb}[PROF] + @{Kaloth 'Kal' Za'gur|dexterity_mod}[DEX] + 1[MAGIC] ]] }} {{rname=[Dragon Slayer Rapier](~-LRn7aLSlHKyelJDpB4s|rapierdamage)}} {{rnamec=[Dragon Slayer Rapier](~-LRn7aLSlHKyelJDpB4s|rapiercrit)}} {{r1=[[@{Kaloth 'Kal' Za'gur|d20}cs>20 + @{Kaloth 'Kal' Za'gur|dexterity_mod}[DEX] + @{Kaloth 'Kal' Za'gur|pb}[PROF] + 1[MAGIC]]]}} @{Kaloth 'Kal' Za'gur|rtype}cs>20 + @{Kaloth 'Kal' Za'gur|dexterity_mod}[DEX] + @{Kaloth 'Kal' Za'gur|pb}[PROF] + 1[MAGIC]]]}} {{range=}} {{desc=}} {{spelllevel=}} {{innate=}} {{globalattack=@{Kaloth 'Kal' Za'gur|global_attack_mod}}} ammo= @{Kaloth 'Kal' Za'gur|charname_output} That, in turn points to the rapierdamage or rapiercrit ability by the name as per the 5e OGL template output... getting towards my point, I promise! The damage output results in: &{template:dmg} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[ 1d8 + @{Kaloth 'Kal' Za'gur|dexterity_mod}[DEX] + 1[MAGIC] ]] ?{Damage| Basic,}} {{dmg1type=Piercing}}| Sneak-Attack,}} {{dmg1type=Piercing}} {{dmg2flag=1}} {{dmg2=[[[[round((@{Kaloth 'Kal' Za'gur|level}-7)/2)]]d6]]}} {{dmg2type=Sneak| Greenflame Blade,}} {{dmg1type=Piercing}} {{dmg2flag=1}} {{dmg2=[[[[floor((@{Kaloth 'Kal' Za'gur|level}+1)/6)]]d8]]}} {{dmg2type=Fire}} {{desc=+[[@{Kaloth 'Kal' Za'gur|intelligence_mod} + [[floor((@{Kaloth 'Kal' Za'gur|level}+1)/6)]]d8]] Fire damage to an adjacent target| Booming Blade,}} {{dmg1type=Piercing}} {{dmg2flag=1}} {{dmg2=[[[[floor((@{Kaloth 'Kal' Za'gur|level}+1)/6)]]d8]]}} {{dmg2type=Thunder}} {{desc=+[[[[floor((@{Kaloth 'Kal' Za'gur|level}+1)/6)]]d8]] thunder damage if the target willingly moves before my next turn| Sneak-Attack and Greenflame Blade,+ [[ [[ round((@{Kaloth 'Kal' Za'gur|level}-7)/2) ]]d6[SNEAK] ]]}} {{dmg1type=Piercing}} {{dmg2flag=1}} {{dmg2=[[ [[ floor((@{Kaloth 'Kal' Za'gur|level}+1)/6) ]]d8 ]]}} {{dmg2type=Fire}} {{desc=+[[ @{Kaloth 'Kal' Za'gur|intelligence_mod} + [[ floor((@{Kaloth 'Kal' Za'gur|level}+1)/6) ]]d8 ]] Fire damage to an adjacent target| Sneak-Attack and Booming Blade,+ [[ [[ round((@{Kaloth 'Kal' Za'gur|level}-7)/2) ]]d6[SNEAK] ]]}} {{dmg1type=Piercing}} {{dmg2flag=1}} {{dmg2=[[ [[ floor((@{Kaloth 'Kal' Za'gur|level}+1)/6) ]]d8 ]]}} {{dmg2type=Thunder}} {{desc=+[[[[floor((@{Kaloth 'Kal' Za'gur|level}+1)/6)]]d8]] thunder damage if the target willingly moves before my next turn} }} As you can see, the whole context was needed to explain the end result which allows me to select the type of damage being done (based on my most common usecases); basic, sneak attack, greenflame blade, booming blade or sneak attack AND greenflame/booming. Here is rapiercrit to complete the set: &{template:dmg} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[ 2d8 + @{Kaloth 'Kal' Za'gur|dexterity_mod}[DEX] + 1[MAGIC] ]] ?{Damage| Basic,}} {{dmg1type=Piercing}}| Sneak-Attack,}} {{dmg1type=Piercing}} {{dmg2flag=1}} {{dmg2=[[[[round((@{Kaloth 'Kal' Za'gur|level}-7)/2)*2]]d6]]}} {{dmg2type=Sneak| Greenflame Blade,}} {{dmg1type=Piercing}} {{dmg2flag=1}} {{dmg2=[[[[floor((@{Kaloth 'Kal' Za'gur|level}+1)/6)*2]]d8]]}} {{dmg2type=Fire}} {{desc=+[[@{Kaloth 'Kal' Za'gur|intelligence_mod} + [[floor((@{Kaloth 'Kal' Za'gur|level}+1)/6)*2]]d8]] Fire damage to an adjacent target| Booming Blade,}} {{dmg1type=Piercing}} {{dmg2flag=1}} {{dmg2=[[[[floor((@{Kaloth 'Kal' Za'gur|level}+1)/6)*2]]d8]]}} {{dmg2type=Thunder}} {{desc=+[[[[floor((@{Kaloth 'Kal' Za'gur|level}+1)/6)*2]]d8]] thunder damage if the target willingly moves before my next turn| Sneak-Attack and Greenflame Blade,+ [[ [[ round((@{Kaloth 'Kal' Za'gur|level}-7)/2)*2]]d6[SNEAK] ]]}} {{dmg1type=Piercing}} {{dmg2flag=1}} {{dmg2=[[ [[ floor((@{Kaloth 'Kal' Za'gur|level}+1)/6)*2]]d8 ]]}} {{dmg2type=Fire}} {{desc=+[[ @{Kaloth 'Kal' Za'gur|intelligence_mod} + [[ floor((@{Kaloth 'Kal' Za'gur|level}+1)/6)*2]]d8 ]] Fire damage to an adjacent target| Sneak-Attack and Booming Blade,+ [[ [[ round((@{Kaloth 'Kal' Za'gur|level}-7)/2)*2]]d6[SNEAK] ]]}} {{dmg1type=Piercing}} {{dmg2flag=1}} {{dmg2=[[ [[ floor((@{Kaloth 'Kal' Za'gur|level}+1)/6)*2]]d8 ]]}} {{dmg2type=Thunder}} {{desc=+[[[[floor((@{Kaloth 'Kal' Za'gur|level}+1)/6)*2]]d8]] thunder damage if the target willingly moves before my next turn} }} As you can see, it is a complicated setup but allows for a nicer output than the global damage fields.
1588323742
Ziechael
Forum Champion
Sheet Author
API Scripter
Also worth noting that I hardcoded my character name which I didn't need to do but it helped in testing, also my sneak attack calculation has a hard coded -7 as my build didn't take rogue until level 8 lol...
Ziechael said: Also worth noting that I hardcoded my character name which I didn't need to do but it helped in testing, also my sneak attack calculation has a hard coded -7 as my build didn't take rogue until level 8 lol... In the 5th Edition Sheet by Roll20 there are separate calls for each multiclass level. If Rogue is your second class, you'd reference its levels with @{multiclass1_lvl}.
1588339586

Edited 1588339600
Ziechael
Forum Champion
Sheet Author
API Scripter
Yup, thanks... couldn't be bothered to figure it out at the time and planned to take rogue forever more so it was a moot point to hardcode it... good for others to be aware of though :)
That's some seriously impressive macros. But where do I put it to make it easily accessible? Just make a new macro for it? If I'm using a dagger where in that macro do I plugg that in? And if I understand correctly then I need to copy/past the "Green- Flame Blade and Sneak Attack section into it's own macro and it's that simple, correct?
1589961508
Ziechael
Forum Champion
Sheet Author
API Scripter
Hey, just realised I never responded here... did you manage to get it working? They were added as abilities on my sheet so that I could easily reference them, preserve the html etc.
1590003601

Edited 1590005580
I use a much simpler solution for my characters with Green-Flame Blade, which doesn't require nearly as much coding and just is a weapon attack on the character sheet with the following properties: Primary damage is Green-Flame Blade's fire damage to the attack's target, using the macro [[(round((@{level}+1)/6+0.5))-1]]d8 in the damage dice field so that the damage scales with the character's level Secondary damage is the weapon's normal damage, including any magical modifiers from the weapon itself The attack's description contains a short description of Green-Flame Blade with some flavor to fit the character and an inline roll using the macro [[[[(round((@{level}+1)/6+0.5))-1]]d8+@{charisma_mod}]]  to roll the damage the second target of Green-Flame Blade takes. Any other modificators, in your case Sneak Attack, in my case Great Weapon Master (and also any other possible modifiers like my aasimar's Radiant Consumption or the ally paladin's Crusader's Mantle), are added as global damage modifiers. For Booming Blade I essentially did the same, so that my character sheet now has three greatsword attacks to use, one for a regular attack, one for Booming Blade and one for Green-Flame Blade. Two screenshots to visualize what I did and what the output (with Great Weapon Master damage as a global damage modifier added; the -5 penalty would be a global attack modifier I forgot to activate :-D) looks like: (I have set a query macro for my crit range to quickly change it if necessary, for example when attacking a paralyzed target, thus there's not just a 19 or 20 in that field)
1590047639
Ziechael
Forum Champion
Sheet Author
API Scripter
^^ thats a really clever solution, easy to make a handful of them per weapon too and then use a chat menu to group and call them.