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

Power card issue.

I have an elaborate code for my combat macros using powercards. When I test it with the macro box open or by pasting it in the chat window the macro/powercard works amazing. When I use it from a button on another powercard or launch it from the d20 button by the macro in my macro library it fills the chat window with the code as if it is in a powercard. Am I doing something wrong? My other macros and powercards are working fine. Here is the code.  !power {{ --bgcolor|#1c4587 --erowbg|#cfe2f3 --orowbg|#b6d7a8 --name|@{selected|token_name} Attacks @{target|token_name} --leftsub|@{selected|WeaponName_1} --?? @{selected|Off} == 0 AND @{selected|Charge} == 0 AND @{selected|Call} == 0 ?? Maneuver:|Standard --?? @{selected|Off} == 3 AND @{selected|Charge} == 0 AND @{selected|Call} == 0 ?? Maneuver:|Offensive Focus --?? @{selected|Off} == 0 AND @{selected|Charge} == 2 AND @{selected|Call} == 0 ?? Maneuver:|Charge --?? @{selected|Off} == 3 AND @{selected|Charge} == 2 AND @{selected|Call} == 0 ?? Maneuver:|Offensive Focus, Charge --?? @{selected|Off} == 0 AND @{selected|Charge} == 0 AND @{selected|Call} == 8 ?? Maneuver:|Called Shot --?? @{selected|Off} == 0 AND @{selected|Charge} == 2 AND @{selected|Call} == 8 ?? Maneuver:|Called Shot, Charge --?? @{selected|Off} == 3 AND @{selected|Charge} == 2 AND @{selected|Call} == 8 ?? Maneuver:|Offensive Focus, Called Shot, Charge --Attack:|[[ [$Atk] 1d20 +@{selected|bth} +@{selected|WeaponHitMod_1} +@{selected|WeaponHitMagic_1} +@{selected|WeaponHitMisc_1} +@{Selected|Off} -@{selected|Call} ]] --?? @{target|Dodge} == 4 ?? alterbar4|_target|@{target|token_id} _bar|1 _amount|-4 _show|all --?? @{target|Dodge} == 4 ?? api_setattr|_name @{target|token_name} _set _Dodge|0 _silent --?? @{target|DodgeNumber} == 1 ?? alterbar5|_target|@{target|token_id} _bar|1 _amount|-2 _show|all --?? @{target|DodgeNumber} == 3 ?? api_setattr|_name @{target|token_name} _set _DodgeNumber|2 _silent --?? @{target|DodgeNumber} == 2 ?? api_setattr|_name @{target|token_name} _set _DodgeNumber|1 _silent --?? @{target|DodgeNumber} == 1 ?? api_setattr|_name @{target|token_name} _set _DodgeNumber|0 _Dodge|0 _silent --?? $Atk >= @{target|A.C.} AND $Atk.base <> 20 AND $Atk.base <> 1 AND @{selected|Call} == 0 ?? Hit: | You have hit @{target|token_name} for [[ [$Dmg] @{selected|WeaponDmg_1} + @{selected|WeaponDmgMisc_1} + @{selected|WeaponDmgMagic_1} + @{selected|WeaponDmgMod_1} +@{selected|Charge} ]] Hit Points of Damage! --?? $Atk >= @{target|A.C.} AND $Atk.base <> 20 AND $Atk.base <> 1 AND @{selected|Call} == 8 ?? Hit: | You have hit @{target|token_name} with a **Called Shot** for [[ [$CallDmg] @{selected|WeaponDmg_1} +@{selected|WeaponDmg_1} + @{selected|WeaponDmgMisc_1} + @{selected|WeaponDmgMagic_1} + @{selected|WeaponDmgMod_1} +@{selected|Charge} ]] Hit Points of Damage! --?? $Atk.base == 20 AND @{selected|Call} == 0 ?? Critical Hit: | You have hit @{target|token_name} with a **Critical** for [[ [$CritDmg] @{selected|WeaponDmg_1} + @{selected|WeaponDmg_1} + @{selected|WeaponDmgMisc_1} + @{selected|WeaponDmgMagic_1} + @{selected|WeaponDmgMod_1} +@{selected|Charge} ]] Hit Points of Damage! --?? $Atk.base == 20 AND @{selected|Call} == 8 ?? Critical Called Shot: | You have hit @{target|token_name} with a **Critical Called Shot ** for [[ [$CritCall] @{selected|WeaponDmg_1} + @{selected|WeaponDmg_1} + @{selected|WeaponDmg_1} + @{selected|WeaponDmgMisc_1} + @{selected|WeaponDmgMagic_1} + @{selected|WeaponDmgMod_1} +@{selected|Charge} ]] Hit Points of Damage! --?? $Atk < @{target|A.C.} AND $Atk.base <> 1 ?? Miss: | You have missed @{target|token_name}! --?? $Atk >= @{target|A.C.} AND $Atk.base <> 20 AND $Atk.base <> 1 AND @{selected|Call} == 0 ?? alterbar6|_target|@{target|token_id} _bar|2 _amount|-[^Dmg] _show|all --?? $Atk.base == 20 AND @{selected|Call} == 0 ?? alterbar7|_target|@{target|token_id} _bar|2 _amount|-[^CritDmg] _show|all --?? $Atk >= @{target|A.C.} AND $Atk.base <> 20 AND $Atk.base <> 1 AND @{selected|Call} == 8 ?? alterbar8|_target|@{target|token_id} _bar|2 _amount|-[^CallDmg] _show|all --?? $Atk.base == 20 AND @{selected|Call} == 8 ?? alterbar9|_target|@{target|token_id} _bar|2 _amount|-[^CritCall] _show|all --?? $Dmg >= @{target|bar2} AND $Atk >= @{target|A.C.} ?? api_token-mod|_ids @{target|token_id} _ignore-selected _set statusmarkers|dead --?? $CritDmg >= @{target|bar2} AND $Atk.base == 20 ?? api_token-mod|_ids @{target|token_id} _ignore-selected _set statusmarkers|dead --?? @{selected|Call}Dmg >= @{target|bar2} AND $Atk.base <> 20 AND $Atk.base <> 1 AND @{selected|Call} == 8 ?? api_token-mod|_ids @{target|token_id} _ignore-selected _set statusmarkers|dead --?? $CritCall >= @{target|bar2} AND $$Atk.base == 20 AND @{selected|Call} == 8 ?? api_token-mod|_ids @{target|token_id} _ignore-selected _set statusmarkers|dead }}
Ok. So apparently if you have a secret space hiding in front of !power just messing with y, the code will work from cut/paste and a open macro but not as a token action or button. A single open space. How did we ever make it be the moon?
1603032798

Edited 1603032921
Kraynic
Pro
Sheet Author
By not leaving errant spaces where they shouldn't be.  :p Edit:  Most of my problems in the past with macros had to do with an extra space somewhere.  I've definitely done similar.
Still don't understand how it worked 8n cut and paste .
Also, as per Kurts' suggestion, I began using Note ++ (you may like other editing programs, I believe most if not all will do the trick) for macros and other things. There is something particular to Roll20 that often throws a monkey wrench into simple  jobs. Even cut and paste where you see that the original works fine, you copied it and pasted it, word for word, line by line, yet the copy job bombs. I have seen less failures of power cards and macros since I've started using it.