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

Using Attributes and Max Attributes as dynamic variables

I've set up my sheet to house variables within Attributes (and their max value). When I run an Ability for a single attack, it seems to work fine. When I copy the code for that attack and add it to the bottom (as a 2nd attack), the code seems to break and displays parts of the formula rather than the final result. I've not been able to figure out how to fix it or even why this is happening. Can someone please explain what I'm doing incorrectly? Thanks in advance! Here are all the parts of the code being used. !Prefix @{ !Reach (Normal/Bite) [[ {@{!Prefix}@{character_name}|size|max}*5,5}kh1 ]] ft [[ {(@{!Prefix}@{character_name}|size|max}+1)*5,5}kh1 ]] ft size (max value) [[round(+0.8986*abs(@{size})-0.0063*abs(@{size})**3)*[[ -1*{[[{@{size},-1}kh1]],1}kl1 ]]]] And here's the full code &{template:default} {{name=Natural Claw }} ?{Power Attack?| Yes, 1 |No, 0} {{Claw #1 Natural Reach @{!Reach (Normal/Bite)} Bludgeoning and Slashing =Attack: [[ 1d20cs20 +@{bab} [BAB] +@{str_mod} [Str mod] +@{!Enhancement} [Enhancement] -[[?{Power Attack?} *(1 +floor(@{bab}/4))]] [Power Attack] +@{!Misc Bonus} [Misc Attack] +@{!PartyBuffs} [Party Attack Buffs] ]] Crit Confirm: [[ 1d20cs20 +@{bab} [BAB] +@{str_mod} [Str mod] +@{!Enhancement} [Enhancement] -[[?{Power Attack?} *(1 +floor(@{bab}/4))]] [Power Attack] +@{!Misc Bonus} [Misc Attack] +@{!PartyBuffs} [Party Attack Buffs] ]] Damage: [[ 1d4 [Base Claw] +@{Str_mod} [Str mod] +@{!Prefix}@{character_name}|!Enhancement|max} [Enhancement] +[[?{Power Attack?} *(1 +floor(@{bab}/4))*2]] [Power Attack] +@{!Prefix}@{character_name}|!Misc Bonus|max} [Misc Damage] +@{!Prefix}@{character_name}|!PartyBuffs|max} [Party Damage Buffs] ]] Critical: [[ (1d4 [Base Claw] +@{Str_mod} [Str mod] +@{!Prefix}@{character_name}|!Enhancement|max} [Enhancement] +[[?{Power Attack?} *(1 +floor(@{bab}/4))*2]] [Power Attack] +@{!Prefix}@{character_name}|!Misc Bonus|max} [Misc Damage] +@{!Prefix}@{character_name}|!PartyBuffs|max} [Party Damage Buffs])*2 ]] }} {{Claw #2 Natural Reach @{!Reach (Normal/Bite)} Bludgeoning and Slashing =Attack: [[ 1d20cs20 +@{bab} [BAB] +@{str_mod} [Str mod] +@{!Enhancement} [Enhancement] -[[?{Power Attack?} *(1 +floor(@{bab}/4))]] [Power Attack] +@{!Misc Bonus} [Misc Attack] +@{!PartyBuffs} [Party Attack Buffs] ]] Crit Confirm: [[ 1d20cs20 +@{bab} [BAB] +@{str_mod} [Str mod] +@{!Enhancement} [Enhancement] -[[?{Power Attack?} *(1 +floor(@{bab}/4))]] [Power Attack] +@{!Misc Bonus} [Misc Attack] +@{!PartyBuffs} [Party Attack Buffs] ]] Damage: [[ 1d4 [Base Claw] +@{Str_mod} [Str mod] +@{!Prefix}@{character_name}|!Enhancement|max} [Enhancement] +[[?{Power Attack?} *(1 +floor(@{bab}/4))*2]] [Power Attack] +@{!Prefix}@{character_name}|!Misc Bonus|max} [Misc Damage] +@{!Prefix}@{character_name}|!PartyBuffs|max} [Party Damage Buffs] ]] Critical: [[ (1d4 [Base Claw] +@{Str_mod} [Str mod] +@{!Prefix}@{character_name}|!Enhancement|max} [Enhancement] +[[?{Power Attack?} *(1 +floor(@{bab}/4))*2]] [Power Attack] +@{!Prefix}@{character_name}|!Misc Bonus|max} [Misc Damage] +@{!Prefix}@{character_name}|!PartyBuffs|max} [Party Damage Buffs])*2 ]] }}
Here's how a single claw looks when run: And this is how it looks when I copy the code twice:
Your size max value ends with  ]]]] Try changing it to ]] ]] Repeated runs of brackets can cause these kind of problems. 
That was it! "Leave space between bracket groupings", so noted! Thank you so much!!!