This post has been closed. You can still view previous posts, but you can't post any new replies.

[Script] PowerCards 3 (Thread 3)

1452993639

Edited 1452993791
Target charms won't work with that macro. It's designed to work without them because of their limitations with conditionals.
1452993924
So is there a way to pull up the targets name and AC to show in the output for the attack? Without having to use charms?
1452995461
Ok, so I've got the Name thing figured out, but now I can't get the attacks to show correctly. In this output I have a mis, that should show the Missed message; a Hit, that should show the Hit and Damage; and a 3rd attack that is not showing anything but the name of the target, and it's the wrong target name: !power {{ --charid|@{character_id} --emote|**@{character_name}** twirls in a flurry and strikes with his staff! --hroll|[[ [$Flurry] ?{Flurry of Blows|Yes, 1|No, 0} +0d0 ]] --name|Staff of Striking --leftsub|Action --rightsub|Reach 80/320 --target_list|@{target|1st|token_name} | @{target|2nd|token_name} | @{target|3rd|token_name} --Attack|~R[[ [$Atk1] @{AtkRoll} + @{Melee To Hit} ]] vs. [[@{AC}]] (AC) (@{target|1st|Name})~R --?? $Atk.total >= @{target|1st|bar3} AND $Atk.base <= 20 ?? Hit|~R[[ [NH] d8 +@{STR} +3 ]] | | [[ [nh] ?{Staff of striking how many charges?|0, 0d0|1, 1d6|2, 2d6|3, 3d6}]]~R --?? $Atk.total < @{target|1st|bar3} AND $Atk.base < 20 ?? !Miss| ~C$$#ff0000|**You Missed!**$$~C --?? $Atk.base >= 20 ?? Critical Hit|~R[[ [NH] d8 +3]] ~R --?? $Atk.base >= 20 ?? !Crit Damage| [[1t[Critical-Hit]]] --?? $Atk.total >= @{target|1st|bar3} AND $Atk.base <= 20 ?? Properties *1|~RBludgeoning, Versatile~R --?? $Atk.total < @{target|1st|bar3} AND $Atk.base == 1 ?? !Miss *1:|You missed horribly: ^^^^ $$#ff0000|**[[1t[Critical-Miss-Melee] [txt] ]]**$$ --?? $Flurry == 1 ?? !Flury1|~C **$$#fff|Flurry of Blows$$**~C --?? $Flurry == 1 ?? !target1|@{target|2nd|token_name} --?? $Flurry == 1 ?? Attack1|~R[[ [$Atk2] @{AtkRoll} + @{Melee To Hit} ]] vs. [[@{AC}]] (AC) (@{target|2nd|Name})~R --?? $Flurry == 1 AND $Atk.total >= @{target|2nd|bar3} AND $Atk.base <= 20 ?? Hit1|~R[[ [NH] d10 +@{STR} ]] ~R --?? $Flurry == 1 AND $Atk.total < @{target|2nd|bar3} AND $Atk.base < 20 ?? !Miss2| ~C$$#ff0000|**You Missed!**$$~C --?? $Flurry == 1 AND $Atk.base >= 20 ?? Critical Hit1|~R[[ [NH] d8 +3]] ~R --?? $Flurry == 1 AND $Atk.base >= 20 ?? !Crit Damage *1| [[1t[Critical-Hit]]] --?? $Flurry == 1 AND $Atk.total >= @{target|2nd|bar3} AND $Atk.base <= 20 ?? Properties *2|~RBludgeoning~R --?? $Flurry == 1 AND $Atk.total < @{target|2nd|bar3} AND $Atk.base == 1 ?? !Miss *2:|You missed horribly: ^^^^ $$#ff0000|**[[1t[Critical-Miss-Melee] [txt] ]]**$$ --?? $Flurry == 1 ?? !Flury|~C **$$#fff|Flurry of Blows$$**~C --?? $Flurry == 1 ?? !target2|@{target|3rd|token_name} --?? $Flurry == 1 ?? Attack1|~R[[ [$Atk3] @{AtkRoll} + @{Melee To Hit} ]] vs. [[@{AC}]] (AC) (@{target|3rd|Name})~R --?? $Flurry == 1 AND $Atk.total >= @{target|3rd|bar3} AND $Atk.base <= 20 ?? Hit2|~R[[ [NH] d10 +@{STR} ]] ~R --?? $Flurry == 1 AND $Atk.total < @{target|3rd|bar3} AND $Atk.base < 20 ?? !Miss3| ~C$$#ff0000|**You Missed!**$$~C --?? $Flurry == 1 AND $Atk.base >= 20 ?? Critical Hit2|~R[[ [NH] d8 +3]] ~R --?? $Flurry == 1 AND $Atk.base >= 20 ?? !Crit Damage *2| [[1t[Critical-Hit]]] --?? $Flurry == 1 AND $Atk.total >= @{target|3rd|bar3} AND $Atk.base <= 20 ?? Properties *3|~RBludgeoning~R --?? $Flurry == 1 AND $Atk.total < @{target|3rd|bar3} AND $Atk.base == 1 ?? !Miss *3:|You missed horribly: ^^^^ $$#ff0000|**[[1t[Critical-Miss-Melee] [txt] ]]**$$ }} Output:
1452996167
Absolutely. The way I had written that macro was to hide the AC from the players (since they shouldn't know it) and simply determine if it hit or missed, then processed accordingly. I'll give you a rundown based upon exactly what I use for my dad: !power {{ @{format} --charid|@{character_id} --emote|@{character_name}'s hands blur as he suddenly strikes! --name|@{character_name}'s Attack! --leftsub|Attack Action --rightsub|Melee --hroll|[[ [$Wpn] ?{Weapon?|@{selected|meleeweaponname1},1|@{selected|meleeweaponname2},2} + 0d0 ]] [[ [$Attack] ?{Attack?|Regular,1|Bonus,2|Flurry,3|Opportunity,0} + 0d0 ]] [[ [$Open] ?{Open Hand Technique|Prone,0|Push,1|Reaction,2} +0d0]] --Target *1:|$$#ff0000|@{target|Target 1|token_name}$$ I included the entire beginning for the sake of continuity, but it is also quite helpful. The --hroll begins by asking him which weapon he is going to use. Weapon 1 is his Unarmed Strike, while Weapon 2 is a quarterstaff/bo. I'll delete the references to it in the following macros. It then asks him what attack, which ultimately determines the output. Like target_list charms, he still has to target the maximum amount of targets he can possibly hit. In this case, 4. However, the [$Attack] determines whether he strikes once (Opportunity Attack), twice (Regular), three times (Bonus Action) or four (Flurry of Blows). The last part is which of the Open hand technique effects he will use if the attack is a Flurry of Blows (he's a Way of the Open Hand Monk). Beginning the output of the attacks, we have the first target line. Since he will always attack at least one, there is no need to put this into a conditional. His target is Target 1, and the entire line spits out Target 1's token name. --^1Attack *1:|~R [[ [$Atk1] ?{Advantage Target 1?|No, 1d20|Advantage, 2d20KH1|Disadavantage, 2d20KL1} + [[@{selected|meleetohit1} [Melee Bonus] ]] ]] ~R --?? $Atk1.total < @{target|Target 1|bar3} AND $Atk1.base == 1 ?? !Miss *1:|And... you missed: ^^^^ $$#ff0000|**[[ 1t[Critical-Miss] [txt] ]]**$$ --?? $Atk1.total < @{target|Target 1|bar3} AND $Atk1.base <> 1 ?? !Miss *1:|~C $$#ff0000|**Whiffed.**$$ ~C --?? $Atk1.total >= @{target|Target 1|bar3} OR $Atk1.base == 20 ?? ^1Damage *1:|~R[[@{selected|meleedmg1}+ [[@{meleedmgbonus1}]] ]]~R --?? $Atk1.total >= @{target|Target 1|bar3} OR $Atk1.base == 20 ?? ^1Damage Type *1:|@{selected|meleedmgtype1}r3} OR $Atk5.base == 20 ?? ^1Damage Type *1:|@{selected|meleedmgtype2} --?? $Atk1.base == 20 ?? ^2Crit *1:|~R[[@{selected|meleedmg1}]]~R Each of these lines are for one single attack. The first rolls the attack. The second determines if the roll is a hit or miss. It doesn't spit out the AC by design, so if you want the macro to actually write it, you just add it somewhere. For example, you could change the first line to read: --^1Attack *1:|~R [[ [$Atk1] ?{Advantage Target 1?|No, 1d20|Advantage, 2d20KH1|Disadavantage, 2d20KL1} + [[@{selected|meleetohit1} [Melee Bonus] ]] ]] vs [[ @{target|Target 1|bar3} ]]AC ~R Each subsequent break in the entire macro where there is a line of open space, is there to simply let the user know the next series of lines is another attack. However, all you have to do is keep each "section" organized and understand that each one targets someone else, and prints out different output. For example: --?? $Attack == 2 ?? !Bonus|~C **$$#fff|Bonus Action Attack$$** ~~~ ~C --?? $Attack == 2 ?? Target *5:|$$#ff0000|@{target|Target 3|token_name}$$ --?? $Attack == 2 ?? ^1Attack *5:|~R [[ [$Atk7] ?{Advantage Target 3?|No, 1d20|Advantage, 2d20KH1|Disadavantage, 2d20KL1} + [[@{selected|meleetohit1} [Melee Bonus] ]] ]] ~R  --?? $Attack == 2 AND $Atk7.total < @{target|Target 3|bar3} AND $Atk7.base == 1 ?? !Miss *5:|And... you missed: ^^^^ $$#ff0000|**[[ 1t[Critical-Miss] [txt] ]]**$$ --?? $Attack == 2 AND $Atk7.total < @{target|Target 3|bar3} AND $Atk7.base <> 1 ?? !Miss *5:|~C $$#ff0000|**Whiffed.**$$ ~C --?? $Attack == 2 AND $Atk7.total >= @{target|Target 3|bar3} OR $Atk7.base == 20 ?? ^1Damage *5:|~R[[@{selected|meleedmg1}+ [[@{meleedmgbonus1}]] ]]~R --?? $Attack == 2 AND $Atk7.total >= @{target|Target 3|bar3} OR $Atk7.base == 20 ?? ^1Damage Type *5:|@{selected|meleedmgtype1} --?? $Attack == 2 AND $Atk7.base == 20 ?? ^2Crit *5:|~R[[@{selected|meleedmg1}]]~R All of these lines will only process if the attack is a Bonus Action attack. However, it shares a common target with the first of the Flurry of Blows attacks: --?? $Attack == 3 ?? !Flurry|~C **$$#fff|Flurry of Blows$$** ~~~ $$#fff|Cost of 1 **Ki**$$ ~C --?? $Attack == 3 ?? Target *3:|$$#ff0000|@{target|Target 3|token_name}$$ --?? $Attack == 3 ?? ^1Attack *3:|~R [[ [$Atk3] ?{Advantage Target 3?|No, 1d20|Advantage, 2d20KH1|Disadavantage, 2d20KL1} + [[@{selected|meleetohit1} [Melee Bonus] ]] ]] ~R  --?? $Attack == 3 AND $Atk3.total < @{target|Target 3|bar3} AND $Atk3.base == 1 ?? !Miss *3:|And... you missed: ^^^^ $$#ff0000|**[[ 1t[Critical-Miss] [txt] ]]**$$ --?? $Attack == 3 AND $Atk3.total < @{target|Target 3|bar3} AND $Atk3.base <> 1 ?? !Miss *3:|~C $$#ff0000|**Whiffed.**$$ ~C --?? $Attack == 3 AND $Atk3.total >= @{target|Target 3|bar3} OR $Atk3.base == 20 ?? ^1Damage *3:|~R[[@{selected|meleedmg1}+ [[@{meleedmgbonus1}]] ]]~R --?? $Attack == 3 AND $Atk3.total >= @{target|Target 3|bar3} OR $Atk3.base == 20 ?? ^1Damage Type *3:|@{selected|meleedmgtype1} --?? $Attack == 3 AND $Open == 0 AND $Atk3.total >= @{target|Target 3|bar3} ?? ^1Open Hand Technique *3:|@{target|Target 3|token_name} must succeed on a $~#7A00A3|Dexterity$~ saving throw or be knocked prone. --?? $Attack == 3 AND $Open == 0 AND $Atk3.total >= @{target|Target 3|bar3} ?? ^2Open Hand DC *3:|~R †$ [[ [txt] 8 + @{PB} + @{wisdom_mod} +0d0 ]] †$ ~R --?? $Attack == 3 AND $Open == 1 AND $Atk3.total >= @{target|Target 3|bar3} ?? ^1Open Hand Technique *3:|@{target|Target 3|token_name} must make a $~#A30000|Strength$~ saving throw. If it fails, it is pushed up to 15 feet away from @{character_name}. --?? $Attack == 3 AND $Open == 1 AND $Atk3.total >= @{target|Target 3|bar3} ?? ^2Open Hand DC *3:|~R †$ [[ [txt] 8 + @{PB} + @{wisdom_mod} +0d0 ]] †$ ~R --?? $Attack == 3 AND $Open == 2 AND $Atk3.total >= @{target|Target 3|bar3} ?? ^1Open Hand Technique *3:|@{target|Target 3|token_name} can't take reactions until the end of @{character_name}'s next turn. --?? $Attack == 3 AND $Atk3.base == 20 ?? ^2Crit *3:|~R[[@{selected|meleedmg1}]]~R What this is doing, is simply changing the attack rolls, but the target remains the same. However, each "section" has its own unique hidden number ( e.g.,^1Damage *3 or ^1Damage *5). To show the AC, just add the same code to each attack field, but using the appropriate target number: vs [[ @{target|Target 1|bar3} ]]AC vs [[ @{target|Target 2|bar3} ]]AC vs [[ @{target|Target 3|bar3} ]]AC ....... Thus, if a given attack uses Target 2, all subsequent Target references for that specific attack, must use the same setup:  @{target|Target 3|token_name} @{target|Target 3|bar3} @{target|Target 3|field_name_to_call} It can become confusing, you just have to be patient and remember those little things. Every attack has to have its own section of fields. The complication of this particular macro is so he can use one macro for his attacks, since he has different numbers of attacks for a single attack (4), using 2 different weapons, and choices as to what sort of special thing happens on his flurry of blows.
1452996605
Arthur B. said: Ok, so I've got the Name thing figured out, but now I can't get the attacks to show correctly. In this output I have a mis, that should show the Missed message; a Hit, that should show the Hit and Damage; and a 3rd attack that is not showing anything but the name of the target, and it's the wrong target name: !power {{ --charid|@{character_id} --emote|**@{character_name}** twirls in a flurry and strikes with his staff! --hroll|[[ [$Flurry] ?{Flurry of Blows|Yes, 1|No, 0} +0d0 ]] --name|Staff of Striking --leftsub|Action --rightsub|Reach 80/320 --target_list|@{target|1st|token_name} | @{target|2nd|token_name} | @{target|3rd|token_name} --Attack|~R[[ [$Atk1] @{AtkRoll} + @{Melee To Hit} ]] vs. [[@{AC}]] (AC) (@{target|1st|Name})~R --?? $Atk.total >= @{target|1st|bar3} AND $Atk.base <= 20 ?? Hit|~R[[ [NH] d8 +@{STR} +3 ]] | | [[ [nh] ?{Staff of striking how many charges?|0, 0d0|1, 1d6|2, 2d6|3, 3d6}]]~R --?? $Atk.total < @{target|1st|bar3} AND $Atk.base < 20 ?? !Miss| ~C$$#ff0000|**You Missed!**$$~C --?? $Atk.base >= 20 ?? Critical Hit|~R[[ [NH] d8 +3]] ~R --?? $Atk.base >= 20 ?? !Crit Damage| [[1t[Critical-Hit]]] --?? $Atk.total >= @{target|1st|bar3} AND $Atk.base <= 20 ?? Properties *1|~RBludgeoning, Versatile~R --?? $Atk.total < @{target|1st|bar3} AND $Atk.base == 1 ?? !Miss *1:|You missed horribly: ^^^^ $$#ff0000|**[[1t[Critical-Miss-Melee] [txt] ]]**$$ --?? $Flurry == 1 ?? !Flury1|~C **$$#fff|Flurry of Blows$$**~C --?? $Flurry == 1 ?? !target1|@{target|2nd|token_name} --?? $Flurry == 1 ?? Attack1|~R[[ [$Atk2] @{AtkRoll} + @{Melee To Hit} ]] vs. [[@{AC}]] (AC) (@{target|2nd|Name})~R --?? $Flurry == 1 AND $Atk.total >= @{target|2nd|bar3} AND $Atk.base <= 20 ?? Hit1|~R[[ [NH] d10 +@{STR} ]] ~R --?? $Flurry == 1 AND $Atk.total < @{target|2nd|bar3} AND $Atk.base < 20 ?? !Miss2| ~C$$#ff0000|**You Missed!**$$~C --?? $Flurry == 1 AND $Atk.base >= 20 ?? Critical Hit1|~R[[ [NH] d8 +3]] ~R --?? $Flurry == 1 AND $Atk.base >= 20 ?? !Crit Damage *1| [[1t[Critical-Hit]]] --?? $Flurry == 1 AND $Atk.total >= @{target|2nd|bar3} AND $Atk.base <= 20 ?? Properties *2|~RBludgeoning~R --?? $Flurry == 1 AND $Atk.total < @{target|2nd|bar3} AND $Atk.base == 1 ?? !Miss *2:|You missed horribly: ^^^^ $$#ff0000|**[[1t[Critical-Miss-Melee] [txt] ]]**$$ --?? $Flurry == 1 ?? !Flury|~C **$$#fff|Flurry of Blows$$**~C --?? $Flurry == 1 ?? !target2|@{target|3rd|token_name} --?? $Flurry == 1 ?? Attack1|~R[[ [$Atk3] @{AtkRoll} + @{Melee To Hit} ]] vs. [[@{AC}]] (AC) (@{target|3rd|Name})~R --?? $Flurry == 1 AND $Atk.total >= @{target|3rd|bar3} AND $Atk.base <= 20 ?? Hit2|~R[[ [NH] d10 +@{STR} ]] ~R --?? $Flurry == 1 AND $Atk.total < @{target|3rd|bar3} AND $Atk.base < 20 ?? !Miss3| ~C$$#ff0000|**You Missed!**$$~C --?? $Flurry == 1 AND $Atk.base >= 20 ?? Critical Hit2|~R[[ [NH] d8 +3]] ~R --?? $Flurry == 1 AND $Atk.base >= 20 ?? !Crit Damage *2| [[1t[Critical-Hit]]] --?? $Flurry == 1 AND $Atk.total >= @{target|3rd|bar3} AND $Atk.base <= 20 ?? Properties *3|~RBludgeoning~R --?? $Flurry == 1 AND $Atk.total < @{target|3rd|bar3} AND $Atk.base == 1 ?? !Miss *3:|You missed horribly: ^^^^ $$#ff0000|**[[1t[Critical-Miss-Melee] [txt] ]]**$$ }} Output: It's because you have the same RollIDs being checked for hit or miss on each attack. You correctly tagged the attack of the second as [$Atk2], but your check was against the first attack [$Atk]. This: --?? $Flurry == 1 ?? Attack1|~R[[ [$Atk2] @{AtkRoll} + @{Melee To Hit} ]] vs. [[@{AC}]] (AC) (@{target|2nd|Name})~R --?? $Flurry == 1 AND $Atk.total >= @{target|2nd|bar3} AND $Atk.base <= 20 ?? Hit1|~R[[ [NH] d10 +@{STR} ]] ~R --?? $Flurry == 1 AND $Atk.total < @{target|2nd|bar3} AND $Atk.base < 20 ?? !Miss2| ~C$$#ff0000|**You Missed!**$$~C Should be this: --?? $Flurry == 1 ?? Attack1|~R[[ [$Atk2] @{AtkRoll} + @{Melee To Hit} ]] vs. [[@{AC}]] (AC) (@{target|2nd|Name})~R --?? $Flurry == 1 AND $Atk2.total >= @{target|2nd|bar3} AND $Atk2.base <= 20 ?? Hit1|~R[[ [NH] d10 +@{STR} ]] ~R --?? $Flurry == 1 AND $Atk2.total < @{target|2nd|bar3} AND $Atk2.base < 20 ?? !Miss2| ~C$$#ff0000|**You Missed!**$$~C However, your AC check is wrong for what you wrote for output. That's going to default to your AC. For a target's, it needs to be: --?? $Flurry == 1 ?? Attack1|~R[[ [$Atk2] @{AtkRoll} + @{Melee To Hit} ]] vs. [[@{target|2nd|AC}]] (AC) (@{target|2nd|Name})~R Otherwise, you will see the same number across the board, and will never understand why you may hit, when you think it should be a miss, i.e.: your target's AC is 18, and damage rolls, but you are seeing 22.
1453007145
SeanOG said: Arthur B. said: Ok, so I've got the Name thing figured out, but now I can't get the attacks to show correctly. In this output I have a mis, that should show the Missed message; a Hit, that should show the Hit and Damage; and a 3rd attack that is not showing anything but the name of the target, and it's the wrong target name: !power {{ --charid|@{character_id} --emote|**@{character_name}** twirls in a flurry and strikes with his staff! --hroll|[[ [$Flurry] ?{Flurry of Blows|Yes, 1|No, 0} +0d0 ]] --name|Staff of Striking --leftsub|Action --rightsub|Reach 80/320 --target_list|@{target|1st|token_name} | @{target|2nd|token_name} | @{target|3rd|token_name} --Attack|~R[[ [$Atk1] @{AtkRoll} + @{Melee To Hit} ]] vs. [[@{AC}]] (AC) (@{target|1st|Name})~R --?? $Atk.total >= @{target|1st|bar3} AND $Atk.base <= 20 ?? Hit|~R[[ [NH] d8 +@{STR} +3 ]] | | [[ [nh] ?{Staff of striking how many charges?|0, 0d0|1, 1d6|2, 2d6|3, 3d6}]]~R --?? $Atk.total < @{target|1st|bar3} AND $Atk.base < 20 ?? !Miss| ~C$$#ff0000|**You Missed!**$$~C --?? $Atk.base >= 20 ?? Critical Hit|~R[[ [NH] d8 +3]] ~R --?? $Atk.base >= 20 ?? !Crit Damage| [[1t[Critical-Hit]]] --?? $Atk.total >= @{target|1st|bar3} AND $Atk.base <= 20 ?? Properties *1|~RBludgeoning, Versatile~R --?? $Atk.total < @{target|1st|bar3} AND $Atk.base == 1 ?? !Miss *1:|You missed horribly: ^^^^ $$#ff0000|**[[1t[Critical-Miss-Melee] [txt] ]]**$$ --?? $Flurry == 1 ?? !Flury1|~C **$$#fff|Flurry of Blows$$**~C --?? $Flurry == 1 ?? !target1|@{target|2nd|token_name} --?? $Flurry == 1 ?? Attack1|~R[[ [$Atk2] @{AtkRoll} + @{Melee To Hit} ]] vs. [[@{AC}]] (AC) (@{target|2nd|Name})~R --?? $Flurry == 1 AND $Atk.total >= @{target|2nd|bar3} AND $Atk.base <= 20 ?? Hit1|~R[[ [NH] d10 +@{STR} ]] ~R --?? $Flurry == 1 AND $Atk.total < @{target|2nd|bar3} AND $Atk.base < 20 ?? !Miss2| ~C$$#ff0000|**You Missed!**$$~C --?? $Flurry == 1 AND $Atk.base >= 20 ?? Critical Hit1|~R[[ [NH] d8 +3]] ~R --?? $Flurry == 1 AND $Atk.base >= 20 ?? !Crit Damage *1| [[1t[Critical-Hit]]] --?? $Flurry == 1 AND $Atk.total >= @{target|2nd|bar3} AND $Atk.base <= 20 ?? Properties *2|~RBludgeoning~R --?? $Flurry == 1 AND $Atk.total < @{target|2nd|bar3} AND $Atk.base == 1 ?? !Miss *2:|You missed horribly: ^^^^ $$#ff0000|**[[1t[Critical-Miss-Melee] [txt] ]]**$$ --?? $Flurry == 1 ?? !Flury|~C **$$#fff|Flurry of Blows$$**~C --?? $Flurry == 1 ?? !target2|@{target|3rd|token_name} --?? $Flurry == 1 ?? Attack1|~R[[ [$Atk3] @{AtkRoll} + @{Melee To Hit} ]] vs. [[@{AC}]] (AC) (@{target|3rd|Name})~R --?? $Flurry == 1 AND $Atk.total >= @{target|3rd|bar3} AND $Atk.base <= 20 ?? Hit2|~R[[ [NH] d10 +@{STR} ]] ~R --?? $Flurry == 1 AND $Atk.total < @{target|3rd|bar3} AND $Atk.base < 20 ?? !Miss3| ~C$$#ff0000|**You Missed!**$$~C --?? $Flurry == 1 AND $Atk.base >= 20 ?? Critical Hit2|~R[[ [NH] d8 +3]] ~R --?? $Flurry == 1 AND $Atk.base >= 20 ?? !Crit Damage *2| [[1t[Critical-Hit]]] --?? $Flurry == 1 AND $Atk.total >= @{target|3rd|bar3} AND $Atk.base <= 20 ?? Properties *3|~RBludgeoning~R --?? $Flurry == 1 AND $Atk.total < @{target|3rd|bar3} AND $Atk.base == 1 ??!Miss *3:|You missed horribly: ^^^^ $$#ff0000|**[[1t[Critical-Miss-Melee] [txt] ]]**$$ It's because you have the same RollIDs being checked for hit or miss on each attack. You correctly tagged the attack of the second as [$Atk2], but your check was against the first attack [$Atk]. This: --?? $Flurry == 1 ?? Attack1|~R[[ [$Atk2] @{AtkRoll} + @{Melee To Hit} ]] vs. [[@{AC}]] (AC) (@{target|2nd|Name})~R --?? $Flurry == 1 AND $Atk.total >= @{target|2nd|bar3} AND $Atk.base <= 20 ?? Hit1|~R[[ [NH] d10 +@{STR} ]] ~R --?? $Flurry == 1 AND $Atk.total < @{target|2nd|bar3} AND $Atk.base < 20 ?? !Miss2| ~C$$#ff0000|**You Missed!**$$~C Should be this: --?? $Flurry == 1 ?? Attack1|~R[[ [$Atk2] @{AtkRoll} + @{Melee To Hit} ]] vs. [[@{AC}]] (AC) (@{target|2nd|Name})~R --?? $Flurry == 1 AND $Atk2.total >= @{target|2nd|bar3} AND $Atk2.base <= 20 ?? Hit1|~R[[ [NH] d10 +@{STR} ]] ~R --?? $Flurry == 1 AND $Atk2.total < @{target|2nd|bar3} AND $Atk2.base < 20 ?? !Miss2| ~C$$#ff0000|**You Missed!**$$~C However, your AC check is wrong for what you wrote for output. That's going to default to your AC. For a target's, it needs to be: --?? $Flurry == 1 ?? Attack1|~R[[ [$Atk2] @{AtkRoll} + @{Melee To Hit} ]] vs. [[@{target|2nd|AC}]] (AC) (@{target|2nd|Name})~R Otherwise, you will see the same number across the board, and will never understand why you may hit, when you think it should be a miss, i.e.: your target's AC is 18, and damage rolls, but you are seeing 22. Yea, I finally figured that out after looking really carefully at the code, just about the same time you were probably posting this up. I finally got it to work correctly and now have to go back and redo some of my macros for attacks and such because of the problem with conditionals. However, now that I know how to do them it should make the process that much simpler. Thank you guys again for all the help. You guys truly are awesome!!! I do have one quick question about the power cards. If I'm reading this part correctly:  Repeat: To repeat a tag and its contents, add a hash mark followed by the number of times you want the content to repeat. You can also use roll queries to add a pop-up in roll20 to determine the number of times to repeat the tag when you click the macro (see second example). Example: Tag#4|Content Example: Attack#?{Number of attacks|1}|[[1d20+4]] So, if I'm doing a macro for say Magic Missile with 3 attacks it would look something like this: Attack#?{Mumber of Missiles|3}|[[1d4+1]] And this will generate 3 separate attacks for each of the missiles?
1453008054
Sky
Pro
The repeating tag does not play nice with conditionals or target charms, but yes, it would generate three magic missiles.
Hey guys about a couple of days ago i bought a Pro subscription and i started messing around with power cards. I would like a bit of an insight as to what im trying to do. Its probably going to be really stupid and i feel like one for asking but i was wondering how could i do the following? i have this little piece : --rightsub|: [[@{mana} * 0.98]] how can i remove the inline "box" and show the result of this as text? i saw about the [TXT] thing on the first post , but if i write it like --rightsub| [[ [TXT] @{mana} * 0.98]] it gets me an exception : Could not determine result type of: [{"type":"L","text":"TXT"},{"type":"M","expr":"180*0.98"}] *The 180 value is the @{mana} which is kind of obvious, i know that {"type":"L" refers to the inline rules on the first post for the "left" side of formatting but i can't seem to figure it out. Thanks in advance for your time.
1453087925
Silvyre
Roll20 Mod Team
Try [[ [TXT] @{mana} * 0.98 + 0d0 ]]
Thanks a lot this worked like a charm. but why would i need a 0d0? i tried the above a lot of times without the 0d0 and i was getting the error above could you please explain to me the logic behind it? sorry if im asking too much.
1453093139
For whatever the reason, there needs to be a dice roll for it to work. It's basically just a bugfix.
1453105989
Sky
Pro
If you have anything other than a number inside an inline roll: [[ [TXT] 3 ]] instead of just [[ 3 ]], Roll20 spazzes out and is looking for a dice roll and not just a number.
thanks a lot guys that makes sense. im having a lot of fun with powercards so far. it allowed me to make a "conversion" from world of warcraft to dnd a WHOLE lot easier for a campaign im doing for fun with my friends.
1453218018
I just want to say Thank You! to HoneyBadger and all the other contributors! I would like it very much if Power Cards were the default setup for Roll20. I don't use a lot of the automation available (and I am glad that is not required because I think it goes faster), but I think they look great! Spoilers for Princes of the Apocalypse . . . . . . Check out the whole session here: http://www.twitch.tv/d20play/v/36313354 Caution: lots of (immature) adult language
1453231518
Sky
Pro
Awesome! Glad you like it... I'm actually kinda anti-automation in rpg's due to fallibility of people and it being a pain to undo something done automatically. What automation there is in PowerCards is partly due to keeping up with roll templates and mostly due to GenKitty constantly "pestering" me for updates... :D
1453242592
I agree on much of what you object to on automation -- like damage automatically being applied, etc. There are some things though, which make it far easier and faster for larger groups. Most of that has been addressed with conditionals. There are some things which would be great to have (e.g.: ability to directly apply RollIDs for math calculations later in the script, API button implementation without workarounds, ability to trigger other API scripts directly based upon conditionals, etc.), but overall -- everything has been great. Looking at how many people have been using some of my PowerCard examples as the basis for their own, I may need to come up with a post or topic, explaining what some of them do because my examples can be complicated at times... May save some headaches in explanations later.
1453783344
Sky
Pro
Using stored data in a roll id in later calculations/rolls would require a massive overhaul of the script and it's fairly jury-rigged already. It'd probably be easier to re-write it from scratch and write a brand new dice/macro parser from scratch. Unfortunately that would mean no backwards compatibility. The ability to trigger other scripts... that's dangerous. And veers much closer towards automation, though I can see some benefits to it. API buttons just confuse me... and have the issue in that the players can always go back and click them over and over, meaning there would have to be some way to dummy proof them to only run once for that specific button instance, since that button may show up multiple times in chat.
1453783505

Edited 1453783529
Sky
Pro
Working on some characters for a 5e game and decided to make some basic macros as a starting point for the players. The powercard macro below uses all the attributes from the 5e sheet (not shaped) and pretty much has the same layout as the roll template, but is open to much more customization for different classes, like a warlock needed to add in hexed damage or something. Melee Weapon Attack (1) !power {{ --charid|@{character_id} --emote|//@{character_name} attacks with their @{meleeweaponname1}.// --name|@{meleeweaponname1} --leftsub|Melee Attack --rightsub|Reach 5 ft --Attack:|[[ [$Atk1] 1d20cs>@{meleeweaponcritrange1} + [[@{meleetohit1}]] + [[@{global_melee_attack_bonus}]] ]] | [[ [$Atk2] 1d20cs>@{meleeweaponcritrange1} + [[@{meleetohit1}]] + [[@{global_melee_attack_bonus}]] ]] vs AC --Hit:|[[ [NH] @{meleedmg1} + [[@{meleedmgbonus1}]] ]] @{meleedmgtype1} damage --?? $Atk1.base >= @{meleeweaponcritrange1} OR $Atk2.base >= @{meleeweaponcritrange1} ?? !Critical Hit:| ^* **+** [[ [NH] @{meleedmg1}]] damage $$#660000|**[ Critical hit! ]**$$ }}
1453788342
HoneyBadger said: Using stored data in a roll id in later calculations/rolls would require a massive overhaul of the script and it's fairly jury-rigged already. It'd probably be easier to re-write it from scratch and write a brand new dice/macro parser from scratch. Unfortunately that would mean no backwards compatibility. The ability to trigger other scripts... that's dangerous. And veers much closer towards automation, though I can see some benefits to it. API buttons just confuse me... and have the issue in that the players can always go back and click them over and over, meaning there would have to be some way to dummy proof them to only run once for that specific button instance, since that button may show up multiple times in chat. Well, like I said -- they would just be nice things, certainly not necessary. The math thing can be worked around a little bit, whereas the trigger one would be a little bit more on the, "this would be highly beneficial" thing. Granted, most of the time it would be for simply making things happen like sound effects, etc. In truth, the only thing I really would want to see, you've started working on, and that is making it so when a condition fails the field is not executed.
1453789055
Sky
Pro
SeanOG said: In truth, the only thing I really would want to see, you've started working on, and that is making it so when a condition fails the field is not executed. This is already done with the last update.
1453855264

Edited 1453855290
I can't even begin to explain what I'm referring to at the moment. LOL! I know the last update provided it, but there was something I was trying to do with conditionals where things didn't happen unless met, and it still occurred whether the condition was met or not. An example of what I mean, is this: !power {{ --hroll|?{Test|Yes|No} --name|Test --?? ?{Test} == Yes ?? Test:|[^SingleDmg] --?? ?{Test} == No ?? Test2:|[[ [$SingleDmg] {4} * 2 [Double Damage] ]] }} In this, Test 2 will still always execute, regardless of whether the answer was Yes or No, spitting a 4 out in the Test field.
1453887747
Ziechael
Pro
Sheet Author
You want to assign a value to your yes and no and add a 'roll' to it for the conditions to be met ideally (or at least that is what i do!):. You also need to give the roll an ID: !power {{ --hroll| [[ [$roll] ?{Test|Yes ,0 |No ,1 } + 0d0 ]] --name|Test --?? $roll == 0 ?? Test:|[^SingleDmg] --?? $roll == 1 ?? Test2:|[[ [$SingleDmg] {4} * 2 [Double Damage] ]] }}
1453888182
Sky
Pro
That's not actually needed Ziechael. There was an update at somepoint that lets you compare whatever is there. You could even do ?? Yes == Yes ?? and it will compare those two.
1453889209
Ziechael
Pro
Sheet Author
I vaguely remember that now, you know me, i tend to overlook recent updates in favour of a tried and tested method ;) Feel free to ignore me then Sean lol
1453934630
No worries Ziechael. Granted, in an instance like this I would typically eliminate the hroll, and just have the first check with the query, but I wanted to create an instance where the query definitely occurred before the conditional check occurred. It's the only way to really present what I mean when I say that fields where the conditions would not be met, still execute.
1454533057

Edited 1455473758
Sky
Pro
Here's a small modification you can add to your PowerCards script if you use the D&D 5e Character Sheet by Actoba. It grabs all the info about your character's skills and will print them and their modifiers in a macro. << deleted... now part of PowerCards by default... >> To use this, add --Skills5e|?{Ability Check|Strength|Dexterity|Constitution|Intelligence|Wisdom|Charisma} as a tag, such as in this macro for rolling an ability check: !power {{ --charid|@{selected|character_id} --name|?{Ability Check|Strength|Dexterity|Constitution|Intelligence|Wisdom|Charisma} Check --leftsub|@{selected|token_name} --?? ?{Ability Check|Strength|Dexterity|Constitution|Intelligence|Wisdom|Charisma} == Strength ?? !StrChk|**Results:** [[1d20 + [[@{selected|strength_mod}]] [Str Mod] + @{selected|global_check_bonus} [Misc. Mod] ]] | [[1d20 + [[@{selected|strength_mod}]] [Str Mod] + @{selected|global_check_bonus} [Misc. Mod] ]] --?? ?{Ability Check|Strength|Dexterity|Constitution|Intelligence|Wisdom|Charisma} == Dexterity ?? !DexChk|**Results:** [[1d20 + [[@{selected|dexterity_mod}]] [Dex Mod] + @{selected|global_check_bonus} [Misc. Mod] ]] | [[1d20 + [[@{selected|dexterity_mod}]] [Dex Mod] + @{selected|global_check_bonus} [Misc. Mod] ]] --?? ?{Ability Check|Strength|Dexterity|Constitution|Intelligence|Wisdom|Charisma} == Constitution ?? !ConChk|**Results:** [[1d20 + [[@{selected|constitution_mod}]] [Con Mod] + @{selected|global_check_bonus} [Misc. Mod] ]] | [[1d20 + [[@{selected|constitution_mod}]] [Con Mod] + @{selected|global_check_bonus} [Misc. Mod] ]] --?? ?{Ability Check|Strength|Dexterity|Constitution|Intelligence|Wisdom|Charisma} == Intelligence ?? !IntChk|**Results:** [[1d20 + [[@{selected|intelligence_mod}]] [Int Mod] + @{selected|global_check_bonus} [Misc. Mod] ]] | [[1d20 + [[@{selected|intelligence_mod}]] [Int Mod] + @{selected|global_check_bonus} [Misc. Mod] ]] --?? ?{Ability Check|Strength|Dexterity|Constitution|Intelligence|Wisdom|Charisma} == Wisdom ?? !WisChk|**Results:** [[1d20 + [[@{selected|wisdom_mod}]] [Wis Mod] + @{selected|global_check_bonus} [Misc. Mod] ]] | [[1d20 + [[@{selected|wisdom_mod}]] [Wis Mod] + @{selected|global_check_bonus} [Misc. Mod] ]] --?? ?{Ability Check|Strength|Dexterity|Constitution|Intelligence|Wisdom|Charisma} == Charisma ?? !ChaChk|**Results:** [[1d20 + [[@{selected|charisma_mod}]] [Cha Mod] + @{selected|global_check_bonus} [Misc. Mod] ]] | [[1d20 + [[@{selected|charisma_mod}]] [Cha Mod] + @{selected|global_check_bonus} [Misc. Mod] ]] --Skills5e|?{Ability Check|Strength|Dexterity|Constitution|Intelligence|Wisdom|Charisma} }}
1454538161
The Aaron
Pro
API Scripter
Sweet!
1454539043
Sky
Pro
I found it easier to do that and have one macro than to either constantly open the character sheet or fill the bar with six macros. One for each ability score. I have a similar macro for saving throws too.
1454629435
I have heavily edited the sheet so much, does the original have Jack of all Trades listed on the dropdown with proficient, expertise, etc.? If so, shouldn't that be in that code as well?
1454645112
Sky
Pro
Yeah... I probably should add that. Didn't even think about it.
1454734315
Normally I wouldn't either, but I have a player who plays a Bard... he never lets me forget he gets that for just about everything.
1454761766
Sky
Pro
Hah.
1455274274

Edited 1455274459
Sky
Pro
Here's a little something I've been working on this evening for Shawn M. SPELLBOOK! It's still very rough, but you can create a handout in Roll20 precisely named "Spellbook", no quotes... and this script will get the spell from the handout and send it to chat after doing any attribute replacements. However... it cannot handle roll queries or nested inline rolls. So there is that. Usage is as follows... !spellbook --Spell Name --@{character_id} // SPELLBOOK COMMAND HANDLER on("chat:message", function(msg) {     if (msg.type !== "api") return;     if (msg.content.split(" ", 1)[0] === "!spellbook" || msg.content.split(" ", 1)[0] === "!sb") {         msg.who = msg.who.replace(" (GM)", "");         var player_obj = getObj("player", msg.playerid);         var Spell = { who: msg.who };         var SpellToCast = msg.content.split("--")[1].trim();         var CharID = msg.content.split("--")[2].trim(); var Spellbook = findObjs({ _type: "handout", name: "Spellbook" })[0]; if (Spellbook !== undefined) { Spellbook.get("notes", function(notes) {                 if (notes.indexOf(SpellToCast + ":") !== -1) {                     notes = notes.split("<br>");                     notes.some(function(a) {                         SpellName = a.substring(0, a.indexOf(":")).trim();                         SpellContent = a.substring(a.indexOf(":") + 1).trim();                         if (SpellName === SpellToCast) {                             var Attr = "";                             var AttrName = "";                             while (SpellContent.indexOf("@{") !== -1) {                                 Attr = SpellContent.match(/\@\{(.*?)\}/)[0];                                 AttrName = Attr.substring(2, Attr.length-1);                                 SpellContent = SpellContent.replace(Attr, getAttrByName(CharID, AttrName));                             }                             Spell.content = "!power " + SpellContent;                             PowerCard.Process(Spell, player_obj);                         }                     });                 } else {                     sendChat("ERROR:", "/w " + msg.who + " Unable to locate '" + SpellToCast + "' in the Spellbook.");                 } }); } else { sendChat("ERROR:", "/w GM Unable to locate a Spellbook."); }     } });
1455274500
Sky
Pro
Inside the handout... use this format for the spells: Firebolt: --name|Firebolt --leftsub|Action --rightsub|Range 120 ft. --Attack:|[[1d20]] | [[1d20]] vs AC --Damage:|[[1d10]] fire damage Ray of Frost: --name|Ray of Frost --leftsub|Action --rightsub|Range 60 ft. --Attack:|[[1d20]] | [[1d20]] vs AC --Damage:|[[1d8]] cold damage and the target's speed is reduced by 10 feet until the start of your next turn
1455388545
Sky
Pro
February 13th, 2016 ~ 1:30 pm eastern Version: 3.2.13 Link: gist.github.com/Sky-Captain-13/452330a3d926b32da49c Update: Added the Skills5e reserved tag to PowerCards. This tag will automatically print a list of your character's skills, drawn from the attributes of the D&D 5e Community character sheet. It will not work with the OGL or the Shaped 5e character sheets. Update: Added an option to display number of successes or test against number of successes using Conditionals. [^RollID.ss] will display the number of successes from that roll. [^RollID.base] is always a sum of all the rolls, no modifiers. Base has nothing to do with successes at all. [^RollID.total] is always a sum of the successes of all rolls in the inline roll, not just the RollID used. So if you use multiple roll ID's in the same inline roll as below, it will always be the total result of all the rolls. The use of .ss is to break out successes from individual rolls within a multi-roll inline roll like this: [[ [$R1] 3d6>3 + [$R2] 3d6>3 ]]. The use of ^R1.ss will only show the successes from the first roll.
1455389228
This seems like an appropriate time to ask, so... How much work would it be to implement a feature like, say, [^RollID.base1], which displays the number of ones rolled within an inline roll?
1455389697
Sky
Pro
Silvyre said: This seems like an appropriate time to ask, so... How much work would it be to implement a feature like, say, [^RollID.base1], which displays the number of ones rolled within an inline roll? What does the inline roll look like?
1455389766

Edited 1455389866
Something like [[ (6 + 6)d6>5cs>5!6k3s ]]
1455389919
Sky
Pro
Ah, so you're already using successes with the > 5 part. Hrm, let me mess with it later. I'm hungry right now, but I'll look it sometime this afternoon/evening.
1455389934
Thanks!! :D
1455472561
Sky
Pro
February 14th, 2016 ~ 1:00 pm eastern Version: 3.2.14 Link: gist.github.com/Sky-Captain-13/452330a3d926b32da49c Major Bugfix: Fixed a major bug that would crash the script if you ran any powercard with inlinerolls that did not create a mods or mods.success property in msg.inlinerolls. 
1455473279
Sky
Pro
February 14th, 2016 ~ 1:06 pm eastern Version: 3.2.14a Link: gist.github.com/Sky-Captain-13/452330a3d926b32da49c Minor Update (Silvyre's Request): Added option to count number of ones in a roll using a Roll ID. To display the number of ones rolled use: [[ [$Roll] 10d10 ]] [^Roll.ones]
1455473561
You rock!!
1455474022
Sky
Pro
No problem. Took like five minutes... should have done it yesterday, but I was distracted. Should be easy enough to add in other options like that.
1455476873

Edited 1455476946
!power {{ --name|SR5 Glitch Test --Roll|[[ [$R] (?{Dice Pool|6 + 6})d6>5cs>5 ]] -- ?? $R.ones >= [[ ceil((?{Dice Pool}) / 2) ]] AND $R >= 1 ?? !GL|Glitch! -- ?? $R.ones >= [[ ceil((?{Dice Pool}) / 2) ]] AND $R == 0 ?? !CG|Critical glitch! }} Works like a charm!
1455477165
Sky
Pro
Awesome! ^_^
1455542205

Edited 1455542510
Hi man, I absolutely love the script and use it plenty to allow my player to relax and think about the tactical aspect instead of having to calculate rolls all the time but i seem to have run into a formatting issue. one of my PC's has asked me to implement a rollable table of insults to add to her emote for a bard skill and see what randomized giggles we can get out of that. I was testing those tables today and i noticed that the yellow box used to mark an inline rollable table result does not cover the actual result properly. Would it be possible to add an option to simply disable this background and have it blend into the emote as a whole? Current tags used to fill in the emote with an inline table roll: --charid|@{character_id} --emote|![[1t[KiaInsults]]] gives: including the character avatar gives: which is obviously not as slick as everything else powercardy :)
1455544510
Sky
Pro
Well, you can always add txt to the roll like this: [[ [txt] 1t[KiaInsults] ]] which will get rid of the inline roll background.
1455545048
I was just going to edit my post to add that i discovered that with another thorough read of the original post. Sorry for bothering you :)
1455557855
Phoxounet
Pro
Sheet Author
Translator
Hi there ! I submit a little problem I have to complete my powercards. Here is the code : !power {{ --charid|@{character_id} --emote|**@{character_name}** attacks with is **@{Weap1}** ! --name|Close Combat --leftsub|Attack --rightsub| **@{Weap1}** --Attack :|[[ [$Atk] 1D(?{risk|no,10|yes,20}) + @{Cap_Off1} }]] --?? $Atk.base == 1 OR $Atk.base == 11 ?? Critical Failure:| it's a Critical Failure --?? $Atk.base <> 1 AND $Atk.base <> 11 ?? Damage :| Damages are : [[@{Dég1}]] }} As you can see, there is a choice about using a risky dice or not. 1 is always a critical failure. Choosing a D10 die makes all values available as success except 1. Using a D20 die makes all even values as successes, 1 and 11 are critical failures and all other odd values are automatic failures. I could easily use conditionnals so that all odd values are failures (except 1 and 11 that are critical failures) but 3, 5, 7 and 9 would be considered as failures when choosing a D10 die whereas there should not.. I'm not sure if I can make a functioning macro using Powercards. Any help welcomed ! Regards. :)