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 .
Advertisement Create a free account Compendium in Game, Join Today
This post has been closed. You can still view previous posts, but you can't post any new replies.

[Script] PowerCards 3 (Thread 4)

1505676990
mAc
Pro
The problem is, when I do that, then the %%AC%% and %%token_name%% don't get replaced with any values. It only works if I use: "--target_list|@{target| |token_id}" But it seems to have no relation to what appears in the emote. I want to make it so I target once, but can fill the emote and other tags with information.
1505682559
mAc
Pro
Another question -- I tried inputting the same exact scripts and macros and token actions into a different game, since the original game I was using was just to be my sandbox. When I use the token actions and see the output in this game, for some reason the title and subtitles are super bold... but I'm not using the bold option. Weird...
1505731898

Edited 1505731981
Chris D.
Pro
Sheet Author
API Scripter
I am thinking of adding calls to Powercards to a character sheet and API I am currently working on. However as far as I can determine, powercards is not in the list of drop down selectable API script library entries a GM can select from. Which means that the only way a GM can use a script that makes calls to powercards is to mess with github, etc. and install powercards manually. I don't mind going into github for my own campaign, but it seems silly to put my own script in the library for ease of use, but have it depend upon a different script that is not in the library.  Is there a reason Powercards is not in the drop down script library?
1505734002
1. I don't like the one click install. Takes too long for updates to get put out. 2. I'm lazy and don't care to make the changes required to put it into one click install. 3. I don't really care about this script any more either. I will fix bugs, but that's about it. Feel free to take over this script if you want.
1505973161
Any way to add ammo tracking to powercard macro? When i shoot the bow below I would like it to remove 1 arrow. !power {{ --emote|** @{selected|token_name} Aims her Longbow. ** --tokenid|@{selected|token_id} --format|atwill --corners|10 --name|Longbow --leftsub|Ranged Attack --rightsub| --Range| [150/600] --Target|@{target|token_name} --Attack|[[ [$Atk] ?{Advantage?| Normal, 1d20 + [[@{selected|dexterity_mod}]] [DEX] + [[@{selected|pb}]] [PROF]] | Advantage, 2d20KH1 + [[@{selected|dexterity_mod}]] [DEX] + [[@{selected|pb}]] [PROF]] | Disadvantage, 2d20KL1 +  [[@{selected|dexterity_mod}]] [DEX] + [[@{selected|pb}]] [PROF]]} ]] vs **AC** [[@{target||npc_ac}]] --?? $Atk < @{target||npc_ac} ?? !Missed|**You missed!** --?? $Atk < @{target||npc_ac} ?? soundfx1|_play|ArrowMiss --?? $Atk >= @{target||npc_ac} ?? soundfx1|_play|ArrowHits --?? $Atk >= @{target||npc_ac} AND $Atk.base <> 20 ?? Hit:|[[ [$Dmg] 1d8+[[@{selected|dexterity_mod}]]]] piercing damage --?? $Atk >= @{target||npc_ac} AND $Atk.base <> 20 ?? alterbar1|_target|@{target||token_id} _bar|1 _amount|-[^Dmg] _show|all --?? $Atk.base == 20 ?? Critical Hit:|[[ [$CritDmg] 2d8+[[@{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] ]] --Feat:| **SHARPSHOOTER - ** You have mastered ranged weapons and can make shots that others find impossible. You gain the following benefits: Attacking at long range doesn't impose disadvantage on your ranged weapon attack rolls. Your ranged weapon attacks ignore half cover and three-quarters cover. Before you make an attack with a ranged weapon that you are proficient with, you can choose lo take a -5 penalty lo the attack roll. If the attack hilts, you add +10 to the attack's damage. }} This is the macro from the sheet @{Illydia Maethellyn|wtype}&{template:atk} {{mod=+6}} {{rname=[Long Bow](~-KeUcXNY2HK6SvJjVsaG|repeating_attack_-Ke5mnB4FCymbaQfUtFT_attack_dmg)}} {{rnamec=[Long Bow](~-KeUcXNY2HK6SvJjVsaG|repeating_attack_-Ke5mnB4FCymbaQfUtFT_attack_crit)}} {{r1=[[1d20@{Illydia Maethellyn|halflingluck}cs>20 + 4[DEX] + 2[PROF]]]}} @{Illydia Maethellyn|rtype}@{Illydia Maethellyn|halflingluck}cs>20 + 4[DEX] + 2[PROF]]]}} {{range=150/600}} {{desc=Heavy Ranged.}}  ammo=Arrows|-KeUcXiWzjWFgSriJ7TS @{Illydia Maethellyn|charname_output} Thanks, Craven
1505975073
You could probably use the chatsetattr script to do that as part of the macro, but not natively through powercards. So your macro would look like... !power {{ ... }} !chatsetattr ...
1506292854

Edited 1506293608
Trying to add a sneak attack option to the macro below and I need it to use [[ ceil((@{base_level}) / 2)]] to cal the rogues level automatically. Also need it to double for Crits. Any ideas please? Also for some reason it ask to select a target twice. !power {{ --emote|** @{selected|token_name} Aims her Longbow. ** --tokenid|@{selected|token_id} --format|atwill --corners|10 --name|Longbow --leftsub|Ranged Attack --rightsub| 150' / 600' --Range| ** 150/600 ** --Target|@{target|token_name} --Attack|[[ [$Atk] ?{Advantage?| Normal, 1d20 + [[@{selected|dexterity_mod}]] [DEX] + [[@{selected|pb}]] [PROF]] | Advantage, 2d20KH1 + [[@{selected|dexterity_mod}]] [DEX] + [[@{selected|pb}]] [PROF]] | Disadvantage, 2d20KL1 +  [[@{selected|dexterity_mod}]] [DEX] + [[@{selected|pb}]] [PROF]]} ]] vs **AC** [[@{target||npc_ac}]] --?? $Atk < @{target||npc_ac} ?? !Missed|**You missed!** --?? $Atk < @{target||npc_ac} ?? soundfx1|_play|ArrowMiss --?? $Atk >= @{target||npc_ac} ?? soundfx1|_play|ArrowHits --?? $Atk >= @{target||npc_ac} AND $Atk.base <> 20 ?? Hit:|[[ [$Dmg] 1d6+[[@{selected|dexterity_mod}]] + [[?{Sneak Attack|no, |yes, [[ ceil((@{base_level}) / 2)]]d6 } ]]]] piercing damage --?? $Atk >= @{target||npc_ac} AND $Atk.base <> 20 ?? alterbar1|_target|@{target||token_id} _bar|1 _amount|-[^Dmg] _show|all --?? $Atk.base == 20 ?? Critical Hit:|[[ [$CritDmg] 2d8+[[@{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}]] --Feat:| **SHARPSHOOTER - ** }}
1506299117
Silvyre
Forum Champion
You'll want to replace ?{Sneak Attack|no, |yes, [[ ceil((@{base_level}) / 2)]]d6 } with ?{Sneak Attack|no, 0 |yes, [[ ceil((@{base_level}) / 2)]]d6 } Replacing @{target|token_name} with @{target||token_name} is one way to get rid of the extra target. If you have your macro saved as an Ability, you can remove the selected keyword from your Attribute calls, if you'd like.
1506305744
Silvyre said: You'll want to replace ?{Sneak Attack|no, |yes, [[ ceil((@{base_level}) / 2)]]d6 } with ?{Sneak Attack|no, 0 |yes, [[ ceil((@{base_level}) / 2)]]d6 } Replacing @{target|token_name} with @{target||token_name} is one way to get rid of the extra target. If you have your macro saved as an Ability, you can remove the selected keyword from your Attribute calls, if you'd like. Replacing @{target|token_name} with @{target||token_name} is one way to get rid of the extra target. are they not the same? and do you know how I can make the sneak attack work x2 when crit?
1506308127
Silvyre
Forum Champion
Craven said: Replacing @{target|token_name} with @{target||token_name} is one way to get rid of the extra target. are they not the same? No, they're not the same; they're treated as having different target_names . and do you know how I can make the sneak attack work x2 when crit? You can add ?{Sneak Attack} to your crit damage roll.
1506313333
This works for a normal attack. --?? $Atk >= @{target||npc_ac} AND $Atk.base <> 20 ?? Hit:|[[ [$Dmg] 1d8+[[@{selected|dexterity_mod}]] + [[?{Sneak Attack|no, 0|yes, [[ceil((@{base_level}) / 2)]]d6 } ]]]] piercing damage However if I try the Sneak Attack on the the crit roll and try to multiple it by 2 I still only get 3d6 or i get a crazy number like 320. --?? $Atk.base == 20 ?? Critical Hit:|[[ [$CritDmg] 2d8+[[@{selected|dexterity_mod}]] + [[?{Sneak Attack|no, 0|yes, [[[[ceil((@{base_level}) / 2)]]d6]]*2 } ]]]] piercing damage
1506345723

Edited 1506345743
Silvyre
Forum Champion
Try: --?? $Atk.base == 20 ?? Critical Hit:|[[ [$CritDmg] 2d8+[[@{selected|dexterity_mod}]] + ?{Sneak Attack|no, 0|yes, [[ceil((@{base_level}) / 2) * 2]]d6} ]] piercing damage
1506357638
Silvyre said: Try: --?? $Atk.base == 20 ?? Critical Hit:|[[ [$CritDmg] 2d8+[[@{selected|dexterity_mod}]] + ?{Sneak Attack|no, 0|yes, [[ceil((@{base_level}) / 2) * 2]]d6} ]] piercing damage Same only 3d6
1506369930
Craven said: Silvyre said: Try: --?? $Atk.base == 20 ?? Critical Hit:|[[ [$CritDmg] 2d8+[[@{selected|dexterity_mod}]] + ?{Sneak Attack|no, 0|yes, [[ceil((@{base_level}) / 2) * 2]]d6} ]] piercing damage Same only 3d6 I just created another macro to add the extra sneak attack damage.
1506370288
OK try to make a macro for my rogue. I want to roll 1d20 + the thieves tools mod In this case the tool is at position $0 In this example --Using your @{selected|repeating_tool_$0_toolname}|[[ 1d20 + @{selected|repeating_tool_$0_tool}]] rolls the dice but doesn't add the mod. It does get the name. !power {{ --emote|** @{selected|token_name} Actively Checking for Traps. ** --tokenid|@{selected|token_id} --format|atwill --corners|10 --name|Check and Disarming Traps --leftsub|Skill --rightsub|Checking and Disarming --Checking for the Trap:|[[ 1d20+ [[@{selected|perception_bonus}]] [Perception Modifier] ]] --Investigate the Trap:|[[ 1d20+ [[@{selected|investigation_bonus}]] [Investigation Modifier] ]] --Using your @{selected|repeating_tool_$0_toolname}|[[ 1d20 + @{selected|repeating_tool_$0_tool}]] }}
1506390254
Any way to add ammo tracking to powercard macro? When i shoot the bow below I would like it to remove 1 arrow. !power {{ --emote|** @{selected|token_name} Aims her Longbow. ** --tokenid|@{selected|token_id} --format|atwill --corners|10 --name|Longbow --leftsub|Ranged Attack --rightsub| --Range| [150/600] --Target|@{target|token_name} --Attack|[[ [$Atk] ?{Advantage?| Normal, 1d20 + [[@{selected|dexterity_mod}]] [DEX] + [[@{selected|pb}]] [PROF]] | Advantage, 2d20KH1 + [[@{selected|dexterity_mod}]] [DEX] + [[@{selected|pb}]] [PROF]] | Disadvantage, 2d20KL1 +  [[@{selected|dexterity_mod}]] [DEX] + [[@{selected|pb}]] [PROF]]} ]] vs **AC** [[@{target||npc_ac}]] --?? $Atk < @{target||npc_ac} ?? !Missed|**You missed!** --?? $Atk < @{target||npc_ac} ?? soundfx1|_play|ArrowMiss --?? $Atk >= @{target||npc_ac} ?? soundfx1|_play|ArrowHits --?? $Atk >= @{target||npc_ac} AND $Atk.base <> 20 ?? Hit:|[[ [$Dmg] 1d8+[[@{selected|dexterity_mod}]]]] piercing damage --?? $Atk >= @{target||npc_ac} AND $Atk.base <> 20 ?? alterbar1|_target|@{target||token_id} _bar|1 _amount|-[^Dmg] _show|all --?? $Atk.base == 20 ?? Critical Hit:|[[ [$CritDmg] 2d8+[[@{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] ]] --Feat:| **SHARPSHOOTER - ** You have mastered ranged weapons and can make shots that others find impossible. You gain the following benefits: Attacking at long range doesn't impose disadvantage on your ranged weapon attack rolls. Your ranged weapon attacks ignore half cover and three-quarters cover. Before you make an attack with a ranged weapon that you are proficient with, you can choose lo take a -5 penalty lo the attack roll. If the attack hilts, you add +10 to the attack's damage. } I'm trying to learn powercards and I cannot get this to work in my game. It won't do the roll and does not get past Choose Target after I input "normal" to the advantage query. I changed --Target|@{target|token_name} to --Target|@{target||token_name} and deleted the soundfx lines.
1506397676
Silvyre
Forum Champion
Craven said: @{selected|repeating_tool_$0_tool} Try @{selected|repeating_tool_$0_tool bonus } instead
1506398036
Silvyre
Forum Champion
Craven said: Silvyre said: Try: --?? $Atk.base == 20 ?? Critical Hit:|[[ [$CritDmg] 2d8+[[@{selected|dexterity_mod}]] + ?{Sneak Attack|no, 0|yes, [[ceil((@{base_level}) / 2) * 2]]d6} ]] piercing damage Same only 3d6 Ah, to get this to work, you'd need to do something like replace the first ?{Sneak Attack|no, 0|yes, [[ceil((@{base_level}) / 2)]]d6} with ?{Sneak Attack|no, 0|yes, [[ceil((@{base_level}) / 2)]]}d6 (i.e. move the d6 outside of the Roll Query). After doing so, you could use: --?? $Atk.base == 20 ?? Critical Hit:|[[ [$CritDmg] 2d8+[[@{selected|dexterity_mod}]] + (?{Sneak Attack} * 2)d6} ]] piercing damage
1506398314

Edited 1506398363
Silvyre
Forum Champion
Hi, Doug E. Did you write that macro yourself, or did you find it elsewhere on the forums? That macro uses Attributes exclusive to the 5e OGL sheet and it also uses a custom Rollable Table. If you don't use either of those things, the macro will fail.
1506402784
Hi  Silvyre , No, it is one of Craven's but I wanted to see what the output looked like. The culprit was the rollable table - totally missed it. Thanks for the help. While I'm at it, I'm trying to figure the best way to do a macro for Magic Missile in 5e (where the DM uses separate rolls for each missile). I have this; !power {{ --tokenid|@{selected|token_id} --emote|*"Magicae telum"* --name|@{selected|token_name} Casts Magic Missile  --Missile#?{Spell level|1,3|2,4|3,5}|[[1d4+1]] Force --Note|Cast at Level [[ ?{Spell level}-2 ]]. Missiles hit unerringly... }} But I'd also like to target tokens, if possible.
1506440263
Silvyre said: Craven said: @{selected|repeating_tool_$0_tool} Try @{selected|repeating_tool_$0_tool bonus } instead Thanks works fine. I tried bonus but I had Tool_bonus lol. Thanks again.
1506468087

Edited 1506468176
Silvyre
Forum Champion
Doug E. said: I'd also like to target tokens, if possible. If you're referring to using PowerCards to alter a targeted Token's Bar value (see 3.4.0 update notes ), I don't believe it's possible to do that for more than one target. If you just want the macro to output the names of targeted Tokens, that's definitely doable.
1506475182
GM Matt
Sheet Author
Is it possible to have a click-to-reveal type category/line, similar to what you see in the attacks for the 5e SRD sheet? I would definitely have some uses for it, if it exists.
1506489177
Silvyre said: Doug E. said: I'd also like to target tokens, if possible. If you're referring to using PowerCards to alter a targeted Token's Bar value (see 3.4.0 update notes ), I don't believe it's possible to do that for more than one target. If you just want the macro to output the names of targeted Tokens, that's definitely doable. Just the names. I figured the repeat function would work for higher level casting but then how to target individual tokens (even if they are all on the same token). Unless there is a better way...
1506518114
Silvyre
Forum Champion
GM Matt said: Is it possible to have a click-to-reveal type category/line, similar to what you see in the attacks for the 5e SRD sheet? I would definitely have some uses for it, if it exists. The 5e OGL sheet uses Ability Command Buttons to accomplish this. You can use Command Buttons in a PowerCard macro to the same effect.
1506518172
Silvyre
Forum Champion
Doug E. said: Silvyre said: Doug E. said: I'd also like to target tokens, if possible. If you're referring to using PowerCards to alter a targeted Token's Bar value (see 3.4.0 update notes ), I don't believe it's possible to do that for more than one target. If you just want the macro to output the names of targeted Tokens, that's definitely doable. Just the names. You can use @{target|Target 1|token_name}, @{target|Target 2|token_name}, etc.
1506659370

Edited 1506660239
Alright, well, since the newest update for whatever reason now all of my macro's from powercards are crashing the api. Error: TypeError: Cannot read property 'get' of undefined TypeError: Cannot read property 'get' of undefined at longrest (apiscript.js:5250:39) at handleapicommand (apiscript.js:4982:13) at apiscript.js:4939:13 at eval (eval at (/home/node/d20-api-server/api.js:146:1), :65:16) at Object.publish (eval at (/home/node/d20-api-server/api.js:146:1), :70:8) at /home/node/d20-api-server/api.js:1510:12 at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560 at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147) at Kd (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:546) at Id.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:489) at Zd.Ld.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:94:425) All of these macro's were working ~1 week ago. And now... most of them are working? I'll grab a macro causing a crash if I can find another. Standby. Yep. Confirmed they're now working. How strange. Seems to be related to the 5e OGL sheet macro I have built. Disregard.
1506708344
Silvyre said: Doug E. said: Silvyre said: Doug E. said: I'd also like to target tokens, if possible. If you're referring to using PowerCards to alter a targeted Token's Bar value (see 3.4.0 update notes ), I don't believe it's possible to do that for more than one target. If you just want the macro to output the names of targeted Tokens, that's definitely doable. Just the names. You can use @{target|Target 1|token_name}, @{target|Target 2|token_name}, etc. That does not work with the repeat function. Since this is extremely edge case I think I'll abandon this in favour of querying level and using a formula to roll and add up all the damage to a single target (99% use case).
1507495526
mAc
Pro
Any idea what's wrong with this code? It doesn't play the sound when it should. It's a token action. I can confirm the audio is actually in roll20 and plays normally. !power {{ --format|atwill --titlefontshadow|none --soundfx|_play|horrorvisage --charid|@{character_id} --emote|Everyone's blood runs ice cold as they behold the mummy's terrible form! --name|Horrifying Visage --leftsub|Action --Saving Throw|Each non-Undead creature that can see the mummu must make a Wisdom saving throw! }}
1507540820
Ziechael
Forum Champion
Sheet Author
API Scripter
First things first... do you have Roll20 Audio Master installed? Secondly, is the name of the track case perfect?
Sorry if it should be obvious, but I can't seem to figure out how (and if) I can show a powerCard to only one player. Does somebody around here have this information ? 
1507591723
Silvyre
Forum Champion
Nicolas B. said: Sorry if it should be obvious, but I can't seem to figure out how (and if) I can show a powerCard to only one player. Does somebody around here have this information ?  You can use --whisper|self, <player name>
Oh thank you, and by the way is there anywhere where I could find a more completed list of tags and all that rather than the one at the start of this thread that's missing some info ?
1507596785

Edited 1507597061
Silvyre
Forum Champion
The original post (including edited updates) documents about all of the tags. There's not really any other documentation around. You could look at the source code ; the tags are properties of the 'PowerCard' object (so searching the source code for "PowerCard." may net you some new insight. Of course, if you'd like to know a bit more about any tag, or whether something is possible to do with PowerCards, feel free to ask.
Can you use power card in other systems that are not DnD, for example Warhammer?
1507637420
The Aaron
Forum Champion
API Scripter
Sure, it’s pretty system agnostic. It’s really just a formatting system. 
cool, thx
any youtube tutorial on how to use it?
1507669010
Silvyre
Forum Champion
Danny C. said: any youtube tutorial on how to use it? I wasn't able to find one, unfortunately. (For anyone interested in making one, now that PowerCards development has stopped, it would be a great time to make one!)
That would be awesome to people who are new to it and dont have so much understanding about to use this tool. I saw a game wich the player was able to use it for making sounds and a really beatifull chat stuff. Well I am a total noob so i will probably will ask newbie stuff but hope you guys can help me to master this awesome tool
1507670530
Silvyre
Forum Champion
For sure!
how do you change color I try to do this but it dont seem to work. I try this !power {{ --format|txcolor (#989CA7) --name|Test --!^6Tag|[[1d20]] --$Tag|Content }}
1507676470

Edited 1507676582
Danny C. said: how do you change color I try to do this but it dont seem to work. I try this !power {{ --format|txcolor (#989CA7) --name|Test --!^6Tag|[[1d20]] --$Tag|Content }} Create a handout named PowerCard Formats copy the following to it atwill: --txcolor|#FFFFFF --bgcolor|#3D59AB encounter: --txcolor|#FFFFFF --bgcolor|#440000 default: --txcolor|#FFFFFF --bgcolor|#0000EE item: --txcolor|#FFFFFF --bgcolor|#e58900 recharge: --txcolor|#FFFFFF --bgcolor|#000044 GM: --txcolor|#FFFFFF --bgcolor|#7171C6 Conditions: --txcolor|#FFFFFF --bgcolor|#800000 Then you can call the colors by using --format|&lt;name&gt; see example below . Then names can be changed to what ever you want. You can play with the colors by changing there numbers from sites like <a href="http://htmlcolorcodes.com/" rel="nofollow">http://htmlcolorcodes.com/</a>
1507696132
mAc
Pro
Ziechael said: First things first... do you have Roll20 Audio Master installed? Secondly, is the name of the track case perfect? Yes to both.
1507728426
Ziechael
Forum Champion
Sheet Author
API Scripter
Hmm, how odd... does it work if you change the track to something else?
I have created the handout but i only get two colors red and green. for example when i write item it dont change to something else Im I missing something?
1507731578

Edited 1507731662
Danny C. said: I have created the handout but i only get two colors red and green. for example when i write item it dont change to something else Im I missing something? Try copying this into chat and press enter. !power {{ --whisper|GM --corners|10 --format|default --name|Header Text --rightsub|Test right --leftsub|Test Left }} Should look like this. &nbsp;I am using powercard version 3.4.4
1507734473

Edited 1507734525
Its come out green. I dont know wich version i am using,&nbsp; i just copied the API script that was on Git
1507736269

Edited 1507736472
Danny C. said: Its come out green. I dont know wich version i am using,&nbsp; i just copied the API script that was on Git Looks like it using the default color for some reason. Look at the start of the script for the version.
ok, I have 3.5.0, how do I know wich format cards this version use?