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

Macro Help

1437325771

Edited 1437325850
Hi, I am running a Talislanta game and I am trying to tweak a brawling Macro for a PC named Balboa. In the Talislanta system, you roll your skill against a degree of difficulty and compare it to a table to determine what level of success you get (0 or below: mishap, 1-5: failure, 6-10: partial success, 11-19: full success and 20+: critical success). Below is the Macro I have been developing and I feel I have hit a wall due to my "just starting out" level of experience with code or macros in general. I have a feeling this is an "order of operations" problem but was looking for confirmation so I can stop tinkering and move on. code snippet: /em swings an over-sized fist at @{target|token_name} [[1d20+13 [Skill Ranks] + @{Balboa|Combat Rating} [CR] + ?{Modifier|0} [Any Modifiers] - (3 * ?{Charging?(0=no, 1=yes)|0} ) [Charging] - @{target|Bar1} [Melee Defense]]] To Hit! [[6 [Weapon] + ( 1 + @{Balboa|Speed} * ?{Charging?(0=no, 1=yes)|0} ) [Charging] + @{Balboa|Strength} [STR])]] DR or [[floor(6 [Weapon] + ( 1 + @{Balboa|Speed} * ?{Charging?(0=no, 1=yes)|0} ) [Charging] + @{Balboa|Strength} [STR] / 2)]] DR Partial Success This breaks down into the: Skill Check (first line of code) Damage Rating (DR) on a full success (second line of code) Damage Rating (DR) on a partial success or 1/2 damage (third line of code) I also incorporated a charge snippet that I found elsewhere. The fist line of code works out for me, it is when I get to the damage calculations in the later lines that I run into issues. Any help would be greatly appreciated.
1437348556

Edited 1437349118
Silvyre
Forum Champion
[[floor( ( 6 [Weapon] + ( 1 + @{Balboa|Speed}*?{Charging?(0=no, 1=yes)|0} ) [Charging] + @{Balboa|Strength} [STR] ) / 2 )]] DR Partial Success
Thanks Silvyre, that extra parenthesis did fix the "floor" issue. I appreciate the help. If you don't mind double checking me once more, another issue I see is that when I choose 0 for the charge which should nullify the bonus damage (1+3*0), it outputs a result of 15DR when it should be only 14DR without the charge, 6 base damage for Balboa's fist plus his Strength of 8.
1437357115
Silvyre
Forum Champion
[[6 [Weapon] + ( 1 + @{Balboa|Speed} )*?{Charging?(0=no, 1=yes)|0} [Charging] + @{Balboa|Strength} [STR])]] DR or [[floor( ( 6 [Weapon] + ( 1 + @{Balboa|Speed} )*?{Charging?(0=no, 1=yes)|0} [Charging] + @{Balboa|Strength} [STR] ) / 2 )]] DR Partial Success I wasn't sure whether the charging bonus was intended to be +Speed or +(Speed + 1); the macros in this post assume the latter.
Another parenthesis! I am going to read up on there use a little more. Again, thanks for the corrections... you saved me a lot of time!
1437382818
Silvyre
Forum Champion
You're very welcome. Happy gaming!