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

Cleaner Breath Weapon Macro?

So, I'm building a random use breath weapon macro... has to do with alchemy, but that isn't really important. I'm looking to clean up the damage portion. It correctly calculates the damage but is kinda klunky in the mouseover descriptions. Most likely because I built it from a damage per level macro, instead of a damage at this level macro. Any help is appreciated. Important notes: I'm using the 5e shaped character sheet. It requires a selected token... since it acts on random PCs. Here is my current macro: &{template:5e-shaped} {{title=Black Breath Weapon}}{{show_character_name=1}}{{character_name=@{selected|character_name}}} {{uses=3}}{{uses_max=3}}{{targetName= AC}} {{emote=releases a breath of acid.}}{{content=You can use your action to exhale destructive energy in a 5 ft. by 30 ft. line.}}{{roll1=[[1d20]]}} {{roll2=[[1d20]]}}{{targetAC=Target AC}}{{saving_throw_dc=[[8 [Base DC]+@{selected|constitution_mod} [Constitution Modifier]+@{selected|pb} [Proficiency Bonus]]]}}{{saving_throw_vs_ability=DEXTERITY}} {{saving_throw_success=You take half the damage}}{{has_saving_throw_damage=1}}{{saving_throw_damage=[[2d6]] / [[[[{@{selected|level} +d0}>5]] + (3d6 [6th Level])]]  / [[[[{@{selected|level} + d0}>10]] + (4d6 [11th Level])]]  / [[[[{@{selected|level} + d0}>16]] + (5d6 [16th Level])]] }}{{saving_throw_damage_type=Acid}} Here is the output for the macro: The mouseover for each damage output is as follows: Rolling 2d6... Rolling 0 + (3d6 [6th Level]) ... Rolling 0 + (4d6 [11th Level]) ... Rolling 0 + (5d6 [16th Level]) ... Like I said its rolling the damage correctly... just klunky... Thanks All
As always... as soon as I post to the forum my brain kicks in and I find the answer myself. It was a simple change in the damage section: {{saving_throw_damage=[[2d6]] / [[3d6 [@Level 6]]] / [[4d6 [@Level 11]]] / [[5d6 [@Level 16]]] }} WooHoo!
If you only need one damage number based on those levels you can use [[[[[ floor((@{selected|level} - 1 ) / 5)]] + 2]]d6]]
1522188375

Edited 1522519858
I figured this out thanks to your macro kicking my brain into gear, i went into Open Office Calc (excel spreadsheet) and I realized the pattern was a factor of 6: (23-6)=17 (17-6)=11 (11-6)=5 ignore Level 1, it's a baseline using this, you can figure out that you want to roll [[ [[ 1 + (floor(@{selected|level} /6)) ]]d6 ]] you have a very beautiful layout though, I hope mine look that good some day. Could you break it down for me so I can understand how it works? Edit: Mine was for Acid Splash, yours would look something like: [[ [[ 2 + (floor((@{selected|level} - 1) /5)) ]]d6 ]]
your question actually caused me to answer my question of "what is the mathematical formulae for calculating the Rolls by Level"
1522419741

Edited 1522419936
Nyn
Pro
Blue64 said: I figured this out thanks to your macro kicking my brain into gear, i went into Open Office Calc (excel spreadsheet) and I realized the pattern was a factor of 6: (23-6)=17 (17-6)=11 (11-6)=5 ignore Level 1, it's a baseline using this, you can figure out that you want to roll [[ [[ 1 + (floor((@{selected|level} + 1) /6)) ]]d6 ]] you have a very beautiful layout though, I hope mine look that good some day. Could you break it down for me so I can understand how it works? Hey Blue, I literally just use the roll template for the 5e-shaped character sheet with heavy use of the custom fields. :) <a href="https://bitbucket.org/mlenser/5eshaped/wiki/Roll%2" rel="nofollow">https://bitbucket.org/mlenser/5eshaped/wiki/Roll%2</a>... Thanks for the macro change!
Vanakoji said: If you only need one damage number based on those levels you can use [[[[[ floor((@{selected|level} - 1 ) / 5)]] + 2]]d6]] Thanks!
1522517373

Edited 1522519897
Nyn said: Vanakoji said: If you only need one damage number based on those levels you can use [[[[[ floor((@{selected|level} - 1 ) / 5)]] + 2]]d6]] Thanks! I actually never even saw him post that, I must have been posting mine right when he was posting his. thought I checked for other responses lol I actually need to edit mine... Edited... Edited again, found a flaw in my math, fixed.
1522520193

Edited 1522522339
Nyn said: Blue64 said: I figured this out thanks to your macro kicking my brain into gear, i went into Open Office Calc (excel spreadsheet) and I realized the pattern was a factor of 6: (23-6)=17 (17-6)=11 (11-6)=5 ignore Level 1, it's a baseline using this, you can figure out that you want to roll [[ [[ 1 + (floor(@{selected|level} /6)) ]]d6 ]] you have a very beautiful layout though, I hope mine look that good some day. Could you break it down for me so I can understand how it works? Hey Blue, I literally just use the roll template for the 5e-shaped character sheet with heavy use of the custom fields. :) <a href="https://bitbucket.org/mlenser/5eshaped/wiki/Roll" rel="nofollow">https://bitbucket.org/mlenser/5eshaped/wiki/Roll</a> Template Thanks for the macro change! I am aware of that, but it is the Custom part that I'm not familiar with lol like, I'm sure you've gone though probably at least ten incarnations for that one macro's screen, although that link is actually MUCH more helpful than the one I used: <a href="https://www.reddit.com/r/Roll20/comments/2zx7a1/dd_5e_roll_template/?st=ivzn15t7&sh=f2954b7a" rel="nofollow">https://www.reddit.com/r/Roll20/comments/2zx7a1/dd_5e_roll_template/?st=ivzn15t7&sh=f2954b7a</a> although yours is missing the {{showclassactions=1}}
1522686885

Edited 1522689405
Nyn
Pro
Blue64 said: Nyn said: Blue64 said: I figured this out thanks to your macro kicking my brain into gear, i went into Open Office Calc (excel spreadsheet) and I realized the pattern was a factor of 6: (23-6)=17 (17-6)=11 (11-6)=5 ignore Level 1, it's a baseline using this, you can figure out that you want to roll [[ [[ 1 + (floor(@{selected|level} /6)) ]]d6 ]] you have a very beautiful layout though, I hope mine look that good some day. Could you break it down for me so I can understand how it works? Hey Blue, I literally just use the roll template for the 5e-shaped character sheet with heavy use of the custom fields. :) <a href="https://bitbucket.org/mlenser/5eshaped/wiki/Roll" rel="nofollow">https://bitbucket.org/mlenser/5eshaped/wiki/Roll</a> Template Thanks for the macro change! I am aware of that, but it is the Custom part that I'm not familiar with lol like, I'm sure you've gone though probably at least ten incarnations for that one macro's screen, although that link is actually MUCH more helpful than the one I used: <a href="https://www.reddit.com/r/Roll20/comments/2zx7a1/dd_5e_roll_template/?st=ivzn15t7&sh=f2954b7a" rel="nofollow">https://www.reddit.com/r/Roll20/comments/2zx7a1/dd_5e_roll_template/?st=ivzn15t7&sh=f2954b7a</a> although yours is missing the {{showclassactions=1}} Ahhh, ok...so, the macro I showed previously doesn't really have any custom fields. It's all just the fields from the roll template.&nbsp; Is there a specific part you were wondering about?&nbsp; Sometimes it is confusing because the macro isn't necessarily in the order shown in the output. Here's the breakdown...I separated them by line and rearranged them to match the order in the output. &{template:5e-shaped} {{title=Black Breath Weapon}} {{uses=3}}{{uses_max=3}} {{show_character_name=1}}{{character_name=@{selected|character_name}}} {{emote=releases a breath of acid.}} {{roll1=[[1d20]]}} {{roll2=[[1d20]]}} {{targetName= AC}}{{targetAC=Target AC}} {{saving_throw_dc=[[8 [Base DC]+@{selected|constitution_mod} [Constitution Modifier]+@{selected|pb} [Proficiency Bonus]]]}} {{saving_throw_vs_ability=DEXTERITY}} {{saving_throw_success=You take half the damage}} {{has_saving_throw_damage=1}} {{saving_throw_damage=[[2d6]] / [[[[{@{selected|level} +d0}&gt;5]] + (3d6 [6th Level])]] / [[[[{@{selected|level} + d0}&gt;10]] + (4d6 [11th Level])]] / [[[[{@{selected|level} + d0}&gt;16]] + (5d6 [16th Level])]] }} {{saving_throw_damage_type=Acid}} {{content=You can use your action to exhale destructive energy in a 5 ft. by 30 ft. line.}} Here, is one that is all custom fields: Here is the breakdown with each custom field on a separate line: &{template:5e-shaped}{{title=Enchantment Potion Worth}} {{subheader=Based on Potion Rarity}} {{Oil of Slipperiness=480 gp}} {{Philter of Love=90 gp}} {{Potion of Animal Friendship=200 gp}} {{Potion of Clairvoyance=960 gp}} {{Potion of Climbing=180 gp}} {{Potion of Diminution=270 gp}} {{Potion of Dragon Breath=150 gp}} {{Potion of Flying=500 gp}} {{Potion of Gaseous Form=300 gp}} {{Potion of Giant Strength=1200 gp}} {{Potion of Growth=270 gp}} {{Potion of Heroism=180 gp}} {{Potion of Invisibility=180 gp}} {{Potion of Invulnerability=3840 gp}} {{Potion of Longevity=9000 gp}} {{Potion of Mind Reading=180 gp}} {{Potion of Speed=400 gp}} {{Potion of Vitality=960 gp}} {{Potion of Water Breathing=180 gp}} {{Weak Oil of Sharpness=1060 gp}} The above macro without breaks: &{template:5e-shaped}{{title=Enchantment Potion Worth}}{{subheader=Based on Potion Rarity}}{{Oil of Slipperiness=480 gp}}{{Philter of Love=90 gp}}{{Potion of Animal Friendship=200 gp}}{{Potion of Clairvoyance=960 gp}}{{Potion of Climbing=180 gp}}{{Potion of Diminution=270 gp}}{{Potion of Dragon Breath=150 gp}}{{Potion of Flying=500 gp}}{{Potion of Gaseous Form=300 gp}}{{Potion of Giant Strength=1200 gp}}{{Potion of Growth=270 gp}}{{Potion of Heroism=180 gp}}{{Potion of Invisibility=180 gp}}{{Potion of Invulnerability=3840 gp}}{{Potion of Longevity=9000 gp}}{{Potion of Mind Reading=180 gp}}{{Potion of Speed=400 gp}}{{Potion of Vitality=960 gp}}{{Potion of Water Breathing=180 gp}}{{Weak Oil of Sharpness=1060 gp}} I also have custom fields that have in-line rolls or query options in them as well, you can pretty much put almost anything in the custom field. Hope this helps!
1522712267

Edited 1525654935
actually, just splitting it up like that and organizing the order of the fields made it much easier to understand, althoug I'm still not sure what's going on with that "{{saving_throw_vs_ability=DEXTERITY}}" segment, is it linking to a hamdout or something?
Blue64 said: actually, just splitting it up like that and organizing the order of the fields made it much easier to understand, althoug I'm still not sure what's going on with that "{{saving_throw_vs_ability=DEXTERITY}}" segment, is it linking to a hamdout or something? It just tells the template which ability the saving throw roll is against.