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

GFB Macro Help

I have the following macro in the DnD5e sheet: &{template:5eDefault} {{spell=1}} {{character_name=@{Alaric Gwydion|character_name}}} {{title=Green-Flame Blade w/Sun Blade}} {{subheader=@{Alaric Gwydion|character_name}}} {{subheaderright=Melee attack}} {{weapon=1}} {{simple=1}} {{rollname=Attack}} {{roll1=[[ 1d20cs>@{Alaric Gwydion|meleeweaponcritrange1} + [[@{Alaric Gwydion|meleetohit1}]] + [[@{Alaric Gwydion|global_melee_attack_bonus}]] ]]}} {{weapondamage=[[@{Alaric Gwydion|meleedmg1} + [[@{Alaric Gwydion|meleedmgbonus1}]] + [[(@{Alaric Gwydion|global_melee_damage_bonus})]] ]] @{Alaric Gwydion|meleedmgtype1}}} {{GFB Damage=[[@{Total_Level} + 1) / 6 + 0.5)-1)d8]] @{Alaric Gwydion|GFBdamagetype}}} {{GFB Splash=[[@{Total_Level} + 1) / 6 + 0.5)-1)d8 + [[@{selected|intelligence_mod}]] + (@{selected|global_spell_damage_bonus}) + 0d0]] @{Alaric Gwydion|GFBdamagetype}}} {{weaponcritdamage=Additional [[@{Alaric Gwydion|meleecritdmg1}]] damage}} @{Alaric Gwydion|classactionmeleeweapon}} @{Alaric Gwydion|ro_melee1} @{Alaric Gwydion|classactionmeleeweapon} However, the damage rolls for GFB just return a static 8 - I'm probably missing some brackets somewhere, and I've tried to mess around with it but had no joy.
1516842888
GiGs
Pro
Sheet Author
API Scripter
looking at the GFB damage, it looks your are missing a bunch of parentheses at the left side. Replace this: GFB Damage=[[@{Total_Level} + 1) / 6 + 0.5)-1)d8]] with this: GFB Damage=[[(((@{Total_Level} + 1) / 6 + 0.5)-1)d8]] and see how it goes. I'm not sure what that is calculating. It looks like you can end up with a 0d8 roll. Is that intended? You might need to look into the floor() or ceil() functions too, to make sure it rounds properly. Or describe how the roll works and we'll be able to make sure the calculation is correct. GFB splash looks a bit iffy too. Does that report the correct answer?
Good spot! I was tired, I knew it was something simple! And you were right about the splash, it was also missing parentheses. As for the 0D8, not entirely sure I follow. It should be working as a scaling macro Total_Level is my Wizard_Level + Fighter_Level. So currently, it's doing ((((2+5) + 1) / 6 + 0.5)-1) = 0.83D8, as Roll20 automatically rounds up this becomes 1D8, it then adds the other relevant parts (intelligence_mod and global_spell_damage_bonus) Now I have that part working, I was wondering if you may be able to help me with this part - I have modified the crit portion of the macro. It now looks like: {{weaponcritdamage=Additional [[@{Alaric Gwydion|meleecritdmg1}]] @{Alaric Gwydion|meleedmgtype1} and [[(((@{Total_Level} + 1) / 6 + 0.5)-1)d8]] @{Alaric Gwydion|GFBdamagetype} damage}} Which (seems to be) working for the damage rolls  - But do you know how to reorder it so that I would have the weapon damage and the GFB damage above the crit rolls? I've broken down the components of the Macro (below), and I have the GFB rolls above the crit in the Macro, but it still appears in order of Attack Roll, Damage Roll, Crit, Crit (ADV), GFB Damage, GFB Splash. Ideally, it would look like Attack Roll, Damage Roll, GFB Damage, Crit, Crit (ADV), GFB Splash. It's cool if it's not doable, just me being REALLY picky haha. Title Card &{template:5eDefault} {{spell=1}} {{character_name=@{Alaric Gwydion|character_name}}} {{title=Green-Flame Blade w/Sun Blade}} {{subheader=@{Alaric Gwydion|character_name}}} {{subheaderright=Melee attack}} {{weapon=1}} {{simple=1}} Attack Part {{rollname=Attack}} {{roll1=[[ 1d20cs>@{Alaric Gwydion|meleeweaponcritrange1} + [[@{Alaric Gwydion|meleetohit1}]] + [[@{Alaric Gwydion|global_melee_attack_bonus}]] ]]}} {{weapondamage=[[@{Alaric Gwydion|meleedmg1} + [[@{Alaric Gwydion|meleedmgbonus1}]] + [[(@{Alaric Gwydion|global_melee_damage_bonus})]] ]] @{Alaric Gwydion|meleedmgtype1}}} GFB Damage {{GFB Damage=[[(((@{Total_Level} + 1) / 6 + 0.5)-1)d8]] @{Alaric Gwydion|GFBdamagetype}}} {{GFB Splash=[[(((@{Total_Level} + 1) / 6 + 0.5)-1)d8 + [[@{selected|intelligence_mod}]] + (@{selected|global_spell_damage_bonus}) + 0d0]] @{Alaric Gwydion|GFBdamagetype}}} Crit Info {{weaponcritdamage=Additional [[@{Alaric Gwydion|meleecritdmg1}]] @{Alaric Gwydion|meleedmgtype1} and [[(((@{Total_Level} + 1) / 6 + 0.5)-1)d8]] @{Alaric Gwydion|GFBdamagetype} damage}} Other functions @{Alaric Gwydion|classactionmeleeweapon}} @{Alaric Gwydion|ro_melee1} @{Alaric Gwydion|classactionmeleeweapon}
1516885199
GiGs
Pro
Sheet Author
API Scripter
About the 0d8: I was looking at this calculation, [@{Total_Level} + 1) / 6 + 0.5)-1)d8]] and put in 1 for total level. That led to a result of minus .2. I have no idea what roll20 would do with that! I don't know how roll20 rounds dice naturally, but you can use the ceil() function to ensure it always rounds up, and the floor() function to ensure it always rounds down, and construct your expression to get the perfect result. For your second question: i think you're asking if you can change the way the template orders its output? I dont use DnD5e, but I'm guessing the template is fixed and will always print in the order it does. 
Ahh, now I get what you meant. With the spell in question, the bonus damage on the primary target is only applied once you reach level 5, so pre-5 it will round down to 0 which is intentional. As for the order, I figured this might be the case - just me being pedantic about layouts haha.