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 .
×
May your rolls be merry + bright! 🎄
Create a free account

Pathfinder Community Maximize/Empower Macro

1675628931

Edited 1675629379
For the Pathfinder Community sheet, no api just basic sheet. this macro will do the normal roll, maximize, empower or both depending on 2 buff lines being toggled on or off. the macro is designed to be added to a note section or replace the normal damage lines in the primary attack. The downside to this is that it wont show the individual dice rolls nor work with the digital 3d dice(not a deal breaker hence the fact we use this) on our character sheet Line 4 is Empowered and Line 9 is Maximized. ([[{{@{repeating_buff2_$9_enable_toggle},1}<0}*([[floor(( @{repeating_weapon_$2_damage-dice-num}d@{repeating_weapon_$2_damage-die}+@{repeating_weapon_$2_total-damage} ) * [[{{@{repeating_buff2_$4_enable_toggle},0}>1}*(1.5-1)+1]]) ]]-[[ ( @{repeating_weapon_$2_damage-dice-num} * @{repeating_weapon_$2_damage-die} ) + @{repeating_weapon_$2_total-damage} ]])+[[ ( @{repeating_weapon_$2_damage-dice-num} * @{repeating_weapon_$2_damage-die} ) + @{repeating_weapon_$2_total-damage} + ([[{{@{repeating_buff2_$9_enable_toggle},0}>1}*([[{{@{repeating_buff2_$4_enable_toggle},0}>1}*([[floor(( @{repeating_weapon_$2_damage-dice-num}d@{repeating_weapon_$2_damage-die}+@{repeating_weapon_$2_total-damage} ) * [[{{@{repeating_buff2_$4_enable_toggle},0}>1}*(0.5-1)+1]]) ]]-0)+0]]-0)+0]])]]]]) It works well I am just curious about other ways to go about this or improvements. no addons, api or anything else aside from the base stuff in Roll20 please. PS if anyone knows how to have the repeating line be contextual and just call on the number of the line its contained within that would be cool and make this even easier to copy paste into any spell attack line without changing numbers by hand(to make this more accessible to other players)
After decoding this appears to focus on returning the correct multiples of the Rolled damage or the Max damage. In particular - Normal is Rolled * 1, Max * 0 Empowered is Rolled * 1.5, Max * 0 Maximised is Rolled * 0, Max * 1 Empowered & Maximised is Rolled * 0.5, Max * 1 These modifiers can be represented using three rules - The Rolled multiplier is increased by 0.5 when Empowered The Rolled multiplier is decreased by 1 when Maximised The Max multiplier is increased by 1 when Maximised These are representable in roll syntax as Rolled multiplier (1 +@{repeating_buff2_$4_enable_toggle}/2 -@{repeating_buff2_$9_enable_toggle})) Max multiplier @{repeating_buff2_$9_enable_toggle} The toggles already return 0 or 1 so there is no need to use target number syntax before using them in calculations. As for the attack specific parts to be made contextual; that can be done by dropping the repeating_weapon_$X_ part of the attribute reference. Thus it could be simplified as [[ floor((1 +@{repeating_buff2_$4_enable_toggle}/2 -@{repeating_buff2_$9_enable_toggle})*(@{damage-dice-num}d@{damage-die}+@{total-damage})) [ ]+@{repeating_buff2_$9_enable_toggle}*(@{damage-dice-num}*@{damage-die}+@{total-damage}) ]] Note the sneaky newline for legibility tucked away in a roll label only works when used inside template syntax as would be the case here. Also since this removes the nested rolls you'll be able to see the individual dice rolls in the tooltip and might get your 3D dice back.
1675824177

Edited 1675824321
well I'll be a monkey's f'd up uncle. That is beautiful. thank you so much. We are new to the Roll20 code, but really enjoyed getting what we had there, it does work very well, we just both knew there was a simpler way. We only started looking at this the night after a game for a couple hours. A lthough its a bit annoying that the answer was that close. We actually almost thought of that solution but looks like we made a mistake in how we were thinking and dismissed it prematurely. the contextual stuff was completely unknown thank you this is massive for my players who use the sheet, almost all of them are spellcaster with rods and feats. You are a font of knowledge and wisdom that we shall soak up to further our tinkering!! The Bard used Inspiration! Its Super Effective! LMAO Thank you on behalf of The Party's Lucky Cleric, Suski, and Myself the DM, from the World of Mumit'Hara (Translated as The Goddess' Mistake).