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
This post has been closed. You can still view previous posts, but you can't post any new replies.

[Script] PowerCards 3 (Thread 4)

1503337312

Edited 1503337803
Forgot what I wrote, it works now, but I have absolutely no idea why...
pale81 said: Forgot what I wrote, it works now, but I have absolutely no idea why... NaN means not a number, so you might have had a letter or something in bar3 on a token.
Hiya,  I'm sure this information have been covered somewhere, but I can't figure out how to add a critical failure on a 1 instead of just a miss. !power {{ --emote|@{selected|token_name} zaps an opponent. --tokenid|@{selected|token_id} --format|atwill --name|Electrogun --leftsub|Ranged Attack --rightsub|Recharge 4-6 --Range|40/120 ft --Target|@{target|token_name} --Attack|[[ [$Atk] ?{Advantage?| Normal, 1d20+[[@{selected|dexterity_mod}]] | Advantage, 2d20KH1+[[@{selected|dexterity_mod}]] | Disadvantage, 2d20KL1+[[@{selected|dexterity_mod}]]} ]] vs **AC** [[@{target|bar1}]] --?? $Atk.base == 1 OR $Atk.total < @{target|bar1}?? !Miss:|$$#ff0000|**Miss!**$$ --?? $Atk.total >= @{target|bar1} AND $Atk.base > 1 AND $Atk.base < 20 ?? Hit:|[[2d6 + 2]] lightning damage --?? $Atk.base == 20 ?? Critical Hit:|[[4d6 + 2]] lightning damage, and the target is stunned until the end of its next turn.}}
1503349261

Edited 1503349270
?? $Atk.base == 1 ?? !CriticalMiss|You critically missed!
Thank you! 
A couple of questions about the conditional logic.  First, can I only put the Roll ID for comparison, or can I put in an inline expression along with the Roll ID for comparison?  Second, can I assign a Roll ID in the result of a logical expression? Example: --Roll:| [[ [$R] 1d20 ]] . . . --?? 21 <= $R AND $R <= 25 ?? Total:| [[ [$Q] 0d0 + @{Melee_Defense} + ?{Modifier|0} +8]] then later: --?? [[$Q - ?{Target Defense|0}]] < 0 ?? Miss:| Fail --?? 0 <= [[$Q - ?{Target Defense|0}]] AND [[$Q - ?{Target Defense|0}]] <= 4 ?? Hit:| Standard Success --?? 5 <= [[$Q - ?{Target Defense|0}]] AND [[$Q - ?{Target Defense|0}]] <= 9 ?? Hit:| Good Success --?? 10 <= [[$Q - ?{Target Defense|0}]] ?? Hit:| Outstanding Success Marko
1503510471

Edited 1503510576
Use $Q < ?{Target Defense} instead of [[$Q - ?{Target Defense|0}]] < 0 Likewise, use $Q <= [[4 + ?{Target Defense|0}]] instead of [[$Q - ?{Target Defense|0}]] <= 4, etc.
It didn't work.  All I got was this: Here's the complete macro: !power {{ --format|sean --titlefont|Helvetica --subtitlefont|Helvetica --titlefontshadow|none --charid|@{Name} --name|@{Name}'s Alteration Check --Roll:| [[ [$R] 1d20!10!!20cf<4cs10cs>20 ]] --?? $R == 1 ?? Total:| MISHAP --?? $R == 2 ?? Total:| [[ [$Q] 0d0 + @{Alteration} + ?{Modifier|0} -8]] --?? $R == 3 ?? Total:| [[ [$Q] 0d0 + @{Alteration} + ?{Modifier|0} -6]] --?? $R == 4 ?? Total:| [[ [$Q] 0d0 + @{Alteration} + ?{Modifier|0} -6]] --?? $R == 5 ?? Total:| [[ [$Q] 0d0 + @{Alteration} + ?{Modifier|0} -4]] --?? $R == 6 ?? Total:| [[ [$Q] 0d0 + @{Alteration} + ?{Modifier|0} -4]] --?? $R == 7 ?? Total:| [[ [$Q] 0d0 + @{Alteration} + ?{Modifier|0} -2]] --?? $R == 8 ?? Total:| [[ [$Q] 0d0 + @{Alteration} + ?{Modifier|0} -2]] --?? $R == 9 ?? Total:| [[ [$Q] 0d0 + @{Alteration} + ?{Modifier|0} -1]] --?? $R == 10 ?? Total:| [[ [$Q] 0d0 + @{Alteration} + ?{Modifier|0} -1]] --?? $R == 11 ?? Total:| [[ [$Q] 0d0 + @{Alteration} + ?{Modifier|0}]] --?? $R == 12 ?? Total:| [[ [$Q] 0d0 + @{Alteration} + ?{Modifier|0}]] --?? $R == 13 ?? Total:| [[ [$Q] 0d0 + @{Alteration} + ?{Modifier|0} +1]] --?? $R == 14 ?? Total:| [[ [$Q] 0d0 + @{Alteration} + ?{Modifier|0} +1]] --?? $R == 15 ?? Total:| [[ [$Q] 0d0 + @{Alteration} + ?{Modifier|0} +2]] --?? $R == 16 ?? Total:| [[ [$Q] 0d0 + @{Alteration} + ?{Modifier|0} +3]] --?? $R == 17 ?? Total:| [[ [$Q] 0d0 + @{Alteration} + ?{Modifier|0} +4]] --?? $R == 18 ?? Total:| [[ [$Q] 0d0 + @{Alteration} + ?{Modifier|0} +5]] --?? $R == 19 ?? Total:| [[ [$Q] 0d0 + @{Alteration} + ?{Modifier|0} +6]] --?? $R == 20 ?? Total:| [[ [$Q] 0d0 + @{Alteration} + ?{Modifier|0} +7]] --?? 21 <= $R AND $R <= 25 ?? Total:| [[ [$Q] 0d0 + @{Alteration} + ?{Modifier|0} +8]] --?? 26 <= $R AND $R <= 30 ?? Total:| [[ [$Q] 0d0 + @{Alteration} + ?{Modifier|0} +9]] --?? 31 <= $R AND $R <= 35 ?? Total:| [[ [$Q] 0d0 + @{Alteration} + ?{Modifier|0} +10]] --?? 36 <= $R AND $R <= 40 ?? Total:| [[ [$Q] 0d0 + @{Alteration} + ?{Modifier|0} +11]] --?? 41 <= $R AND $R <= 45 ?? Total:| [[ [$Q] 0d0 + @{Alteration} + ?{Modifier|0} +12]] --?? 46 <= $R AND $R <= 50 ?? Total:| [[ [$Q] 0d0 + @{Alteration} + ?{Modifier|0} +13]] --?? 51 <= $R AND $R <= 55 ?? Total:| [[ [$Q] 0d0 + @{Alteration} + ?{Modifier|0} +14]] --?? 56 <= $R AND $R <= 60 ?? Total:| [[ [$Q] 0d0 + @{Alteration} + ?{Modifier|0} +15]] --?? 61 <= $R AND $R <= 65 ?? Total:| [[ [$Q] 0d0 + @{Alteration} + ?{Modifier|0} +16]] --?? 66 <= $R AND $R <= 70 ?? Total:| [[ [$Q] 0d0 + @{Alteration} + ?{Modifier|0} +17]] --?? 71 <= $R AND $R <= 75 ?? Total:| [[ [$Q] 0d0 + @{Alteration} + ?{Modifier|0} +18]] --?? 76 <= $R AND $R <= 80 ?? Total:| [[ [$Q] 0d0 + @{Alteration} + ?{Modifier|0} +19]] --?? $Q < ?{Target Defense} ?? Miss:| Fail --?? $Q => [[?{Target Defense|0}]] AND $Q <= [[4 + ?{Target Defense|0}]] ?? Hit:| Standard Success --?? $Q => [[5 + ?{Target Defense|0}]] AND $Q <= [[9 +?{Target Defense|0}]] ?? Hit:| Good Success --?? $Q => [[10 + ?{Target Defense|0}]] ?? Hit:| Outstanding Success }}
1503527731

Edited 1512181531
Unique [$RollIDs] can only be defined once within a macro; they cannot be defined by the outcome of conditionals. Here is a macro that works around this: !power {{ --format|sean --titlefont|Helvetica --subtitlefont|Helvetica --titlefontshadow|none --charid|@{Name} --name|@{Name}'s Alteration Check --Roll:| Due to the nature of this workaround, the total roll can only be viewed by hovering over the inline roll below. (The total roll is the number to the right of the < sign.) --Total:| [[ [$Q] @{Alteration} + ?{Modifier|0} - 9 + {2,3,3,5,5,7,7,9,11,13,15,16,17,18,19,20,21,26,31,36,41,46,51,56,61,66,71,76}<[[1d20!10!!20]] ]] --?? $Q == [[@{Alteration} + ?{Modifier} - 9]] ?? Mishap:| MISHAP --?? $Q < [[?{Target Defense|0}]] ?? Miss:| Fail --?? $Q >= [[?{Target Defense}]] AND $Q <= [[4 + ?{Target Defense}]] ?? Hit:| Standard Success --?? $Q >= [[5 + ?{Target Defense}]] AND $Q <= [[9 + ?{Target Defense}]] ?? Hit:| Good Success --?? $Q >= [[10 + ?{Target Defense}]] ?? Hit:| Outstanding Success }} (Also, you will want to replace all instances of => with >=)
Thank you!  Another question: what happened to the avatar image prefixing an emote?  Is that no longer the case anymore?  Is there a way to turn that back on for emote? Marko
Oh, you'll want to use --charid|@{character_id} instead of @{Name}
Hmm...no dice (pun sort of intended).  Is there a size limit on the avatar picture it pulls from the character sheet?
No; post your current macro?
!power {{ --format|eric --titlefontshadow|none --charid|@{character_id} --emote|!Mongoose depresses the trigger of his magical SMG, letting loose a burst of fire! --name|@{Name}'s Fire Combat Check --leftsub|Short Burst --Roll:| [[ [$R] 1d20!10!!20cf<4cs10cs>20 ]] --?? $R == 1 ?? Total:| MISHAP --?? $R == 2 ?? Total:| [[@{FireCombat} + 3 + ?{Modifier|0} -8]] --?? $R == 3 ?? Total:| [[@{FireCombat} + 3 + ?{Modifier|0} -6]] --?? $R == 4 ?? Total:| [[@{FireCombat} + 3 + ?{Modifier|0} -6]] --?? $R == 5 ?? Total:| [[@{FireCombat} + 3 + ?{Modifier|0} -4]] --?? $R == 6 ?? Total:| [[@{FireCombat} + 3 + ?{Modifier|0} -4]] --?? $R == 7 ?? Total:| [[@{FireCombat} + 3 + ?{Modifier|0} -2]] --?? $R == 8 ?? Total:| [[@{FireCombat} + 3 + ?{Modifier|0} -2]] --?? $R == 9 ?? Total:| [[@{FireCombat} + 3 + ?{Modifier|0} -1]] --?? $R == 10 ?? Total:| [[@{FireCombat} + 3 + ?{Modifier|0} -1]] --?? $R == 11 ?? Total:| [[@{FireCombat} + 3 + ?{Modifier|0}]] --?? $R == 12 ?? Total:| [[@{FireCombat} + 3 + ?{Modifier|0}]] --?? $R == 13 ?? Total:| [[@{FireCombat} + 3 + ?{Modifier|0} +1]] --?? $R == 14 ?? Total:| [[@{FireCombat} + 3 + ?{Modifier|0} +1]] --?? $R == 15 ?? Total:| [[@{FireCombat} + 3 + ?{Modifier|0} +2]] --?? $R == 16 ?? Total:| [[@{FireCombat} + 3 + ?{Modifier|0} +3]] --?? $R == 17 ?? Total:| [[@{FireCombat} + 3 + ?{Modifier|0} +4]] --?? $R == 18 ?? Total:| [[@{FireCombat} + 3 + ?{Modifier|0} +5]] --?? $R == 19 ?? Total:| [[@{FireCombat} + 3 + ?{Modifier|0} +6]] --?? $R == 20 ?? Total:| [[@{FireCombat} + 3 + ?{Modifier|0} +7]] --?? 21 <= $R AND $R <= 25 ?? Total:| [[@{FireCombat} + 3 + ?{Modifier|0} +8]] --?? 26 <= $R AND $R <= 30 ?? Total:| [[@{FireCombat} + 3 + ?{Modifier|0} +9]] --?? 31 <= $R AND $R <= 35 ?? Total:| [[@{FireCombat} + 3 + ?{Modifier|0} +10]] --?? 36 <= $R AND $R <= 40 ?? Total:| [[@{FireCombat} + 3 + ?{Modifier|0} +11]] --?? 41 <= $R AND $R <= 45 ?? Total:| [[@{FireCombat} + 3 + ?{Modifier|0} +12]] --?? 46 <= $R AND $R <= 50 ?? Total:| [[@{FireCombat} + 3 + ?{Modifier|0} +13]] --?? 51 <= $R AND $R <= 55 ?? Total:| [[@{FireCombat} + 3 + ?{Modifier|0} +14]] --?? 56 <= $R AND $R <= 60 ?? Total:| [[@{FireCombat} + 3 + ?{Modifier|0} +15]] --?? 61 <= $R AND $R <= 65 ?? Total:| [[@{FireCombat} + 3 + ?{Modifier|0} +16]] --?? 66 <= $R AND $R <= 70 ?? Total:| [[@{FireCombat} + 3 + ?{Modifier|0} +17]] --?? 71 <= $R AND $R <= 75 ?? Total:| [[@{FireCombat} + 3 + ?{Modifier|0} +18]] --?? 76 <= $R AND $R <= 80 ?? Total:| [[@{FireCombat} + 3 + ?{Modifier|0} +19]] }}
--emote|! From the OP: emote - Creates an emote on top of the power card. Set CUSTOM_EMOTES to false in script to return to standard Roll20 orange emotes. If you have charid and emote together in the macro to use the power card styled emotes, you can put an exclamation mark in front of the emote to not show the avatar for that macro. Example: --emote|This emote would have an avatar. Example: --emote|! This emote would not have an avatar.
1503855866

Edited 1503855898
So has anyone else started having issues with their power card macros after pathfinder sheet update 1.68? they all worked fine until then and now it just ouputs the text of the macros. below is an example of the macro i use !power {{ --charid|@{character_id} --emote|@{character_name} screams "Tempus" and attacks --name|@{repeating_Weapon_-kgmpohqak5vykoepdzm_name} --title|@{repeating_weapon_-kgmpohqak5vykoepdzm_notes} --leftsub|@{class-0-name} --rightsub| @{repeating_Weapon_-kgmpohqak5vykoepdzm_type} --$|?{Attack?|Single,1|Full,2|Hasted,3} --Attack:|~R[[ [$Atk] 1d20 + @{repeating_Weapon_-kgmpohqak5vykoepdzm_total-attack}]]~R --Damage:|~R[[@{repeating_Weapon_-kgmpohqak5vykoepdzm_damage-dice-num}d@{repeating_Weapon_-kgmpohqak5vykoepdzm_damage-die}+@{repeating_Weapon_-kgmpohqak5vykoepdzm_total-damage}]]~R --@{repeating_Weapon_-kgmpohqak5vykoepdzm_precision_dmg_type}:|~R[[(@{repeating_Weapon_-kgmpohqak5vykoepdzm_precision_dmg_macro})]]~R --??$Atk.base >= @{repeating_Weapon_-kgmpohqak5vykoepdzm_crit-target}?? !*4|^^ --??$Atk.base >= @{repeating_Weapon_-kgmpohqak5vykoepdzm_crit-target}?? Confirmation:|~R[[(1d20 + @{repeating_Weapon_-kgmpohqak5vykoepdzm_total-attack} + 4)]]~R --?? $Atk.base >= @{repeating_Weapon_-kgmpohqak5vykoepdzm_crit-target}?? Crit Damage:|~R[[{@{repeating_Weapon_-kgmpohqak5vykoepdzm_damage-dice-num}d@{repeating_Weapon_-kgmpohqak5vykoepdzm_damage-die}+@{repeating_Weapon_-kgmpohqak5vykoepdzm_total-damage}}*(@{repeating_Weapon_-kgmpohqak5vykoepdzm_crit-multiplier}-1)]]~R --?? $Atk.base >= @{repeating_Weapon_-kgmpohqak5vykoepdzm_crit-target} ?? Effect:|~RBleeding Crit (+2d6 Bleeding P/R)~R --?? ?{Attack?} >= 2 ?? !*0|~~~ --?? ?{Attack?} >= 2 ?? Attack2:|~R[[ [$Atk2] 1d20 + @{repeating_Weapon_-kgmpohqak5vykoepdzm_total-attack} + @{repeating_Weapon_-kgmpohqak5vykoepdzm_iterative_attack2_value}]]~R --?? ?{Attack?} >= 2 ?? Damage2:|~R[[@{repeating_Weapon_-kgmpohqak5vykoepdzm_damage-dice-num}d@{repeating_Weapon_-kgmpohqak5vykoepdzm_damage-die}+@{repeating_Weapon_-kgmpohqak5vykoepdzm_total-damage}]]~R --?? ?{Attack?} >= 2 ?? @{repeating_Weapon_-kgmpohqak5vykoepdzm_precision_dmg_type}2:|~R[[(@{repeating_Weapon_-kgmpohqak5vykoepdzm_precision_dmg_macro})]]~R --?? ?{Attack?} >= 2 AND $Atk2.base >= @{repeating_Weapon_-kgmpohqak5vykoepdzm_crit-target}?? !*5|^^ --?? ?{Attack?} >= 2 AND $Atk2.base >= @{repeating_Weapon_-kgmpohqak5vykoepdzm_crit-target}?? Confirmation2:|~R[[(1d20 + @{repeating_Weapon_-kgmpohqak5vykoepdzm_total-attack} +@{repeating_Weapon_-kgmpohqak5vykoepdzm_iterative_attack2_value} +4) * (@{repeating_Weapon_-kgmpohqak5vykoepdzm_crit-multiplier}-1)]]~R --?? ?{Attack?} >= 2 AND $Atk2.base >= @{repeating_Weapon_-kgmpohqak5vykoepdzm_crit-target}?? Crit Damage2:|~R[[@{repeating_Weapon_-kgmpohqak5vykoepdzm_damage-dice-num}d@{repeating_Weapon_-kgmpohqak5vykoepdzm_damage-die}+@{repeating_Weapon_-kgmpohqak5vykoepdzm_total-damage}]]~R --?? ?{Attack?} >= 2 AND $Atk2.base >= @{repeating_Weapon_-kgmpohqak5vykoepdzm_crit-target}?? Effect:|~RBleeding Crit (+2d6 Bleeding P/R)~R --?? ?{Attack?} >= 2 ?? !*1|~~~ --?? ?{Attack?} >= 2 ?? Attack3:|~R[[ [$Atk3] 1d20 + @{repeating_Weapon_-kgmpohqak5vykoepdzm_total-attack} + @{repeating_Weapon_-kgmpohqak5vykoepdzm_iterative_attack3_value}]]~R --?? ?{Attack?} >= 2 ?? Damage3:|~R[[@{repeating_Weapon_-kgmpohqak5vykoepdzm_damage-dice-num}d@{repeating_Weapon_-kgmpohqak5vykoepdzm_damage-die}+@{repeating_Weapon_-kgmpohqak5vykoepdzm_total-damage}]]~R --?? ?{Attack?} >= 2 ?? @{repeating_Weapon_-kgmpohqak5vykoepdzm_precision_dmg_type}3:|~R[[(@{repeating_Weapon_-kgmpohqak5vykoepdzm_precision_dmg_macro})]]~R --?? ?{Attack?} >= 2 AND $Atk3.base >= @{repeating_Weapon_-kgmpohqak5vykoepdzm_crit-target}?? !*6|^^ --?? ?{Attack?} >= 2 AND $Atk3.base >= @{repeating_Weapon_-kgmpohqak5vykoepdzm_crit-target}?? Confirmation3:|~R[[(1d20 + @{repeating_Weapon_-kgmpohqak5vykoepdzm_total-attack} +@{repeating_Weapon_-kgmpohqak5vykoepdzm_iterative_attack3_value}+ 4) * (@{repeating_Weapon_-kgmpohqak5vykoepdzm_crit-multiplier}-1)]]~R --?? ?{Attack?} >= 2 AND $Atk3.base >= @{repeating_Weapon_-kgmpohqak5vykoepdzm_crit-target}?? Crit Damage3:|~R[[@{repeating_Weapon_-kgmpohqak5vykoepdzm_damage-dice-num}d@{repeating_Weapon_-kgmpohqak5vykoepdzm_damage-die}+@{repeating_Weapon_-kgmpohqak5vykoepdzm_total-damage}]]~R --?? ?{Attack?} >= 2 AND $Atk3.base >= @{repeating_Weapon_-kgmpohqak5vykoepdzm_crit-target}?? Effect:|~RBleeding Crit (+2d6 Bleeding P/R)~R --?? ?{Attack?} >= 3 ?? !*2|~~~ --?? ?{Attack?} >= 3 ?? Haste Attack:|~R[[ [$Atk4] 1d20 + @{repeating_Weapon_-kgmpohqak5vykoepdzm_total-attack}]]~R --?? ?{Attack?} >= 3 ?? Haste Damage:|~R[[@{repeating_Weapon_-kgmpohqak5vykoepdzm_damage-dice-num}d@{repeating_Weapon_-kgmpohqak5vykoepdzm_damage-die}+@{repeating_Weapon_-kgmpohqak5vykoepdzm_total-damage}]]~R --?? ?{Attack?} >= 3 ??@{repeating_Weapon_-kgmpohqak5vykoepdzm_precision_dmg_type}Haste:|~R[[(@{repeating_Weapon_-kgmpohqak5vykoepdzm_precision_dmg_macro})]]~R --?? ?{Attack?} >= 3 AND $Atk4.base >= @{repeating_Weapon_-kgmpohqak5vykoepdzm_crit-target}?? !*7|^^ --?? ?{Attack?} >= 3 AND $Atk4.base >= @{repeating_Weapon_-kgmpohqak5vykoepdzm_crit-target}?? Confirmation Haste:|~R[[(1d20 + @{repeating_Weapon_-kgmpohqak5vykoepdzm_total-attack} + 4) * (@{repeating_Weapon_-kgmpohqak5vykoepdzm_crit-multiplier}-1)]]~R --?? ?{Attack?} >= 3 AND $Atk4.base >= @{repeating_Weapon_-kgmpohqak5vykoepdzm_crit-target}?? Crit Damage Haste:|~R[[@{repeating_Weapon_-kgmpohqak5vykoepdzm_damage-dice-num}d@{repeating_Weapon_-kgmpohqak5vykoepdzm_damage-die}+@{repeating_Weapon_-kgmpohqak5vykoepdzm_total-damage}]]~R --?? ?{Attack?} >= 3 AND $Atk4.base >= @{repeating_Weapon_-kgmpohqak5vykoepdzm_crit-target}?? Effect:|~RBleeding Crit (+2d6 Bleeding P/R)~R }} Any help would be greatly apprecieated.
1503856495

Edited 1503856558
they all worked fine until then and now it just ouputs the text of the macros A screenshot might be useful. You may also want to try to reduce your macro's size until it works, and then add to it until it does not work. That will help determine the cause of the issue. If the issue lies with a sheet update, then it's possible that one of the Attributes was changed (e.g. to include a }} somewhere).
Thanks, Silvyre, that worked.  You rock! Marko
Hopefully a simple question- I have a macro that I am using where I want to use a conditional to check an enemy's remaining HP after making a call to the AlterBars script.  If the enemy is reduced to 0 or less, then the script would call AlterBars on the user to give them experience.  Unfortunately, it seems like the macro won't fetch updated information when it runs that part; so if I run it while the enemy is already at or below 0, it works, but if they are above 0 and then have the damage from AlterBars reduce them to 0 or less, it will still see them as being above 0, so it won't call the experience part. Here's the full macro, for reference.  I've played around with another, much more convoluted version that would get around this limitation, but haven't been able to get that to work either.  So I'm hoping this simple version can work, that there's a workaround or something. !power {{ --tokenid|@{selected|token_id} --name|Attack --leftsub|Physical --rightsub|Normal --!Roll|@{selected|character_name} has a [[ [NH] [$Hit] 1d0 + @{selected|Acc} [Accuracy] + ?{Accuracy Bonus/Penalty|0} - @{target|Evade} [Evasion] ]]% chance to hit @{target|character_name}... --?? [[ [$HitCheck] 2d100/2]] > $Hit ?? !Miss|Sorry, you missed this one. --?? $HitCheck <= $Hit ?? !Hit|Success! Now rolling against a [[ [NH] [$Crit] 1d0 + @{selected|Crit} [Critical] - @{target|CritEvade} [Crit Evasion] ]]% critical chance... --?? [[ [$CritCheck] 2d100/2]] <= $Crit ?? $Crit|It's a crit! Deal increased damage! --?? $HitCheck <= $Hit AND $CritCheck > $Crit ?? !Damage|@{selected|character_name} deals [[ @{selected|Str} + @{selected|Dmg} + @{selected|Dmg_Bonus} + ?{Damage Bonus/Penalty|0} - @{target|Def} ]] damage! --?? $HitCheck <= $Hit AND $CritCheck > $Crit ?? alterbar1|_target|@{target|token_id} _bar|1 _amount|-( @{selected|Str} + @{selected|Dmg} + @{selected|Dmg_Bonus} + ?{Damage Bonus/Penalty|0} - @{target|Def} ) --?? $HitCheck <= $Hit AND $CritCheck <= $Crit ?? !CritDamage|@{selected|character_name} crits! It deals [[ ( @{selected|Str} + @{selected|Dmg} + @{selected|Dmg_Bonus} + ?{Damage Bonus/Penalty|0} - @{target|Def} ) * ?{Crit Multiplier|3} ]] damage! --?? $HitCheck <= $Hit AND $CritCheck <= $Crit ?? alterbar1|_target|@{target|token_id} _bar|1 _amount|-(( @{selected|Str} + @{selected|Dmg} + @{selected|Dmg_Bonus} + ?{Damage Bonus/Penalty|0} - @{target|Def} ) * ?{Crit Multiplier|3} ) --?? @{target|bar1} <= 0 ?? !victory|For defeating their foe, @{selected|character_name} receives [[20]] experience! --?? @{target|bar1} <= 0 ?? alterbar2|_target|@{selected|token_id} _bar|2 _amount|+20 --?? @{target|bar1} > 0 ?? alterbar2|_target|@{selected|token_id} _bar|2 _amount|+5 }}
You would need to run a second macro. AlterBars doesn't run until after the PowerCard script is done.
Drat, I was afraid of that.  Thanks!
1504283875

Edited 1504287671
Alright, so I'm trying to make a macro for multi-targets using Powercards. Now the tricky thing is trying to make the damage automatically apply. Anyone got an idea for a macro like this?: !power --name|Fireball --target_list|@{target|1st|token_id} | @{target|2nd|token_id} | @{target|3rd|token_id} | @{target|4th|token_id} | @{target|5th|token_id} | @{target|6th|token_id} | @{target|7th|token_id} | @{target|8th|token_id} | @{target|9th|token_id} --Attack#?{Number of targets|1}|[[ [$Atk] 1d20+5 ]] vs [[ [$dexsave] 1d5+1 ]] --?? $Atk >= $dexsave ?? Hit|[[ [$Dmg] 1d8+3]] fire damage --?? $Atk >= $dexsave ?? alterbar1|_target|@{target|token_id} _bar|1 _amount|-[^Dmg] _show|all }} This is a superbasic macro, not trying to make it do anything concerning modifiers or correct detection. Just proof of concept. Thanks! Edit: Found a bug for alterbar. Moved the bug to the right thread.
1504286610

Edited 1504286642
Multidamage: Sky said: Not via powercards unfortunately.
pale81 said: Multidamage: Sky said: Not via powercards unfortunately. Ah gotcha. Ty sir.
Not sure if this is the right place will power cards allow nesting of macros? 
Nope.
I have a table to roll fumbles called CFM. How can i roll on the table and display it on a powercard. Can I select the different table from the same power card, CFM CFR CFN? Melee, range Natural. So They roll a 1 Click on the macro that displays a choice Melee, Range, Natural and it displays the roll on the powercard.
Make a conditional for type and add [[ [txt] 1t[TableName]]] in each conditional.
How do i get something like this to work with power card? In the example below a windows pops up with a drop down. The player selects the type and the table rolls. I want to change this out put into a power card. &{template:npcaction} {{name=@{Selected|character_name}}} {{rname=You Messed Up Big Time}} {{description=?{Which Type|Melee, [[1t[CFM]]] |Range, [[1t[CFR]]] |Unarmed, [[1t[CFUoN]]]}}}{{charname=@{Selected|character_name}}}
1505069548

Edited 1505069578
Try this: !power --name|You Messed Up Big Time --!|[[ [TXT] 1t[CF?{Which Type|Melee,M|Range,R|Unarmed,UoN}] ]]
Perfect thank you.
Hello everyone, Ive been working with power cards api and been building some very nice macro's. For the most part I've been able to find or fix most the issue's as I come across them but lately I haven't been able to fix the current problem I'm having.  Rapid Shot Full Combat Action ♦ Feat Gifted Ability Attack1 Shot 1 29 Attack2 Shot 2 31 Attack3 Shot 3 31 Hit: 17 Piercing damage, and 5Electrical. Hit: $[[8]] Piercing damage, and $[[16]] Electrical. Critical Hit: 27 Piercing damage, plus 9 Electrical Damage Subject must make DC14 Fortitude Save or be permanently Deaf. Save Roll: 11 Hit: $[[8]] Piercing damage, and $[[16]] Electrical. The Error occurs if multiple strikes land, I can't figure out the issue. Here is the code minus the cosmetic bits: !power {{ --emote|Vrax Rapidly shoots his @{vrax|weapon1name} at @{target|npcname} --name|Rapid Shot --leftsub|Full Combat Action --rightsub|Feat Gifted Ability --Attack1|Shot 1 [[ [$Atk1] 1d20 + @{vrax|bab} + @{vrax|weapon1stat} +@{vrax|weapon1focus} + @{vrax|weapon1enh}-2 ]] --Attack2|Shot 2 [[ [$Atk2] 1d20 + @{vrax|bab2} + @{vrax|weapon1stat} +@{vrax|weapon1focus} + @{vrax|weapon1enh}-2 ]] --Attack3|Shot 3 [[ [$Atk3] 1d20 + @{vrax|bab} + @{vrax|weapon1stat} +@{vrax|weapon1focus} + @{vrax|weapon1enh}-2 ]] --?? $Atk1.base == 1 OR $Atk1.total < @{target|npcarmorclass}?? !Miss:|You missed. --?? $Atk1.total >= @{target|npcarmorclass} AND $Atk1.base <> 1 AND $Atk1.base <> 20 ?? Hit:| [[ 1d8 + @{vrax|weapon1enh} + @{vrax|weapon1damagestat} + @{vrax|weapon1specialize}]] Piercing damage, and [[ 1d6 ]] Electrical. --?? $Atk1.base >= @{vrax|weapon1critmin} ?? Critical Hit:| [[ 3d8 + @{vrax|weapon1enh} + @{vrax|weapon1damagestat} + @{vrax|weapon1specialize} ]] Piercing damage, plus [[ 2d8 ]] Electrical Damage Subject must make DC14 Fortitude Save or be permanently Deaf. Save Roll: [[ 1d20 + @{target|npcfortsave} ]] --?? $Atk2.base == 1 OR $Atk2.total < @{target|npcarmorclass}?? !Miss:|You missed. --?? $Atk2.total >= @{target|npcarmorclass} AND $Atk2.base <> 1 AND $Atk.base <> 20 ?? Hit:| [[ 1d8 + @{vrax|weapon1enh} + @{vrax|weapon1damagestat} + @{vrax|weapon1specialize} ]] Piercing damage, and [[ 1d6 ]] Electrical. --?? $Atk2.base >= @{vrax|weapon1critmin} ?? Critical Hit:| [[ 3d8 + @{vrax|weapon1enh} + @{vrax|weapon1damagestat} + @{vrax|weapon1specialize} ]] Piercing damage, plus [[ 2d8 ]] Electrical Damage Subject must make DC14 Fortitude Save or be permanently Deaf. Save Roll: [[ 1d20 + @{target|npcfortsave}]] --?? $Atk3.base == 1 OR $Atk3.total < @{target|npcarmorclass}?? !Miss:|You missed. --?? $Atk3.total >= @{target|npcarmorclass} AND $Atk3.base <> 1 AND $Atk3.base <> 20 ?? Hit:| [[ 1d8 + @{vrax|weapon1enh} + @{vrax|weapon1damagestat} + @{vrax|weapon1specialize} ]] Piercing damage, and [[ 1d6 ]] Electrical. --?? $Atk3.base >= @{vrax|weapon1critmin} ?? Critical Hit:| [[ 3d8 + @{vrax|weapon1enh} + @{vrax|weapon1damagestat} + @{vrax|weapon1specialize} ]] Piercing damage, plus [[ 2d8 ]] Electrical Damage Subject must make DC14 Fortitude Save or be permanently Deaf. Save Roll: Save Roll: [[ 1d20 + @{target|npcfortsave} ]] }} Thank you to anyone that takes the time to look this over.
PowerCards cannot simultaneously display two tags with identical names. From the OP: Same Name: This tag option is used to enable the use tags with the same name. Unlike repeating tags, the content is unique to each tag of the same name. To use this tag, add an asterisk * followed by a number (cannot use the same numbers). Example: Tag *1|Content Example: Tag *2|Content
Well bummer, any idea how to do something along this line but maybe smoother?
Saabyr said: Well bummer, any idea how to do something along this line but maybe smoother? Your macro will work. Just need to add *1, *2, etc as needed. So instead of !Miss| You need to use !Miss *1|, !Miss *2| etc for all your tags with the same names. The *1, *2 and so on will be removed before it is sent to the chat window.
1505370751

Edited 1505372494
mAc
Pro
Hi, I'm trying to make a macro that will roll a Constitution saving throw for a selected or targeted token.   No matter what I try, I can't get it to work. It should be simple, too. Could someone post how to do it so I can use it as an example going forward? I'm using the 5e OGL sheet if that makes a difference.
1505380920
Ziechael
Forum Champion
Sheet Author
API Scripter
Show us what you have already mAc and there is no shortage of people who will be happy to advise :)
1505457431

Edited 1505457444
mAc
Pro
Here's what I'm working with: !power --name|Constitution Save --target_list|@{target| |token_id} --Saving Throw|[[1d20+@{wisdom-mod}]] (%%token_name%%) I get an error when I try to run this. This is using the Wisdom mod for testing purposes, but I want it to be a CON save. The problem is figuring out what variable to use. I have no idea where I am supposed to look to find that out. I know in some sheets there is a constitution_save variable but I don't see it in the OGL sheet and I'm not sure what syntax I'd use for it here (%% or @, etc.) Basically I just want to be able to click a token and have it make a CON save. This is D&D 5e.
1505486654

Edited 1505486781
Basic question first: do you have the PowerCards API script installed? Next: What does the error message say? Next: Do you see any errors in the API window?
Yes I do, I have it installed, but I can't check the latter two until later. Actually, totally different question. Is there a way to code a "skill challenge" type situation, where I can get X number of rolls from someone before Y failures? So you click a token, a popup appears and asks for X and Y, then you hit OK and it produces the results in a pre-written text.
Actually, let me scale back to something super simple. I'll start small. What command or tags do I use to make a token avatar appear with an emote? I want to format it like the example in the OP, where you have the stat block for the attack and the emote in a different style than roll20's.
!power {{ --charid|@{character_id} --emote|This is an emote. --name|Power Name --Attack:|[[1d20]] vs AC --Damage:|[[1d8]] slashing }}
1505609153

Edited 1505609560
mAc
Pro
OK! Thanks! Now we can begin the troubleshooting. I tried selecting a token, then pasting that into the chat and hitting enter to activate it. I got an error:  TypeError: Cannot read property 'substring' of undefined Similar attempts have worked so I think it's the charid line for some reason.
Aha! It was because I didn't add it as a token action. When I did, it worked. Thanks! Now to see what else I can do.
1505610057

Edited 1505611399
mAc
Pro
Here's another question. I want to make it print the target's name in the emote. It doesn't do that and just prints my syntax there instead. Here's my code: !power {{ --charid|@{character_id} --emote|@{character_name} hurtles towards {target| |character_name})! --format|atwill --name|Slam --leftsub|Action --rightsub|Reach 5 ft. --target_list|@{target| |token_id} --Attack|[[1d20+4]] | [[1d20+4]] vs %%AC%% AC (%%token_name%%) --Hit|[[1d6+2]] bludgeoning damage --Crit|Add an extra [[1d6]] }} Also, is it possible to add charms when you're not targeting but only have a selected token with an ability? For example, I click a token ability and I want to print a name or some other property of the selected token in the text.
1505610924

Edited 1505624431
--charid assumes that you're running this macro on a character using the Abilities tab. It won't work through pasting into chat. As for target name and such, for that you can just use @{target|token_name} and @{target|npc_ac} (If using the D&D 5e OGL Character sheet). The %%AC%% syntax is for the multi-attack option and requires a --target_list as well. You should not be using it for single target attacks. !power {{ --charid|@{character_id} --emote|@{character_name} hurtles towards @{target||token_name}! --name|Slam --leftsub|Action --rightsub|Reach 5 ft. --Attack|[[1d20+4]] | [[1d20+4]] vs **@{target||npc_ac} AC** --Hit|[[1d6+2]] bludgeoning damage --Crit|Add an extra [[1d6]] }}
1505611524

Edited 1505611572
mAc
Pro
OK, I tried subbing in your code for the token action to see what would happen. "Festering Goblin hurtles towards {target||token_name}!" It had the same issue. Maybe I'm missing some info? The npc_ac variable also didn't appear. And yes, it's the 5e OGL sheet. But I've noticed some strange things where some tokens/sheets have certain attributes and others don't.
mAc said: OK, I tried subbing in your code for the token action to see what would happen. "Festering Goblin hurtles towards {target||token_name}!" It had the same issue. Maybe I'm missing some info? The npc_ac variable also didn't appear. And yes, it's the 5e OGL sheet. But I've noticed some strange things where some tokens/sheets have certain attributes and others don't. My mistake, it should be @{target||token_name}. I missed adding the @ in front. If the token isn't representing a character sheet, it wouldn't have an AC attribute.
1505626362

Edited 1505629387
mAc
Pro
That worked! The only weird part is that unlike before, I have to click the target twice now. edit: Figured it out, it's because the code I was using is different. And that's because without  having "target" in there twice, the charms don't work. !power {{ --soundfx|_play|zombiemoan --charid|@{character_id} --emote|@{character_name} hurtles towards @{target||token_name}...! --format|atwill --name|Slam --leftsub|Action --rightsub|Reach 5 ft. --target_list|@{target| |token_id} --Attack|[[1d20+4]] | [[1d20+4]] vs %%AC%% AC (%%token_name%%) --Hit|[[1d6+2]] bludgeoning damage --Crit|Add an extra [[1d6]] }} Not sure how I can fix that though.
1505644801
Ziechael
Forum Champion
Sheet Author
API Scripter
Your targets are defined differently, one has a space as the 'label' and one has nothing... either make them both the same or if you are only using one target drop the label altogether and just use @{target|token_name} and @{target|token_id}.