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

Hard time expressing some math using Custom Power Card script

Nothing wrong with the script, this is why I am not posting in the API script. So I am trying to do a crit damage inline roll for a scythe [[(2d4)*4+(floor@{selected|STR-mod}*1.5)]] This works fine on its own, but when I use the inline roll in a tag for the power card... it will ignore the second set of parentheses. I don't know what's going on here.
1406366442

Edited 1406366632
Solved, using [[(2d4)*4+@{selected|repeating_weapon_0_damage-ability}]] thanks sam for your wonderful sheet mechanics. edit: In case anyone was wonder here is the power card. !power --emote|@{selected|token_name} strikes with his scythe! --name|Scythe --usage|Melee Attack --action|Standard Action --attack|[[1d20+@{selected|STR-mod}]] vs AC --damage|[[2d4+(floor(@{selected|STR-mod})*1.5)]] Crit: [[(2d4)*4+@{selected|repeating_weapon_0_damage-ability}]] --bgcolor|#333333 --txcolor|#FFF
Guess I was wrong... its now throwing an error.. undefined:1 *4+Math.floor(1.5*(Math.floor((18+0+0+0)/2)-5)) ^ SyntaxError: Unexpected token * at Object.PowerCardScript.parseRollData Why would it through an error when its a perfect valid roll?
Im having the same problem trying to convert some of the macros in Sam's new pathfinder sheet to powercards. I have found some of the autocalculated fields are causing script errors with the math when I try to use them in inline rolls. I think the powercards script needs some tweaks to handle ceil, floor and abs calcs
1406375473

Edited 1406375538
I haven't ran into any problems with them in that way. This is the first I have encountered using sam's sheet and honeybadger's script. I don't see why it doesn't work though... the script is just formatting so roll20 should still parse the inline correctly.
I have linked this in the power cards thread in API as it is better suited to be discussed there and more likely to be seen by the people who can fix it.
The power card script uses a custom inline roll parser. It doesn't support all the options available to roll20... at the moment. Changes are coming soon that should solve a lot of these problems.