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 5)

I have a friend run into the same issue, when i look at his powercard he had some weird space break. I just deleted everything and copy from one of ine games
Did what you said, deleted the handout, copied Craven's example, first into notepad++ to check there was no funky characters, then into the PowerCard Formats. No effect.
1530746872
Kurt J.
Pro
API Scripter
Johannes E. said: Did what you said, deleted the handout, copied Craven's example, first into notepad++ to check there was no funky characters, then into the PowerCard Formats. No effect. Can you post the macro you are using to utilize the formats?
Kurt J. said: Can you post the macro you are using to utilize the formats? This is one of many !power {{ --name|Bullrush --leftsub|At-will --rightsub|Melee --format|atwill --Standard Action|Melee Weapon --Target|One creature --Attack| Strength attack [[ 1d20 + @{selected|strength-mod} [Strength] ]] vs **Fortitude** --Hit|Push target 1sq, move into their vacated space --Special|You can bull rush a target adjacent to you that is smaller than you, equal, or one category larger than you. }}
1530750271
Kurt J.
Pro
API Scripter
Johannes E. said: Kurt J. said: Can you post the macro you are using to utilize the formats? This is one of many !power {{ --name|Bullrush --leftsub|At-will --rightsub|Melee --format|atwill --Standard Action|Melee Weapon --Target|One creature --Attack| Strength attack [[ 1d20 + @{selected|strength-mod} [Strength] ]] vs **Fortitude** --Hit|Push target 1sq, move into their vacated space --Special|You can bull rush a target adjacent to you that is smaller than you, equal, or one category larger than you. }} I was able to get this to happen by editing my own formats handout a few times... I added some code to the 3.7.8 version on the development site to workaround strangeness being added by the new text editor. I didn't update the version number, but I did update the date.
!power {{ --name|@{selected|character_name} --emote| --audioattr|@{selected|token_id} Attack_Sound --tokenid|@{selected|token_id} --npc_attribute_summary|@{selected|character_id} --Speed:|@{selected|speed} --leftsub|Spell Atk Bonus: @{selected|spell_attack_bonus} --rightsub|Save DC: @{selected|spell_save_dc} --spell_slots|@{selected|character_id} --spell_list|@{selected|character_id} -- ~~~ --ogl_pc_attack_list|@{selected|character_id} }} Is there a way to get these attack abilities buttons to target creatures? or would that require individual macros for each one?
Johannes E. said: Kurt J. said: Can you post the macro you are using to utilize the formats? This is one of many !power {{ --name|Bullrush --leftsub|At-will --rightsub|Melee --format|atwill --Standard Action|Melee Weapon --Target|One creature --Attack| Strength attack [[ 1d20 + @{selected|strength-mod} [Strength] ]] vs **Fortitude** --Hit|Push target 1sq, move into their vacated space --Special|You can bull rush a target adjacent to you that is smaller than you, equal, or one category larger than you. }} Try this --txcolor|#FFFFFF --bgcolor|#3D59AB to see if the color will change in the macro.
1530827548
Kurt J.
Pro
API Scripter
Anthony V. said: !power {{ --name|@{selected|character_name} --emote| --audioattr|@{selected|token_id} Attack_Sound --tokenid|@{selected|token_id} --npc_attribute_summary|@{selected|character_id} --Speed:|@{selected|speed} --leftsub|Spell Atk Bonus: @{selected|spell_attack_bonus} --rightsub|Save DC: @{selected|spell_save_dc} --spell_slots|@{selected|character_id} --spell_list|@{selected|character_id} -- ~~~ --ogl_pc_attack_list|@{selected|character_id} }} Is there a way to get these attack abilities buttons to target creatures? or would that require individual macros for each one? With no other changes, these are just the macros that the character sheet provides for the attacks. However, there is a provision for replacing them built into PowerCards. In the example above, if you have a macro (accessible by the character using the summary) for the Greatsword +2 attack (and a templated attack PowerCard would work well here), you can create an attribute on the character called "action_$0_macro" and supply the name of the macro. A call to that macro will replace the default sheet macro from the --ogl_pc_attack_list tag. The $0 refers to the placement of the attack in the list, so the first one is $0, the second is $1, etc. If an attribute isn't present, the default sheet macro will be used. As an added bonus, if you include and attribute with a value of "NONE", that action won't be listed on the summary at all. There might be some other tricks that could be played with the %{} notation, but I haven't really tried that yet. In the long run, I'd like the --ogl_pc_attack_list to be able to display buttons that would intelligently run PowerCard template macros without too much configuration. I'm slowly working towards that goal with each set of feature additions :)
1530977764
Kurt J.
Pro
API Scripter
I've updated the development GIST with version 3.7.9, and put in a pull request to bring the one-click version up to that version. This will bring the template system to the one-click, as well as the following items that are new for 3.7.9: Sandbox protection code. The first part of my effort to implement protection into the PowerCards code base to try to prevent the API Sandbox from being crashed by issues with cards, templates, and replacements. Many of these are uncommon, but adding code the prevent them will help reduce frustration when something goes awry during a game. Added code to the format handout processor to attempt to compensate for oddness introduced by the latest Roll20 update that replaced the text editor. The format processor now strips out all HTML code from the handout lines while processing them. Exposed the Process function so PowerCards can be used by other API scripts (Such as The Aaron's PCPP (PowerCard Pre Processor)). The external function name is PowerCards.Process
I'm hoping someone who knows Powercards better than me can give me a hand: I'm trying to convert an OGL macro to work with the Shaped Sheet (see  original topic  and a follow up post in Shaped Sheet's thread). Essentially, I'm having difficulty pulling the attribute damage bonus from Shaped Sheet in a way that works with Powercards, since Shaped doesn't have an attribute that is the damage dice formula - it's an ability/macro.  Is there a Powercard workaround for this? Thanks!
I haven't been keeping up on Power Cards lately as I haven't ran a game in a while. What is the latest Alter Bars available?
1531151467

Edited 1531160413
Happy to report that I figured my issue out via a Powercards workaround:  !power {{ --name|Damage --hroll|[[ [$STR] 0d0 + @{selected|strength_mod}]] --hroll|[[ [$DEX] 0d0 + @{selected|dexterity_mod}]] --hroll|[[ [$CON] 0d0 + @{selected|constitution_mod}]] --hroll|[[ [$WIS] 0d0 + @{selected|wisdom_mod}]] --hroll|[[ [$INT] 0d0 + @{selected|intelligence_mod}]] --hroll|[[ [$CHA] 0d0 + @{selected|charisma_mod}]] --Damage:|[[ [$Dmg] @{selected|repeating_action_$0_attack_damage_dice}@{selected|repeating_action_$0_attack_damage_die} + [^@{selected|repeating_action_$0_attack_damage_ability}] ]] }} That seems to work for any zero'th slot npc repeating attack, and correctly rebuilds the damage formula for Shaped Sheet.  EDIT: So, I'm stupid. So far, this appears to be working, but I'd appreciate others checking. I didn't know about the 'hrolls' tag which isn't on the powercards wiki as far as I can tell. !power {{ --name|Damage --hrolls| [[ [$STR] 0d0 + @{selected|repeating_action_$0_attack_damage_dice}@{selected|repeating_action_$0_attack_damage_die} + @{selected|strength_mod} ]][[ [$DEX] 0d0 + @{selected|repeating_action_$0_attack_damage_dice}@{selected|repeating_action_$0_attack_damage_die} + @{selected|dexterity_mod}]] [[ [$CON] 0d0 + @{selected|repeating_action_$0_attack_damage_dice}@{selected|repeating_action_$0_attack_damage_die} + @{selected|constitution_mod}]] [[ [$WIS] 0d0 + @{selected|repeating_action_$0_attack_damage_dice}@{selected|repeating_action_$0_attack_damage_die} + @{selected|wisdom_mod}]][[ [$INT] 0d0 + @{selected|repeating_action_$0_attack_damage_dice}@{selected|repeating_action_$0_attack_damage_die} + @{selected|intelligence_mod}]] [[ [$CHA] 0d0 + @{selected|repeating_action_$0_attack_damage_dice}@{selected|repeating_action_$0_attack_damage_die} + @{selected|charisma_mod}]] --Result| [^@{selected|repeating_action_$0_attack_damage_ability}] @{selected|repeating_action_$0_attack_damage_type} damage }}
I had to add to my PowerCard Formats a now I have only the default format for everthing. I had to input the text into a text editor app then copy and paste to get it to work again.
Hey Kurt, First great job. Powercards gets better everyday. I was reading the Wiki and found you added support for other API's like Token-Mod I have the following I use can you tell me how it would be written inside of a powercard? !token-mod {{--set     light_radius#40     light_dimradius#20     light_otherplayers#on     light_losangle#|270 light_angle#360}} Thanks
1531170934
Kurt J.
Pro
API Scripter
Craven said: Hey Kurt, First great job. Powercards gets better everyday. I was reading the Wiki and found you added support for other API's like Token-Mod I have the following I use can you tell me how it would be written inside of a powercard? !token-mod {{--set     light_radius#40     light_dimradius#20     light_otherplayers#on     light_losangle#|270 light_angle#360}} Thanks All you should need is something like: !power {{ --name|Testing --api_token-mod|_ids @{selected|token_id} _ignore_selected _set light_radius#40     light_dimradius#20     light_otherplayers#on     light_losangle#|270 light_angle#360 }} More or less just copying your parameters. You need to use _ids and _ignore_selected because --api_ doesn't pass the selected information along to the API call. I might have to look and see if there is a way to do that.
Kurt J. said: Craven said: Hey Kurt, First great job. Powercards gets better everyday. I was reading the Wiki and found you added support for other API's like Token-Mod I have the following I use can you tell me how it would be written inside of a powercard? !token-mod {{--set     light_radius#40     light_dimradius#20     light_otherplayers#on     light_losangle#|270 light_angle#360}} Thanks All you should need is something like: !power {{ --name|Testing --api_token-mod|_ids @{selected|token_id} _ignore_selected _set light_radius#40     light_dimradius#20     light_otherplayers#on     light_losangle#|270 light_angle#360 }} More or less just copying your parameters. You need to use _ids and _ignore_selected because --api_ doesn't pass the selected information along to the API call. I might have to look and see if there is a way to do that. It worked once then stop not sure why. Even tried different tokens.
It has been months since I have used Power Cards and all the updates are AWESOME! No longer do I have to type out 500 lines of text to create the spellbook or attack actions. I can't wait to test out the template/replacement feature now.
One weirdness I found with the new editor: If you are creating multiple PowerCard Formats, you have to use Shift+Enter between formats or the new creation will not work.
1531326112

Edited 1531355758
OK. All praises aside now, I am actually coming with a question I believe has been answered but am unable to find it now. I am wanting to use custom macros for attacks but using the --ogl_pc_attack_list tag will always default to Roll20 macro. How do I get it to use a custom macro for attacks (and spells if possible)? Also, I am trying to get a grip on the template stuff but I can't figure it out. I am sure I am getting it completely wrong. The video doesn't allow for great quality and it isn't Kurt's fault. Maybe someone could show me how to turn the following code into a template? !power {{ --target_list|@{target|1st|token_id} --emote|**@{selected|token_name} swings his/her Quarterstaff at @{target|1st|character_name}** --tokenid|@{selected|token_id} --format|attacks --corners|10 --name|Quarterstaff --leftsub|Melee --rightsub|Close Quarter --Range| 5' --Attack|[[ [$Atk] ?{Advantage?| Normal, 1d20 + [[ @{selected|strength_mod} ]] [STR] + [[ @{selected|pb} ]] [PROF] | Advantage, 2d20KH1 + [[ @{selected|strength_mod} ]] [STR] + [[ @{selected|pb} ]] [PROF] | Disadvantage, 2d20KL1 + [[@{selected|strength_mod}]] [INT] + [[@{selected|pb}]] [PROF]]} ]] vs **AC** [[ @{target|1st|npc_ac} ]] --?? $Atk < @{target|1st|npc_ac} ?? !Missed|**You missed!** --?? $Atk >= @{target|1st|npc_ac} AND $Atk.base <> 20 ?? Hit:|[[ 1d6 + @{selected|strength_mod} ]] bludgeoning damage --?? $Atk.base == 20 ?? Critical Hit:|[[ 2d6 + @{selected|strength_mod} ]] bludgeoning damage --?? $Atk.base == 1 ?? !|**Fumble:** }} Thanks in advance.
Has anyone been having issues playing audio via PowerCards since Roll20 AM pushed their major update?
I am having also problems with the audio, when I click on a macro with audio i get an error   My macro looks like this:  !power {{ --titlefontshadow|none --titlefont|Georgia --titlefontsize| 20px --orowbg|#D87E7E --erowbg|#DA3C3C --corners|10 --format|Parry --name|@{Selected|meleeweaponname1} --leftsub|Melee --rightsub|@{Selected|meleequalities1} --tokenid|@{selected|Token_Id} --target_list|@{target|token_id} --emote| **@{selected|token_name}** Attacks **@{target|token_name}** --Target Number|~R [[ [$Target] [[@{Selected|meleetohit1}+?{Modifier|0}]] + 0d0 ]] ~R --Attack Roll|~R [[ [$Roll] 1d100 ]] ~R --?? $Target < $Roll ?? Outcome *1|~R //Miss// ~R --?? $Roll <= $Target AND $Roll == 100 OR $Roll == 01 OR $Roll == 11 OR $Roll == 20 OR $Roll == 21 OR $Roll == 30 OR $Roll == 31 OR $Roll == 40 OR $Roll == 41 OR $Roll == 50 OR $Roll == 51 OR $Roll == 60 OR $Roll == 70 OR $Roll == 80 OR $Roll == 90  ?? Outcome *2|~R //Hit Head// ~R --?? $Roll <= $Target AND $Roll == 61 OR $Roll == 71 OR $Roll == 81 OR $Roll == 91 OR $Roll == 02 OR $Roll == 12 OR $Roll == 22 OR $Roll == 32 OR $Roll == 42 OR $Roll == 52 OR $Roll == 62 OR $Roll == 72 OR $Roll == 82 OR $Roll == 92 OR $Roll == 03 OR $Roll == 13 OR $Roll == 23 OR $Roll == 33 OR $Roll == 43 OR $Roll == 53 ?? Outcome *3|~R //Hit Right Arm// ~R --?? $Roll <= $Target AND $Roll == 63 OR $Roll == 73 OR $Roll == 83 OR $Roll == 93 OR $Roll == 04 OR $Roll == 14 OR $Roll == 24 OR $Roll == 34 OR $Roll == 44 OR $Roll == 54 OR $Roll == 64 OR $Roll == 74 OR $Roll == 84 OR $Roll == 94 OR $Roll == 05 OR $Roll == 15 OR $Roll == 25 OR $Roll == 35 OR $Roll == 45 OR $Roll == 55 ?? Outcome *4|~R //Hit Left Arm// ~R --?? $Roll <= $Target AND $Roll == 65 OR $Roll == 75 OR $Roll == 85 OR $Roll == 95 OR $Roll == 06 OR $Roll == 16 OR $Roll == 26 OR $Roll == 36 OR $Roll == 46 OR $Roll == 56 OR $Roll == 66 OR $Roll == 76 OR $Roll == 86 OR $Roll == 96 OR $Roll == 07 OR $Roll == 17 OR $Roll == 27 OR $Roll == 37 OR $Roll == 47 OR $Roll == 57 OR $Roll == 67 OR $Roll == 77 OR $Roll == 87 OR $Roll == 97 OR $Roll == 08 ?? Outcome *5|~R //Hit Body// ~R --?? $Roll <= $Target AND $Roll == 18 OR $Roll == 28 OR $Roll == 38 OR $Roll == 48 OR $Roll == 58 OR $Roll == 68 OR $Roll == 78 OR $Roll == 88 OR $Roll == 98 OR $Roll == 09 ?? Outcome *6|~R //Hit Right Leg// ~R --?? $Roll <= $Target AND $Roll == 19 OR $Roll == 29 OR $Roll == 39 OR $Roll == 49 OR $Roll == 59 OR $Roll == 69 OR $Roll == 79 OR $Roll == 89 OR $Roll == 99 OR $Roll == 10 ?? Outcome *7|~R //Hit Left Leg// ~R --?? $Roll <= $Target ?? Damage| ~R [[ [$Dmg] 1d10 + @{Selected|StrengthBonus} + @{Selected|meleedmg1}]] ~R --?? $Roll <= $Target AND [[@{Selected|meleeimpact1}]] == 1 ?? Impact Damage|~R [[ [$DmgI] 1d10 + @{Selected|StrengthBonus} + @{Selected|meleedmg1}]] ~R --?? $Roll <= $Target AND $Dmg.base == 10 OR $DmgI.base == 10 ?? Ulric’s Fury|~R  **If WS successful +[[1d10!]]** ~R --?? $Roll <= $Target ?? vfx_opt|@{target|token_id} glow-blood --?? $Roll <= $Target AND $Dmg.base == 10 OR $DmgI.base == 10 ?? vfx_opt|@{target|token_id} bubbling-blood --?? $Target < $Roll ?? soundfx *1|_play|Melee Miss --?? $Roll <= $Target AND $Dmg.base <> 10 OR $DmgI.base <> 10 ?? soundfx *2|_play|Melee Hit --?? $Roll <= $Target AND $Dmg.base == 10 OR $DmgI.base == 10 ?? soundfx *3|_play|Melee Crit }} 
1531404469

Edited 1531404515
Yeah you need to update your attributes Melee Hit, Melee Crit, etc. The new format for commands to play something looks like !roll20AM --audio,play|Track_name if I remember correctly. It's no longer just --play|track. EDIT: note that I don't get an error in chat, and I can copy/paste my attribute command into chat, put a !roll20AM in front of it, and it works when I press enter.  
1531412237

Edited 1531412533
Audio not working either. Just great now I have a ton of macros to edit. Why did they need to change this. Anyone know the format to use now in powercards for the soundfx?
I haven't gotten anything to work yet, but I know the command structure has changed so that playing a track now requires an --audio tag like !roll20AM --audio,play|Wind But that still doesn't work within powercards yet, for me at least. I'm wondering if there is something under the hood that needs to be changed on the audioattr tag side of things to interpret stuff correctly. 
it also dont work with variables. does someone know if its possible to have an older version?
until some of the api gods fix the problem i rolled back to version 1.05.&nbsp; here is the link on github <a href="https://github.com/Roll20/roll20-api-scripts/blob/cc89d127240d352a81af8058bb9d52228468a7df/Roll20-Audio-Master/1.05/Roll20AM.js" rel="nofollow">https://github.com/Roll20/roll20-api-scripts/blob/cc89d127240d352a81af8058bb9d52228468a7df/Roll20-Audio-Master/1.05/Roll20AM.js</a>
I still have yet to get a response on these questions posted above. Thanks. Theodore S. said: OK. All praises aside now, I am actually coming with a question I believe has been answered but am unable to find it now. I am wanting to use custom macros for attacks but using the --ogl_pc_attack_list tag will always default to Roll20 macro. How do I get it to use a custom macro for attacks (and spells if possible)? Also, I am trying to get a grip on the template stuff but I can't figure it out. I am sure I am getting it completely wrong. The video doesn't allow for great quality and it isn't Kurt's fault. Maybe someone could show me how to turn the following code into a template? !power {{ --target_list|@{target|1st|token_id} --emote|**@{selected|token_name} swings his/her Quarterstaff at @{target|1st|character_name}** --tokenid|@{selected|token_id} --format|attacks --corners|10 --name|Quarterstaff --leftsub|Melee --rightsub|Close Quarter --Range| 5' --Attack|[[ [$Atk] ?{Advantage?| Normal, 1d20 + [[ @{selected|strength_mod} ]] [STR] + [[ @{selected|pb} ]] [PROF] | Advantage, 2d20KH1 + [[ @{selected|strength_mod} ]] [STR] + [[ @{selected|pb} ]] [PROF] | Disadvantage, 2d20KL1 + [[@{selected|strength_mod}]] [INT] + [[@{selected|pb}]] [PROF]]} ]] vs **AC** [[ @{target|1st|npc_ac} ]] --?? $Atk &lt; @{target|1st|npc_ac} ?? !Missed|**You missed!** --?? $Atk &gt;= @{target|1st|npc_ac} AND $Atk.base &lt;&gt; 20 ?? Hit:|[[ 1d6 + @{selected|strength_mod} ]] bludgeoning damage --?? $Atk.base == 20 ?? Critical Hit:|[[ 2d6 + @{selected|strength_mod} ]] bludgeoning damage --?? $Atk.base == 1 ?? !|**Fumble:** }} Thanks in advance.
1531440264

Edited 1531441516
Kurt J.
Pro
API Scripter
Craven said: Audio not working either. Just great now I have a ton of macros to edit. Why did they need to change this. Anyone know the format to use now in powercards for the soundfx? Patching PowerCards Manually to Compensate for Roll20AM Update NOTE: This won't apply to the 1-Click Install version of PowerCards. NOTE2: This assumes you have only used --play (_play) Roll20AM commands in your PowerCard macros. If you wish to use a quick patch to keep your macros working while you update them, search the source code for "!roll20AM". There are two lines in PowerCards that contain this phrase. The first one is on line 890 in the current (3.7.9) version. This is for the --soundfx tag. Replace the line with: if (Tag.substring(0,7) == "soundfx") sendChat("", "!roll20AM " + PowerCard[Tag].replace(/(?:\s+|\b)_/g, " --").replace(/--play/,"--audio,play")); and the second one is on line 902. This is for the --audioattr tag. Replace the line with: sendChat("", "!roll20AM " + audioParams.replace(/--play/,"--audio,play")); Finally, in your game as GM, run: !roll20AM config,import because roll20AM no longer reads the jukebox directly. This will import your tracks and allow the patched lines above to use them. It is still a good idea to update your cards with the new format, though, as this patch won't be in a release version of PowerCards. This patch won't clobber entries using the new syntax. I would also recommend updating the macros to use a template if possible, as that means the next time there is a command change you won't need to update them all again :)
1531440875

Edited 1531442966
Kurt J.
Pro
API Scripter
Theodore S. said: I still have yet to get a response on these questions posted above. Thanks. As nice as it might be to be able to do so, I can't devote all of my time to PowerCards. Your questions were posted yesterday. Patience grasshopper! Theodore S. said: OK. All praises aside now, I am actually coming with a question I believe has been answered but am unable to find it now. I am wanting to use custom macros for attacks but using the --ogl_pc_attack_list tag will always default to Roll20 macro. How do I get it to use a custom macro for attacks (and spells if possible)? I need to add this to the wiki, as it has come up a couple of times. Here you go: With no other changes, these are just the macros that the character sheet provides for the attacks. However, there is a provision for replacing them built into PowerCards. In the example above, if you have a macro (accessible by the character using the summary) for the Greatsword +2 attack (and a templated attack PowerCard would work well here), you can create an attribute on the character called "action_$0_macro" and supply the name of the macro. A call to that macro will replace the default sheet macro from the --ogl_pc_attack_list tag. The $0 refers to the placement of the attack in the list, so the first one is $0, the second is $1, etc. If an attribute isn't present, the default sheet macro will be used. As an added bonus, if you include and attribute with a value of "NONE", that action won't be listed on the summary at all. There might be some other tricks that could be played with the %{} notation, but I haven't really tried that yet. In the long run, I'd like the --ogl_pc_attack_list to be able to display buttons that would intelligently run PowerCard template macros without too much configuration. I'm slowly working towards that goal with each set of feature additions :) Theodore S. said: Also, I am trying to get a grip on the template stuff but I can't figure it out. I am sure I am getting it completely wrong. The video doesn't allow for great quality and it isn't Kurt's fault. Maybe someone could show me how to turn the following code into a template? Check out this post on the previous page : <a href="https://app.roll20.net/forum/post/6264588/script-powercards-3-thread-5/?pageforid=6540135#post-6540135" rel="nofollow">https://app.roll20.net/forum/post/6264588/script-powercards-3-thread-5/?pageforid=6540135#post-6540135</a> which shows a template that is almost exactly what you have listed, along with the replacement sets to use it.
1531440955

Edited 1531442998
Kurt J.
Pro
API Scripter
Theodore S. said: One weirdness I found with the new editor: If you are creating multiple PowerCard Formats, you have to use Shift+Enter between formats or the new creation will not work. The new editor is playing havoc with a lot of things... I know that it is being worked on, but my recommendation is to maintain your handouts outside of roll20 and paste them back in as a whole when you need to edit/update them.
1531441153

Edited 1531443029
Kurt J.
Pro
API Scripter
Gromduraz said: I haven't gotten anything to work yet, but I know the command structure has changed so that playing a track now requires an --audio tag like !roll20AM --audio,play|Wind But that still doesn't work within powercards yet, for me at least. I'm wondering if there is something under the hood that needs to be changed on the audioattr tag side of things to interpret stuff correctly.&nbsp; The new format is working for me, but remember when you specify this in a PowerCard, you need to replace --audio with _audio, which will get converted back to --audio. I also had to figure out that I had to import tracks, and my default volume was 1% :\
1531448036

Edited 1531448700
Kurt J. said: Gromduraz said: I haven't gotten anything to work yet, but I know the command structure has changed so that playing a track now requires an --audio tag like !roll20AM --audio,play|Wind But that still doesn't work within powercards yet, for me at least. I'm wondering if there is something under the hood that needs to be changed on the audioattr tag side of things to interpret stuff correctly.&nbsp; The new format is working for me, but remember when you specify this in a PowerCard, you need to replace --audio with _audio, which will get converted back to --audio. I also had to figure out that I had to import tracks, and my default volume was 1% :\ Awesome! This worked for me - I didn't realize I had to switch '--' to '_'. Thanks a ton! EDIT: I think that worked only once - I can't seem to replicate it. I have the attribute Audio_OnHit_0 set to '_audio,play|fx-melee-hit'. It definitely worked once though, and I don't see the API crashing.&nbsp;
1531451363

Edited 1531452704
Ok what am I doing wrong? Here is the new format --?? $Atk &lt; @{target||npc_ac} ?? !roll20AM --audio,play|ArrowMiss --?? $Atk &gt;= @{target||npc_ac} ?? !roll20AM --audio,play|ArrowHits and its not working. any ideas guys? edit: roll20AM --audio,play|ArrowMiss pasting into chat doesn't play the sound either but work if i select it in jukebox the sound plays so I know the track works.
Did you do Kurt's edits? Craven said: Ok what am I doing wrong? Here is the new format --?? $Atk &lt; @{target||npc_ac} ?? !roll20AM --audio,play|ArrowMiss --?? $Atk &gt;= @{target||npc_ac} ?? !roll20AM --audio,play|ArrowHits and its not working. any ideas guys? edit: roll20AM --audio,play|ArrowMiss pasting into chat doesn't play the sound either but work if i select it in jukebox the sound plays so I know the track works.
Theodore S. said: Did you do Kurt's edits? Craven said: Ok what am I doing wrong? Here is the new format --?? $Atk &lt; @{target||npc_ac} ?? !roll20AM --audio,play|ArrowMiss --?? $Atk &gt;= @{target||npc_ac} ?? !roll20AM --audio,play|ArrowHits and its not working. any ideas guys? edit: roll20AM --audio,play|ArrowMiss pasting into chat doesn't play the sound either but work if i select it in jukebox the sound plays so I know the track works. No i was taking his other advise to upgrade my macros since it would need to be done anyway.
1531475584
Kurt J.
Pro
API Scripter
Craven said: Ok what am I doing wrong? Here is the new format --?? $Atk &lt; @{target||npc_ac} ?? !roll20AM --audio,play|ArrowMiss --?? $Atk &gt;= @{target||npc_ac} ?? !roll20AM --audio,play|ArrowHits and its not working. any ideas guys? edit: roll20AM --audio,play|ArrowMiss pasting into chat doesn't play the sound either but work if i select it in jukebox the sound plays so I know the track works. The old syntax would have been: --?? $Atk &lt; @{target||npc_ac} ??--soundfx|_play|ArrowMiss --?? $Atk &gt;= @{target||npc_ac} ??--soundfx|_play|ArrowHits With the change to Roll20AM, the only thing you need to change is to insert "audio," before play, so: --?? $Atk &lt; @{target||npc_ac} ??--soundfx|_audio,play|ArrowMiss --?? $Atk &gt;= @{target||npc_ac} ??--soundfx|_audio,play|ArrowHits
1531475675
Kurt J.
Pro
API Scripter
Gromduraz said: Kurt J. said: Gromduraz said: I haven't gotten anything to work yet, but I know the command structure has changed so that playing a track now requires an --audio tag like !roll20AM --audio,play|Wind But that still doesn't work within powercards yet, for me at least. I'm wondering if there is something under the hood that needs to be changed on the audioattr tag side of things to interpret stuff correctly.&nbsp; The new format is working for me, but remember when you specify this in a PowerCard, you need to replace --audio with _audio, which will get converted back to --audio. I also had to figure out that I had to import tracks, and my default volume was 1% :\ Awesome! This worked for me - I didn't realize I had to switch '--' to '_'. Thanks a ton! EDIT: I think that worked only once - I can't seem to replicate it. I have the attribute Audio_OnHit_0 set to '_audio,play|fx-melee-hit'. It definitely worked once though, and I don't see the API crashing.&nbsp; For attribute-based effects, the notation is "--audio,play|fx-melee-hit" because the attribute isn't part of the PowerCard there isn't a reason to replace the --. The only reason it is necessary in a powercard is that otherwise it will be interpreted as a new tag called --play.
OMG this is so frustrating... even when I type !Roll20AM --audio,play|Arrowmiss in the chat I still get no sound. There is a help card but I can't access that either. I tried !roll20AM --help and nothing.
1531508688
Kurt J.
Pro
API Scripter
Craven said: OMG this is so frustrating... even when I type !Roll20AM --audio,play|Arrowmiss in the chat I still get no sound. There is a help card but I can't access that either. I tried !roll20AM --help and nothing. If the help command isn't doing anything check to make sure your sandbox didn't crash... That happened to me when I tried to play a sound when I hadn't imported anything first. Did you run "!roll20AM --config,import"? If so, try !roll20AM --config and see if you get the config menu (might be !roll20AM --config,menu) and see what your current volume is set to. Mine defaulted to 1%.
Kurt J. said: Craven said: OMG this is so frustrating... even when I type !Roll20AM --audio,play|Arrowmiss in the chat I still get no sound. There is a help card but I can't access that either. I tried !roll20AM --help and nothing. If the help command isn't doing anything check to make sure your sandbox didn't crash... That happened to me when I tried to play a sound when I hadn't imported anything first. Did you run "!roll20AM --config,import"? If so, try !roll20AM --config and see if you get the config menu (might be !roll20AM --config,menu) and see what your current volume is set to. Mine defaulted to 1%. When I do the config its blank.
can templates be used for something like this because its not working for me --Attack|[[ [$Atk] ?{Advantage?| Normal, 1d20 + 1 [Magic] + [[@{selected|dexterity_mod}]] [DEX] + [[@{selected|pb}]] [PROF]] | Advantage, 2d20KH1 + 1 [Magic] + [[@{selected|dexterity_mod}]] [DEX] + [[@{selected|pb}]] [PROF]] | Disadvantage, 2d20KL1 + 1 [Magic] + [[@{selected|dexterity_mod}]] [DEX] + [[@{selected|pb}]] [PROF]]} ]] vs **AC** [[@{target||npc_ac}]] Also ho do you use 2 templates in one powercard? I would like to have a format template and an attack template. Format is done and working&nbsp; format:--charid|~0! --emote|~1! &lt;br /&gt; attacks &lt;br /&gt; ~3! --target_list|~2! --name|~4! --format|~5! --leftsub|~6! --rightsub|~7! If I add the above attack to it then it stop working.
1531513963

Edited 1531515170
Any way to get this to work? !power {{ --emote|** @{selected|token_name} cast Thunderwave** --tokenid|@{selected|token_id} --format|attacks --corners|10 --name|Thunderwave --leftsub|Spell Attack --rightsub|Melee --Range| 15 foot cube --Saving Throw|Constitution --Spell DC| [[@{selected|spell_save_dc}]] --Damage on Fail|[[ [$Atk] 2d8 ]] thunder damage and pushed 10 ft. --Damage on Success|[[ [^Atk]/2 ]] thunder damage }} I keep getting the following error: SyntaxError: Expected "(", ".", "[", "abs(", "ceil(", "d", "floor(", "round(", "t", "{", [ |\t], [+|\-] or [0-9] but "/" found. Also, what is the command to set a custom macro for spells, like done with actions using action_$0_macro?
Theodore S. said: Any way to get this to work? !power {{ --emote|** @{selected|token_name} cast Thunderwave** --tokenid|@{selected|token_id} --format|attacks --corners|10 --name|Thunderwave --leftsub|Spell Attack --rightsub|Melee --Range| 15 foot cube --Saving Throw|Constitution --Spell DC| [[@{selected|spell_save_dc}]] --Damage on Fail|[[ [$Atk] 2d8 ]] thunder damage and pushed 10 ft. --Damage on Success|[[ [^Atk]/2 ]] thunder damage }} I keep getting the following error: SyntaxError: Expected "(", ".", "[", "abs(", "ceil(", "d", "floor(", "round(", "t", "{", [ |\t], [+|\-] or [0-9] but "/" found. Also, what is the command to set a custom macro for spells, like done with actions using action_$0_macro? --Damage on Success|[[ [^Atk]/2 ]] thunder damage I don't think you can use [^Atk]/2 --Damage on Success|[[ [^Atk]/2 ]] thunder damage Not sure what the second question is asking.
1531516785

Edited 1531516993
--Damage on Success|[[ [^Atk]/2 ]] thunder damage I don't think you can use [^Atk]/2 --Damage on Success|[[ [^Atk]/2 ]] thunder damage Not sure what the second question is asking. If you add an attribute in the gear called action_$0_macro (and add the custom macro name), it will overwrite the 5e OGL template. Trying to see if that is possible with spells that are not attacks.
1531521069

Edited 1531521367
Templates are not working even with simple commands. format:--charid|~0! --emote|~1! &lt;br /&gt; attacks &lt;br /&gt; ~3! --target_list|~2! --name|~4! --format|~5! --leftsub|~6! --rightsub|~7! --Attack|[[ [$Atk]&nbsp; 1d20 + ~8! [~9!] + ~10! [PROF] ]] vs ~11! once I add --Attack|[[ [$Atk]&nbsp; 1d20 + ~8! [~9!] + ~10! [PROF] ]] vs ~11! I get a single grey line. my power card looks like this: !power {{ --template|format|@{selected|character_id};@{selected|token_name};@{target|token_id};@{target|character_name};Longbow;atwill;Ranged;150'/600';@{selected|dexterity_mod};DEX;@{selected|pb};@{target|ac} }}
1531529762
Kurt J.
Pro
API Scripter
Craven said: Theodore S. said: Any way to get this to work? !power {{ --emote|** @{selected|token_name} cast Thunderwave** --tokenid|@{selected|token_id} --format|attacks --corners|10 --name|Thunderwave --leftsub|Spell Attack --rightsub|Melee --Range| 15 foot cube --Saving Throw|Constitution --Spell DC| [[@{selected|spell_save_dc}]] --Damage on Fail|[[ [$Atk] 2d8 ]] thunder damage and pushed 10 ft. --Damage on Success|[[ [^Atk]/2 ]] thunder damage }} I keep getting the following error: SyntaxError: Expected "(", ".", "[", "abs(", "ceil(", "d", "floor(", "round(", "t", "{", [ |\t], [+|\-] or [0-9] but "/" found. Also, what is the command to set a custom macro for spells, like done with actions using action_$0_macro? --Damage on Success|[[ [^Atk]/2 ]] thunder damage I don't think you can use [^Atk]/2 --Damage on Success|[[ [^Atk]/2 ]] thunder damage Not sure what the second question is asking. Craven is correct. You can't used a Roll ID value ([^Atk]) in another roll. All of the rolls are processed ahead of processing the card, so [^Atk] has no value when the roll is generated, meaning you end up with [[ /2 ]] as a roll.
1531529880
Kurt J.
Pro
API Scripter
Theodore S. said: --Damage on Success|[[ [^Atk]/2 ]] thunder damage I don't think you can use [^Atk]/2 --Damage on Success|[[ [^Atk]/2 ]] thunder damage Not sure what the second question is asking. If you add an attribute in the gear called action_$0_macro (and add the custom macro name), it will overwrite the 5e OGL template. Trying to see if that is possible with spells that are not attacks. Currently this doesn't exist for the spell list. That is a planned feature addition at some point, though.
1531531276
Kurt J.
Pro
API Scripter
Craven said: Templates are not working even with simple commands. format:--charid|~0! --emote|~1! &lt;br /&gt; attacks &lt;br /&gt; ~3! --target_list|~2! --name|~4! --format|~5! --leftsub|~6! --rightsub|~7! --Attack|[[ [$Atk]&nbsp; 1d20 + ~8! [~9!] + ~10! [PROF] ]] vs ~11! once I add --Attack|[[ [$Atk]&nbsp; 1d20 + ~8! [~9!] + ~10! [PROF] ]] vs ~11! I get a single grey line. my power card looks like this: !power {{ --template|format|@{selected|character_id};@{selected|token_name};@{target|token_id};@{target|character_name};Longbow;atwill;Ranged;150'/600';@{selected|dexterity_mod};DEX;@{selected|pb};@{target|ac} }} If you can post the full content of your template handout, I'll see if I can duplicate this in my test system.
Kurt J. said: Craven said: Templates are not working even with simple commands. format:--charid|~0! --emote|~1! &lt;br /&gt; attacks &lt;br /&gt; ~3! --target_list|~2! --name|~4! --format|~5! --leftsub|~6! --rightsub|~7! --Attack|[[ [$Atk]&nbsp; 1d20 + ~8! [~9!] + ~10! [PROF] ]] vs ~11! once I add --Attack|[[ [$Atk]&nbsp; 1d20 + ~8! [~9!] + ~10! [PROF] ]] vs ~11! I get a single grey line. my power card looks like this: !power {{ --template|format|@{selected|character_id};@{selected|token_name};@{target|token_id};@{target|character_name};Longbow;atwill;Ranged;150'/600';@{selected|dexterity_mod};DEX;@{selected|pb};@{target|ac} }} If you can post the full content of your template handout, I'll see if I can duplicate this in my test system. that is the full thing Template format:--charid|~0! --emote|~1! &lt;br /&gt; attacks &lt;br /&gt; ~3! --target_list|~2! --name|~4! --format|~5! --leftsub|~6! --rightsub|~7! --Attack|[[ [$Atk]&nbsp; 1d20 + ~8! [~9!] + ~10! [PROF] ]] vs ~11! Powercard !power {{ --template|format|@{selected|character_id};@{selected|token_name};@{target|token_id};@{target|character_name};Longbow;atwill;Ranged;150'/600';@{selected|dexterity_mod};DEX;@{selected|pb};@{target|ac} }} I had it working up until I tried to add conditions. then it stop. This is the powercard I am trying to template. !power {{ --emote|** @{selected|token_name} Aims a Longbow. ** --tokenid|@{selected|token_id} --titlefontshadow|none --format|atwill --name|Longbow --leftsub|Ranged Attack --rightsub| 150' / 600' --Attack|[[ [$Atk] ?{Advantage?| Normal, 1d20 + 0d0 [Magic] + [[@{selected|dexterity_mod}]] [DEX] + [[@{selected|pb}]] [PROF]] | Advantage, 2d20KH1 + 0d0 [Magic] +[[@{selected|dexterity_mod}]] [DEX] + [[@{selected|pb}]] [PROF]] | Disadvantage, 2d20KL1 + 0d0 [Magic] + [[@{selected|dexterity_mod}]] [DEX] + [[@{selected|pb}]] [PROF]]} ]] vs **AC** [[@{target||npc_ac}]] --?? $Atk &lt; @{target||npc_ac} ?? !Missed|**You missed!** --?? $Atk &lt; @{target||npc_ac} ?? soundfx1|_play|ArrowMiss --?? $Atk &gt;= @{target||npc_ac} ?? soundfx1|_play|ArrowHits --?? $Atk &gt;= @{target||npc_ac} AND $Atk.base &lt;&gt; 20 ?? Hit:|[[ [$Dmg] 1d8 + 0d0 [Magic] + [[@{selected|dexterity_mod}]]]] piercing damage --?? $Atk &gt;= @{target||npc_ac} AND $Atk.base &lt;&gt; 20 ?? alterbar1|_target|@{target||token_id} _bar|1 _amount|-[^Dmg] _show|all --?? $Atk.base == 20 ?? Critical Hit:|[[ [$CritDmg] 2d8 + 0d0 [Magic] + [[@{selected|dexterity_mod}]]]] piercing damage --?? $Atk.base == 20 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-[^CritDmg] _show|all --?? $Atk.base == 1 ?? !|**Fumble:** [[ [TXT] 1t[CFSRW] ]] --Ammo:|[[@{other_resource}]] **@{other_resource_name} left.** }} Thanks