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

[Script] PowerCards 3 (Thread 6)

Hi every one, I'm actually trying to set up a SpawnDefaultToken api in my powercard, but I cannot get the syntaxe right. Can you help me ?
1616201848

Edited 1616204132
Daran said: Hi every one, I'm actually trying to set up a SpawnDefaultToken api in my powercard, but I cannot get the syntaxe right. Can you help me ? I was able to get mine to work by putting the SpawnDefaultToken command in the same macro/ability as the PowerCard, after the powercard command has been closed. After you end the PowerCard with }}, hit enter and just use the !Spawn {{...}} command after it. Below Example: Please note I've changed the wording of the spell as to not release unowned content to users. Chatsetattr is used before the powercard to subtract the spellslot and the powercard at the bottom will spawn the token named "Swarm of tiny Gary Buseys". You could also replace this with ?@{what to spawn|} and just copy+paste the token name or NPC you want to spawn it. Works for the "--qty|" command as well. !setattr --name @{selected|character_name} --modb --lvl?{Spell Slot|2}_slots_expended|-1 !power {{ --name|Swarm of tiny Gary Buseys --charid|@{selected|character_id} --emote|@{selected|character_name}^^[VS](<a href="https://media.tenor.com/images/e68ce111e4d91eabec763e91a24c8512/tenor.gif)^^" rel="nofollow">https://media.tenor.com/images/e68ce111e4d91eabec763e91a24c8512/tenor.gif)^^</a> --leftsub|**Casting Time** 1 action **Range** Touch **Illusion** --rightsub|**Components**V, S, (An eyelash encased in gum arabic) **Duration** Concentration, Up to 1 hour --~C** Available Spells **~C **Level 1 :** [[@{selected|lvl1_slots_total}]] **Remaining** [[@{selected|lvl1_slots_expended}]]^^ **Level 2 :** [[@{selected|lvl2_slots_total}]] **Remaining** [[@{selected|lvl2_slots_expended}]]^^ **Level 3** : [[@{selected|lvl3_slots_total}]] **Remaining** [[@{selected|lvl3_slots_expended}]]^^ **Level 4** : [[@{selected|lvl4_slots_total}]] **Remaining** [[@{selected|lvl4_slots_expended}]] --!lo|You summon swarms of tiny Gary Buseys to attack your foes. Two swarms of tiny Gary Buseys appear in unoccupied spaces that you can see within range.Each swarm disappears when it drops to 0 hit points or when the spell ends. The swarms are friendly to you and your allies. Make one initiative roll for both swarms, which have their own turns. They obey verbal commands that you issue to them (no action required by you). If you don't issue any commands to them, they defend themselves from hostile creatures but otherwise take no actions. --soundfx *1|_audio,play,nomenu|Raise Dead Spell by Pablo Betancourt }} !Spawn {{ --name|Swarm of tiny Gary Buseys --qty|2 --placement|surround --fx| nova-blood }}
I apologize if this has already been addressed but I am at wit's end.&nbsp; I cannot seem to get the API script ChatSetAttr to work inside a powercard.&nbsp; I usually have to place it outside to function:&nbsp; !modbattr --silent --charid @{selected|character_id} --lvl1_slots_expended|-1&nbsp;&nbsp; I would like to be able to use the ChatSetAttr command inside the powercard to allow me to select different levels of slot use i.e. &nbsp; &nbsp;--!Level|[[ [$Lvl] ?{What Level?|1|2|3|4|5}]]&nbsp; &nbsp; -- ?? $Lvl == 1 ??!SlotAdj|&nbsp;&nbsp; -- api _ &nbsp;modbattr --silent --charid @{selected|character_id} --lvl1_slots_expended|-1 Any thoughts?&nbsp; TIA.
Try: --!Level|[ [$Lvl] ?{What Level?|1|2|3|4|5} --api_modbattr|_silent _charid @{selected|character_id} _lvl[^Lvl]_slots_expended|-1 Michael C. said: I apologize if this has already been addressed but I am at wit's end.&nbsp; I cannot seem to get the API script ChatSetAttr to work inside a powercard.&nbsp; I usually have to place it outside to function:&nbsp; !modbattr --silent --charid @{selected|character_id} --lvl1_slots_expended|-1&nbsp;&nbsp; I would like to be able to use the ChatSetAttr command inside the powercard to allow me to select different levels of slot use i.e. &nbsp; &nbsp;--!Level|[[ [$Lvl] ?{What Level?|1|2|3|4|5}]]&nbsp; &nbsp; -- ?? $Lvl == 1 ??!SlotAdj|&nbsp;&nbsp; -- api _ &nbsp;modbattr --silent --charid @{selected|character_id} --lvl1_slots_expended|-1 Any thoughts?&nbsp; TIA.
1616545275

Edited 1616596119
Thanks, Colin!&nbsp; I'll try that.
1616596207

Edited 1616597136
Colin:&nbsp; tried it and had this error (Canu is token name):(Possible that $Lvl, _lvl &amp; ^lvl are not same tag?)&nbsp; &nbsp; Attribute lvl &gt; ROLL ID NOT FOUND &lt; is not number-valued for character Canu. Attribute left unchanged.
Oops: --!Level|[[ [$Lvl] ?{What Level?|1|2|3|4|5} + 1d0 ]] I missed some brackets and forgot that you always have to perform *some* dice roll. Keep in mind, also, that using "--!Level|" will result in that line being displayed with the result of the query showing but not the tag. If you want to suppress that line's display output, you could use "--$Level|" or "--hroll" Colin C. said: Try: --!Level|[ [$Lvl] ?{What Level?|1|2|3|4|5} --api_modbattr|_silent _charid @{selected|character_id} _lvl[^Lvl]_slots_expended|-1
I must be doing something wrong still.&nbsp; I used: &nbsp; --$Level| [[ [$Lvl] ?{What Level?|1|2|3|4|5} + 1d0 ]] &nbsp; --api_modbattr|_silent _charid @{selected|character_id} _lvl[^lvl1]_slots_expended|-1 And still got the same error.&nbsp; Attribute lvl &gt; ROLL ID NOT FOUND &lt; is not number-valued for character Canu. Attribute left unchanged.
--api_modbattr|_silent _charid @{selected|character_id} _lvl[^ l vl 1 ]_slots_expended|-1 There's your problem --api_modbattr|_silent _charid @{selected|character_id} _lvl[^Lvl]_slots_expended|-1 Michael C. said: I must be doing something wrong still.&nbsp; I used: &nbsp; --$Level| [[ [$Lvl] ?{What Level?|1|2|3|4|5} + 1d0 ]] &nbsp; --api_modbattr|_silent _charid @{selected|character_id} _lvl[^lvl1]_slots_expended|-1 And still got the same error.&nbsp; Attribute lvl &gt; ROLL ID NOT FOUND &lt; is not number-valued for character Canu. Attribute left unchanged.
1616653901

Edited 1616653957
Victor B.
Pro
Sheet Author
API Scripter
Insane coding.&nbsp; Provide a menu to make powercards not require a programming degree.&nbsp; Make it accessible to PRO users who aren't programmer/technical.&nbsp; Help Roll20 in the process.&nbsp;&nbsp;
1616677017

Edited 1616677073
Colin C.&nbsp; Sorry to pester you.&nbsp; Good news, bad news.&nbsp; I ran: &nbsp; --$Level| [[ [$Lvl] ?{At What Level to Cast?|1|2|3|4|5} + 1d0 ]] &nbsp;&nbsp;--api_modbattr|_silent _charid @{selected|character_id} _lvl[^Lvl]_slots_expended|-1 Good news: I did not get the error code!&nbsp; Bad news:&nbsp; got a new one (with no adjustment to spell slots): &nbsp; --$Level| &nbsp; 3 --api_modbattr|_silent _charid -MTGCqH-TnxbUyub-FTA _lvl[^Lvl]_slots_expended|-1
Did you put that into a PowerCard? You have to put those lines into a PowerCard for it to do anything. Michael C. said: Colin C.&nbsp; Sorry to pester you.&nbsp; Good news, bad news.&nbsp; I ran: &nbsp; --$Level| [[ [$Lvl] ?{At What Level to Cast?|1|2|3|4|5} + 1d0 ]] &nbsp;&nbsp;--api_modbattr|_silent _charid @{selected|character_id} _lvl[^Lvl]_slots_expended|-1 Good news: I did not get the error code!&nbsp; Bad news:&nbsp; got a new one (with no adjustment to spell slots): &nbsp; --$Level| &nbsp; 3 --api_modbattr|_silent _charid -MTGCqH-TnxbUyub-FTA _lvl[^Lvl]_slots_expended|-1
1616767703

Edited 1616894091
Colin C. - Yes, here is the powercard: !power {{ &nbsp; --txcolor|#B9E1F3 &nbsp; --bgcolor|#00ffff &nbsp; --corners|10 &nbsp; --border|5px solid #000 &nbsp; --titlefontshadow|none &nbsp; --erowtx|#000000 &nbsp; --erowbg|#00ffff &nbsp; --orowtx|#01496A &nbsp; --orowbg|#B9E1F3 &nbsp; --name|Thunderwave &nbsp; --leftsub|**1st Level** | Instantaneous | Self (15' cube) &nbsp; --rightsub|**Evocation** | **1 Action** |&nbsp; **V S** &nbsp;&nbsp;--soundfx|_audio,play,nomenu|Thunder &nbsp; --$Level| [[ [$Lvl] ?{At What Level Spell to Cast?|1|2|3|4|5} + 1d0 ]] &nbsp; --api_modbattr|_silent _charid @{selected|character_id} _lvl[^Lvl]_slots_expended|-1 &nbsp; --!Button|Select the group of enemy tokens and then click on [Thunderwave](~Macros|GroupCheck) &nbsp; --!Thunder|All targets that fail their save are pushed away 10' ^^ ^^&nbsp; }}
I know you can place 'fake' rolls using [!text!]. Is it possible to place 'fake' tooltips as well? (not using the --title tag ) Thanks.
1617346894

Edited 1617346964
Sorry if this has been asked -- these forums appear hard to search (help there appreciated too) I have an awesome set of powercard macro buttons that work for any selected token, and I have them all 'in-bar' to appear at the bottom of screen, but: I was wondering if there's any way I might get the buttons to work on a character sheet when pressed. -Example solution:&nbsp; Can I have the character sheet button say: 1.&nbsp; 'select token' for this character.&nbsp; 2. now run the powercard macro?
Hello. A problem with a game. PCM : Check PCMHelper : Check !pcmsetup : check (1.0.12). Token Selected + !pcm : check (new attributes are created) Advantage option on the PC: always ask When using pc-attack : selected PC + Click PC-attack + Choose target + Choose Select attack to use (Bite with a lizarfolk) : OK +Submit =&gt; the advantage selection goes wrong : in the list choice i have : "Normal Roll,{{normal=1" Can u help me Thx a lot !
Zedude said: Hello. A problem with a game. PCM : Check PCMHelper : Check !pcmsetup : check (1.0.12). Token Selected + !pcm : check (new attributes are created) Advantage option on the PC: always ask When using pc-attack : selected PC + Click PC-attack + Choose target + Choose Select attack to use (Bite with a lizarfolk) : OK +Submit =&gt; the advantage selection goes wrong : in the list choice i have : "Normal Roll,{{normal=1" Can u help me Thx a lot ! I think advantage needs to be set to Advantage Toggle. Try that.
Yeah. it works. But in the last of 2020, i did'nt have the problem... it's annoying to change the advantage button ...&nbsp;
1617633752
Kraynic
Pro
Sheet Author
Zedude said: Yeah. it works. But in the last of 2020, i did'nt have the problem... it's annoying to change the advantage button ...&nbsp; If the sheet you are using has an active thread, it is always worth checking there to see if there is an issue with the sheet.&nbsp; My guess is that you are using the 5E by Roll20 sheet, because it looks like something identical to what came up in the sheet thread. &nbsp; If so, I expect your problem will go away this week after a sheet code update: <a href="https://app.roll20.net/forum/permalink/9956039/" rel="nofollow">https://app.roll20.net/forum/permalink/9956039/</a>
1617640597
Senjak
Pro
Sheet Author
Is there a way to change the white text on pink to some other colors?&nbsp; I can fix everything else, just not those giant pink buttons. Thanks! Senjak
Does anyone know how to have an Advantage roll or Disadvantage roll show up on a powercard? I'm trying to figure out how to add it to the templates from the PCM Helper handout so it shows up as it does when you hit or miss... ex. "You have rolled with advantage" or "You have rolled with disadvantage". Thanks in advance...
1617819780

Edited 1617820135
Does anybody know how to get working apply damage buttons? I'm trying to get buttons to apply damage working correctly; I know this is a topic that has come up before, but I cannot find any working solutions on the forums (perhaps I'm just terrible at searching). I'm using the templates made by PCMHelper. The NPCAttack template, specifically. I've attempted two methods. First, I tried to use the ~NPCA-DAMAGE replacement to make a button that rolls and applies the damage with tokenmod, like so (relevant portion bolded and underlined): NPCAttack: --["~NPCA-TYPE$" -eq "ATTACK"]Attack:|[#[ [$Atk] ~0! + ~NPCA-TOHIT$ [Attack Bonus] ]#] vs **AC** [#[~T-AC$]#] --["~NPCA-TYPE$" -eq "ATTACK"]?? $Atk &lt; ~T-AC$ ?? !Missed|**The ~NPCA-NAME$ attack missed!** --["~NPCA-TYPE$" -eq "ATTACK" -and "~NPCA-DAMAGETYPE2$" -eq ""]?? $Atk &gt;= ~T-AC$ AND $Atk.base &lt;&gt; 20 ?? Hit:|[#[ [$Dmg] ~NPCA-DAMAGE$ ]#] ~NPCA-DAMAGETYPE$ damage [Apply ~NPCA-DAMAGE&nbsp;Damage](!token&amp;#45;mod &amp;#45;&amp;#45;set bar1_value|-&amp;#91;&amp;#91;~NPCA-DAMAGE$&amp;#93;&amp;#93;) &nbsp;--["~NPCA-TYPE$" -eq "ATTACK" -and "~NPCA-DAMAGETYPE2$" -ne ""]?? $Atk &gt;= ~T-AC$ AND $Atk.base &lt;&gt; 20 ?? Hit:|[#[ [$Dmg] ~NPCA-DAMAGE$ ]#] ~NPCA-DAMAGETYPE$ damage and [#[ [$Dmg2] ~NPCA-DAMAGE2$ ]#] ~NPCA-DAMAGETYPE2$ damage --["~NPCA-TYPE$" -eq "ATTACK" -and "~NPCA-DAMAGETYPE2$" -eq ""]?? $Atk.base == 20 ?? Hit:|[#[ [$Dmg] ~NPCA-CRIT$ ]#] ~NPCA-DAMAGETYPE$ damage --["~NPCA-TYPE$" -eq "ATTACK" -and "~NPCA-DAMAGETYPE2$" -ne ""]?? $Atk.base == 20 ?? Hit:|[#[ [$Dmg] ~NPCA-CRIT$ ]#] ~NPCA-DAMAGETYPE$ damage and [#[ [$Dmg2] ~NPCA-CRIT2$ ]#] ~NPCA-DAMAGETYPE2$ damage --["~NPCA-TYPE$" -eq "ATTACK"]?? $Atk.base == 1 ?? Fumble|The attack goes horribly wrong! --["~NPCA-DESCRIPTION$" -ne "" ]Description|~NPCA-DESCRIPTION$ This works to roll the damage, but this is not ideal because it will roll anew each time the button is pressed:&nbsp; Also, this does not display the button header properly; if I could get that header to display properly, this might be an acceptable solution. I also tried to reference the roll: NPCAttack: --["~NPCA-TYPE$" -eq "ATTACK"]Attack:|[#[ [$Atk] ~0! + ~NPCA-TOHIT$ [Attack Bonus] ]#] vs **AC** [#[~T-AC$]#] --["~NPCA-TYPE$" -eq "ATTACK"]?? $Atk &lt; ~T-AC$ ?? !Missed|**The ~NPCA-NAME$ attack missed!** --["~NPCA-TYPE$" -eq "ATTACK" -and "~NPCA-DAMAGETYPE2$" -eq ""]?? $Atk &gt;= ~T-AC$ AND $Atk.base &lt;&gt; 20 ?? Hit:|[#[ [$Dmg] ~NPCA-DAMAGE$ ]#] ~NPCA-DAMAGETYPE$ damage [Apply [^Dmg] Damage](!token&amp;#45;mod &amp;#45;&amp;#45;set bar1_value|-[^DMG]) &nbsp;--["~NPCA-TYPE$" -eq "ATTACK" -and "~NPCA-DAMAGETYPE2$" -ne ""]?? $Atk &gt;= ~T-AC$ AND $Atk.base &lt;&gt; 20 ?? Hit:|[#[ [$Dmg] ~NPCA-DAMAGE$ ]#] ~NPCA-DAMAGETYPE$ damage and [#[ [$Dmg2] ~NPCA-DAMAGE2$ ]#] ~NPCA-DAMAGETYPE2$ damage --["~NPCA-TYPE$" -eq "ATTACK" -and "~NPCA-DAMAGETYPE2$" -eq ""]?? $Atk.base == 20 ?? Hit:|[#[ [$Dmg] ~NPCA-CRIT$ ]#] ~NPCA-DAMAGETYPE$ damage --["~NPCA-TYPE$" -eq "ATTACK" -and "~NPCA-DAMAGETYPE2$" -ne ""]?? $Atk.base == 20 ?? Hit:|[#[ [$Dmg] ~NPCA-CRIT$ ]#] ~NPCA-DAMAGETYPE$ damage and [#[ [$Dmg2] ~NPCA-CRIT2$ ]#] ~NPCA-DAMAGETYPE2$ damage --["~NPCA-TYPE$" -eq "ATTACK"]?? $Atk.base == 1 ?? Fumble|The attack goes horribly wrong! --["~NPCA-DESCRIPTION$" -ne "" ]Description|~NPCA-DESCRIPTION$ But this version does not work at all. First, the button displays a totally different roll result:&nbsp; And the actual roll portion fails to find the rollID:&nbsp; I feel like I'm so close to getting this working, but I'm not sure what I'm missing.
Quick question:&nbsp; Is there a "islike" or "contains" conditional in Power Cards?&nbsp; I would like to look at a string and say if the string contains "X" then "Y".&nbsp; For example:&nbsp; ?? @{target|npc_immunities} contains ~DType$ ?? @{target|character_name} is immune to ~Dtype$ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ?? @{target|npc_resistances} contains ~DType$ ?? @{target|character_name} is resistant to ~Dtype$ Then I could also use it for alterbars.&nbsp; Any thoughts on the possibility or another way to make it work?
I believe you can use --?? Text @@ T ??|
I cant quite get that to work, I've tried a few ways, let me know if anyone sees a solution, here is a test I tried out, the bold lines produce no results: !power {{ --format|spellcard --replaceattrs|S-|@{selected|character_id} --inlinereplace|DT|fire; --tokenid|@{selected|token_id} --format|spellcard --Output:| ~DT$ --?? ~DT$ @@ fire ?? Result with Text:|Success --?? ~DT$ @@ @{target|npc_immunities} ?? Result with Attribute:|Success --?? fire @@ fire, poison, psychic ?? Result with Multiple Text:| Success --Immunities:|@{target|npc_immunities} }}
I'm trying to figure out where to put in a conditional to show when PC's roll with Advantage or Disadvantage... Is there another way to call out on a powercard from the PCM Helper Template to show Advantage or Disadvantage? See script below... Any help or guidance would be greatly appreciated!! Basics: --tokenid|~0! --target_list|~1! --['~6!' -ne '/w gm ']emote|~S-TN$ ~2! against ~T-TN$ --format|~S-CN$ --name|~3! --leftsub|~4! --rightsub|~5! PCAttack: --['~1!' -eq '/w gm ']whisper|gm --['~2!' -eq '']Attack *1|[#[ [$Atk] ~0! + ~PCA-ATKBONUS$ [Attack Bonus] ]#] vs **AC** [#[~T-AC$]#] --['~2!' -ne '']Attack *2|[#[ [$Atk] ~0! + ~PCA-ATKBONUS$ [Attack Bonus] + ~2! [Bless] ]#] vs **AC** [#[~T-AC$]#] --?? $Atk.base == 1 ?? Fumble|The attack went horribly wrong! --?? $Atk.base &lt;&gt; 1 AND $Atk.base &lt;&gt; 20 AND $Atk.total &lt; ~T-AC$ ?? Miss *1|~S-CN$ missed. --?? Roll == 2d20kh1 ?? Advantage| You have rolled with Advantage!! --["~PCA-DMG2DICE$" -eq "none" -and "~3!" -eq "0"]?? $Atk.base &lt;&gt; 20 AND $Atk.total &gt;= ~T-AC$ ?? Hit|~S-CN$ hits ~T-CN$ for [#[ [$Dmg] ~PCA-DMG1DICE$ ]] ~PCA-DMG1TYPE$ damage --["~PCA-DMG2DICE$" -ne "none" -and "~3!" -eq "0"]?? $Atk.base &lt;&gt; 20 AND $Atk.total &gt;= ~T-AC$ ?? Hit|~S-CN$ hits ~T-CN$ for [#[ [$Dmg] ~PCA-DMG1DICE$ ]] ~PCA-DMG1TYPE$ damage and [[ [$Dmg2] ~PCA-DMG2DICE$ ]] ~PCA-DMG2TYPE$ damage --["~PCA-DMG2DICE$" -eq "none" -and "~3!" -ne "0"]?? $Atk.base &lt;&gt; 20 AND $Atk.total &gt;= ~T-AC$ ?? Hit|~S-CN$ hits ~T-CN$ for [#[ [$Dmg] ~PCA-DMG1DICE$ ]] ~PCA-DMG1TYPE$ damage and [[ [$GDmg] ~3! ]] ~4! damage --["~PCA-DMG2DICE$" -ne "none" -and "~3!" -ne "0"]?? $Atk.base &lt;&gt; 20 AND $Atk.total &gt;= ~T-AC$ ?? Hit|~S-CN$ hits ~T-CN$ for [#[ [$Dmg] ~PCA-DMG1DICE$ ]] ~PCA-DMG1TYPE$ damage, [[ [$GDmg] ~3! ]] ~4! damage and [[ [$Dmg2] ~PCA-DMG2DICE$ ]] ~PCA-DMG2TYPE$ damage --["~PCA-DMG2DICE$" -eq "none" -and "~3!" -eq "0"]?? $Atk.base == 20 AND $Atk.total &gt;= ~T-AC$ ?? Critical Hit|~S-CN$ hits ~T-CN$ for [#[ [$Dmg] ~PCA-DMG1CRIT$ ]] ~PCA-DMG1TYPE$ damage --["~PCA-DMG2DICE$" -ne "none" -and "~3!" -eq "0"]?? $Atk.base == 20 AND $Atk.total &gt;= ~T-AC$ ?? Critical Hit|~S-CN$ hits ~T-CN$ for [#[ [$Dmg] ~PCA-DMG1CRIT$ ]] ~PCA-DMG1TYPE$ damage and [[ [$Dmg2] ~PCA-DMG2CRIT$ ]] ~PCA-DMG2TYPE$ damage --["~PCA-DMG2DICE$" -eq "none" -and "~3!" -ne "0"]?? $Atk.base == 20 AND $Atk.total &gt;= ~T-AC$ ?? Critical Hit|~S-CN$ hits ~T-CN$ for [#[ [$Dmg] ~PCA-DMG1CRIT$ ]] ~PCA-DMG1TYPE$ damage and [[ [$GDmg] ~5! ]] ~4! damage --["~PCA-DMG2DICE$" -ne "none" -and "~3!" -ne "0"]?? $Atk.base == 20 AND $Atk.total &gt;= ~T-AC$ ?? Critical Hit|~S-CN$ hits ~T-CN$ for [#[ [$Dmg] ~PCA-DMG1CRIT$ ]] ~PCA-DMG1TYPE$ damage [[ [$GDmg] ~5! ]] ~4! damage and [[ [$Dmg2] ~PCA-DMG2CRIT$ ]] ~PCA-DMG2TYPE$ damage --["~PCA-SAVE$" -eq "true"]?? $Atk.base == 20 OR $Atk.total &gt;= ~T-AC$ ?? Save|~T-CN$ can attempt a **DC ~PCA-SAVEDC$** ~PCA-SAVEATTR$ saving throw for ~PCA-SAVEEFFECT$ --["~PCA-SAVE$" -eq "true"]?? $Atk.base == 20 OR $Atk.total &gt;= ~T-AC$ ?? Save|~T-CN$ can attempt a **DC ~PCA-SAVEDC$** ~PCA-SAVEATTR$ saving throw for ~PCA-SAVEEFFECT$ --["~PCA-DESC$" -ne "none"]Description|~PCA-DESC$
Any time you are doing an operation on a text string that contains (or could contain) a space, you need to wrap it in " marks. Also, your comparisons are checking to see if X contains "X, Y, Z", which will never be true. You need the converse. Chris G. said: I cant quite get that to work, I've tried a few ways, let me know if anyone sees a solution, here is a test I tried out, the bold lines produce no results: !power {{ --format|spellcard --replaceattrs|S-|@{selected|character_id} --inlinereplace|DT|fire; --tokenid|@{selected|token_id} --format|spellcard --Output:| ~DT$ --?? ~DT$ @@ fire ?? Result with Text:|Success --?? ~DT$ @@ @{target|npc_immunities} ?? Result with Attribute:|Success --?? fire @@ fire, poison, psychic ?? Result with Multiple Text:| Success --Immunities:|@{target|npc_immunities} }}
1618381635

Edited 1618382195
Is this the current normal state of Powercards helper's default macros or is there something wrong with my computers fonts somehow? Nevermind, I had to uninstall both scripts, it crashes the api too much for my liking.
Hi everyone. Is there a way in which I can order multiple Powercard in a macro? I have 2 of them in a only macro, but the first is essential in modifying the second. How can I order them? I've tried something like that, with a full space between thetwo strings, but doesn't work !power$0 {{TEXT OF POWERCARD}} !power$1 {{TEXT OF POWERCARD2}}
You can just start each PowerCard on a new line. !power {{ --Tags|Contents }} !power {{ --Tags|Contents }} LU MASTER said: Hi everyone. Is there a way in which I can order multiple Powercard in a macro? I have 2 of them in a only macro, but the first is essential in modifying the second. How can I order them? I've tried something like that, with a full space between thetwo strings, but doesn't work !power$0 {{TEXT OF POWERCARD}} !power$1 {{TEXT OF POWERCARD2}}
Collin, the problem is that the first Powercard is heavier than the second, so the site elaborate the second first. But I need the first powercard since it influences values that I need to use for the second, so I need a way to order them. Any options?
1618530945
Kurt J.
Pro
API Scripter
PCMHelper updated to 1.0.13 This is a minor update ( GIST ) and will be pushed to OneClick with the next cyctle. it adds a single new command : !pcmremove, which removes the macros created by PCMHelper.
Hi guys. Little question with Powercard : I would like to replace a NPC classic action (typically from the Compedium) by an abilities macro I created for the character. The name of the character ability macro is "1epee2mains", in order to get a great Power Card presentation, but having this abilities listed in a npc_action_list query So : I tried to create an attribute called action_$0_macro and put the value to %{selected|1epee2mains}, as mentionned in the wiki, but it doesnt work. However, if I try directly %{selected|1epee2mains} in the chat it's OK. English is far from beeing my native language, but I kind of understand that there is some important with rollID or assimilated ? If someone could help me that'd be great :) Thanks !
1619119921

Edited 1619119982
Hi there, I am new to the forum I am currently editing a part for degenesis. I know nothing about script, I learn with tutorials on the wiki and on the roll20 forum. I currently have a problem with my command line. I would like to have the skill attribute number example: (PHY 2 = 1d6 + 1d6) and not (PHY2 = 2D6) the result must not be the sum of the dice but the number of successes greater than can you help me ? Thank you -------------------------------------------------------------- !power {{ --tokenid|@{selected|token_id} --emote|**@{selected|token_name}** Attaque @{target|character_name} --target_list|@{target|token_id} --name|Epée --leftsub|Action --rightsub|Cac 1,5m --Attack:|[[ [$Roll]d6 + [[@{selected|PHYSIQUE}]] [PHY] + [[@{selected|Melée}]] [REA] + [[@{selected|Bonus}]] - [[@{selected|Malus}]] - [[@{selected|Traumatisme}]] ]] vs ac --?? $Roll.ss == d6}&gt;4 }} -------------------------------------------------------------------------
Hi all, hope you are all well. I have possibly a simple question but I couldnt find an answer on the forum: I have a simple power card !power {{ &nbsp;--emote|@{selected|character_name} &nbsp;--tokenid|@{selected|token_id} &nbsp; --name|Nahkampf &nbsp; --Angriff |[[ [$atk] 1d20 + ?{AT-Bonus|0}]] &nbsp; --?? $atk.total &gt;= @{selected|at_hiebwaffen} ?? Vorbei:|Nicht getroffen. &nbsp; --?? $atk.total &lt; @{selected|at_hiebwaffen} ?? Schaden:|Schaden:|#Schaden Du hast deinen Gegner erwischt. }} It works but the macro #schaden is always executed no matter whether the conditional is met or not...So first, Angriff with bonus is asked, then Schaden is executed AND the the condional is checked...can u help? Regards &nbsp;Hendrick
I'm not sure exactly what the rest of your code is doing, but you can do something like this: --?? $Roll1 &gt; 4 AND $Roll2 &gt; 4 ??skipto*1|TwoSuccesses --?? $Roll1 &gt; 4 OR $Roll2 &gt; 4 ??skipto*2|OneSuccess --skipto*4|End --:TwoSuccesses| &lt;code for whatever happens with two successes&gt; --skipto*3|End --:OneSuccess| &lt;code for whatever happens with one success&gt; --:End| GAKNAR said: Hi there, I am new to the forum I am currently editing a part for degenesis. I know nothing about script, I learn with tutorials on the wiki and on the roll20 forum. I currently have a problem with my command line. I would like to have the skill attribute number example: (PHY 2 = 1d6 + 1d6) and not (PHY2 = 2D6) the result must not be the sum of the dice but the number of successes greater than can you help me ? Thank you -------------------------------------------------------------- !power {{ --tokenid|@{selected|token_id} --emote|**@{selected|token_name}** Attaque @{target|character_name} --target_list|@{target|token_id} --name|Epée --leftsub|Action --rightsub|Cac 1,5m --Attack:|[[ [$Roll]d6 + [[@{selected|PHYSIQUE}]] [PHY] + [[@{selected|Melée}]] [REA] + [[@{selected|Bonus}]] - [[@{selected|Malus}]] - [[@{selected|Traumatisme}]] ]] vs ac --?? $Roll.ss == d6}&gt;4 }} -------------------------------------------------------------------------
In PowerCards, every line is run. What a conditional does is determine whether the content of the line is used (Or perhaps a skipto occurs). You could try using skipto and labels. Hendrick said: Hi all, hope you are all well. I have possibly a simple question but I couldnt find an answer on the forum: I have a simple power card !power {{ &nbsp;--emote|@{selected|character_name} &nbsp;--tokenid|@{selected|token_id} &nbsp; --name|Nahkampf &nbsp; --Angriff |[[ [$atk] 1d20 + ?{AT-Bonus|0}]] &nbsp; --?? $atk.total &gt;= @{selected|at_hiebwaffen} ?? Vorbei:|Nicht getroffen. &nbsp; --?? $atk.total &lt; @{selected|at_hiebwaffen} ?? Schaden:|Schaden:|#Schaden Du hast deinen Gegner erwischt. }} It works but the macro #schaden is always executed no matter whether the conditional is met or not...So first, Angriff with bonus is asked, then Schaden is executed AND the the condional is checked...can u help? Regards &nbsp;Hendrick
Hi Colin, thanks, I tried to use skipto but still, the macro is executed (the dropdown apperas) and then the conditional is checked (target is hit, damage from the macro is applied) or not - no damage from the macro is shown. So the conditional itself works fine, but the macro dropdown is always shown. regards hendrick I'm not sure exactly what the rest of your code is doing, but you can do something like this: --?? $Roll1 &gt; 4 AND $Roll2 &gt; 4 ??skipto*1|TwoSuccesses --?? $Roll1 &gt; 4 OR $Roll2 &gt; 4 ??skipto*2|OneSuccess --skipto*4|End --:TwoSuccesses| &lt;code for whatever happens with two successes&gt; --skipto*3|End --:OneSuccess| &lt;code for whatever happens with one success&gt; --:End|
1619181220

Edited 1619279406
Th ank you @hendrix :) Your response was quick !! The chain to serve me after, but I poorly express myself. let me explain: In the rules of Degenesis (action value = Attribute + skill +/- mod) the action value which corresponds to the number of six-sided dice. it is necessary to count the number of dice displaying a result of 4 (success). examples: "Falberg is a spital preserver. A gendo has hurt his horse. Falberg wants to appease him so that he can heal the horse. he uses his Instinct + Dressage skill. His Instinct attribute has a value of 2, his Dressage skill is 1. Falberg adds the two numbers and rolls 3 dice. He rolls a 2, a 4 and a 6. the 2 is zero on the 4 and the 6 is successful. Falberg therefore has 2 successes." When I run this variable: -Attack:|[[ [$Roll]d6 + [PHYSIQUE] + [Melée] + [Bonus] - [Malus] - [Traumatisme] ]] I always get the wrong result. The macro is possible with the PowerCards API? &nbsp;-_- Thanks for your help !power {{ --tokenid|@{selected|token_id} --emote|**@{selected|token_name}** tente d'assomer @{target|character_name} --target_list|@{target|token_id} --name|Massue --leftsub|Action --rightsub|Cac 1,5m -Attack:|[[ [$Roll]d6 + [PHYSIQUE] + [Melée] + [Bonus] - [Malus] - [Traumatisme] ]] --?? $Roll.ss == d6}&gt;4 }} ------------------------------------------------------ Finaly i was found it ^^ it to be simple --Attack|[[ {@{selected|PHYSIQUE}d6}&gt;4 [PHY] + {@{selected|Melée}d6}&gt;4 [MEL] ]] thk u again
Hello! I'm trying to use power cards and token mod to create a status wiki, which players can also use to add status markers on their tokens when those are selected, but I'm running into an error when they aren't. Is there a way to check whether there is a token selected with powercards' conditionals?
1620246231

Edited 1620246313
Hello,&nbsp; This seems like the best place to post my problem, so here it is. I made a powercard for a Wand of Magic Missile, based on an example by Nick Olivo (staff of frost example). It works, but not perfectly. Whatever option I choose (number of charges, so number of magic missiles), the script always ask me for 9 targets (maximum of targets for 7 charges). Is there a way to change the script so that I only have to input the exact number of target I need? Here is the card: !power {{ &nbsp; --name|Wand of Magic Missiles &nbsp; --leftsub|Evocation Spell &nbsp; --rightsub|Range 120 feet &nbsp; --inlinereplace|ChargesOnCharacterSheet|@{repeating_resource_$0_resource_right} --?? ?{Select Action|1 charge,1Charge|2 charges,2Charges|3 charges,3Charges|4 charges,4Charges|5 charges,5Charges|6 charges,6Charges|7 charges,7Charges|Recharge,Recharge} == 1Charge ?? skipTo*1|1Charge --?? ?{Select Action|1 charge,1Charge|2 charges,2Charges|3 charges,3Charges|4 charges,4Charges|5 charges,5Charges|6 charges,6Charges|7 charges,7Charges|Recharge,Recharge} == 2Charges ?? skipTo*2|2Charges --?? ?{Select Action|1 charge,1Charge|2 charges,2Charges|3 charges,3Charges|4 charges,4Charges|5 charges,5Charges|6 charges,6Charges|7 charges,7Charges|Recharge,Recharge} == 3Charges ?? skipTo*3|3Charges --?? ?{Select Action|1 charge,1Charge|2 charges,2Charges|3 charges,3Charges|4 charges,4Charges|5 charges,5Charges|6 charges,6Charges|7 charges,7Charges|Recharge,Recharge} == 4Charges ?? skipTo*4|4Charges --?? ?{Select Action|1 charge,1Charge|2 charges,2Charges|3 charges,3Charges|4 charges,4Charges|5 charges,5Charges|6 charges,6Charges|7 charges,7Charges|Recharge,Recharge} == 5Charges ?? skipTo*5|5Charges --?? ?{Select Action|1 charge,1Charge|2 charges,2Charges|3 charges,3Charges|4 charges,4Charges|5 charges,5Charges|6 charges,6Charges|7 charges,7Charges|Recharge,Recharge} == 6Charges ?? skipTo*6|6Charges --?? ?{Select Action|1 charge,1Charge|2 charges,2Charges|3 charges,3Charges|4 charges,4Charges|5 charges,5Charges|6 charges,6Charges|7 charges,7Charges|Recharge,Recharge} == 7Charges ?? skipTo*7|7Charges --?? ?{Select Action|1 charge,1Charge|2 charges,2Charges|3 charges,3Charges|4 charges,4Charges|5 charges,5Charges|6 charges,6Charges|7 charges,7Charges|Recharge,Recharge} == Recharge ?? skipTo*8|Recharge --:1Charge| &nbsp; --?? ~ChargesOnCharacterSheet$ &lt; 1 ?? skipTo*9|NotEnoughCharges &nbsp; --Spell Cast *1| Magic Missile &nbsp; --Effect *1| You create 3 glowing darts of magical force. &nbsp; --npc_qualities_summary *1|@{selected|character_id} &nbsp; --Missile 1 : *1|[[ [$Dmg1] 1d4+1 ]] vs @{target|1 Target|token_name} &nbsp; --Missile 2 : *2|[[ [$Dmg2] 1d4+1 ]] vs @{target|2 Target|token_name} &nbsp; --Missile 3 : *3|[[ [$Dmg3] 1d4+1 ]] vs @{target|3 Target|token_name} &nbsp; --alterbar1a|_target|@{target|1 Target|token_id} _bar|1 _amount|-[^Dmg1] _show|all &nbsp; --alterbar1b|_target|@{target|2 Target|token_id} _bar|1 _amount|-[^Dmg2] _show|all &nbsp; --alterbar1c|_target|@{target|3 Target|token_id} _bar|1 _amount|-[^Dmg3] _show|all &nbsp; --Charges Spent *1| 1 &nbsp; --api_modattr *1|_silent _charid @{character_id} _repeating_resource_$0_resource_right|-1 &nbsp; --?? ~ChargesOnCharacterSheet$ == 1 ?? skipTo*10|DestructionCheck &nbsp; --skipTo*11|EndOfCard &nbsp;&nbsp; &nbsp; --:2Charges| &nbsp; --?? ~ChargesOnCharacterSheet$ &lt; 2 ?? skipTo*12|NotEnoughCharges &nbsp; --Spell Cast *2| Magic Missile &nbsp; --Effect *2| You create 4 glowing darts of magical force. &nbsp; --npc_qualities_summary *2|@{selected|character_id} &nbsp; --Missile 1 : *4|[[ [$Dmg1] 1d4+1 ]] vs @{target|1 Target|token_name} &nbsp; --Missile 2 : *5|[[ [$Dmg2] 1d4+1 ]] vs @{target|2 Target|token_name} &nbsp; --Missile 3 : *6|[[ [$Dmg3] 1d4+1 ]] vs @{target|3 Target|token_name} &nbsp; --Missile 4 : *7|[[ [$Dmg4] 1d4+1 ]] vs @{target|4 Target|token_name} &nbsp; --alterbar2a|_target|@{target|1 Target|token_id} _bar|1 _amount|-[^Dmg1] _show|all &nbsp; --alterbar2b|_target|@{target|2 Target|token_id} _bar|1 _amount|-[^Dmg2] _show|all &nbsp; --alterbar2c|_target|@{target|3 Target|token_id} _bar|1 _amount|-[^Dmg3] _show|all &nbsp; --alterbar2d|_target|@{target|4 Target|token_id} _bar|1 _amount|-[^Dmg4] _show|all&nbsp; &nbsp; --Charges Spent *2| 2 &nbsp; --api_modattr *2|_silent _charid @{character_id} _repeating_resource_$0_resource_right|-2 &nbsp; --?? ~ChargesOnCharacterSheet$ == 2 ?? skipTo*13|DestructionCheck &nbsp; --skipTo*14|EndOfCard &nbsp;&nbsp; &nbsp; --:3Charges| &nbsp; --?? ~ChargesOnCharacterSheet$ &lt; 3 ?? skipTo*15|NotEnoughCharges &nbsp; --Spell Cast *3| Magic Missile &nbsp; --Effect *3| You create 5 glowing darts of magical force. &nbsp; --npc_qualities_summary *3|@{selected|character_id} &nbsp; --Missile 1 : *8|[[ [$Dmg1] 1d4+1 ]] vs @{target|1 Target|token_name} &nbsp; --Missile 2 : *9|[[ [$Dmg2] 1d4+1 ]] vs @{target|2 Target|token_name} &nbsp; --Missile 3 : *10|[[ [$Dmg3] 1d4+1 ]] vs @{target|3 Target|token_name} &nbsp; --Missile 4 : *11|[[ [$Dmg4] 1d4+1 ]] vs @{target|4 Target|token_name} &nbsp; --Missile 5 : *12|[[ [$Dmg5] 1d4+1 ]] vs @{target|5 Target|token_name} &nbsp; --alterbar3a|_target|@{target|1 Target|token_id} _bar|1 _amount|-[^Dmg1] _show|all &nbsp; --alterbar3b|_target|@{target|2 Target|token_id} _bar|1 _amount|-[^Dmg2] _show|all &nbsp; --alterbar3c|_target|@{target|3 Target|token_id} _bar|1 _amount|-[^Dmg3] _show|all &nbsp; --alterbar3d|_target|@{target|4 Target|token_id} _bar|1 _amount|-[^Dmg4] _show|all &nbsp; --alterbar3e|_target|@{target|5 Target|token_id} _bar|1 _amount|-[^Dmg5] _show|all&nbsp; &nbsp; --Charges Spent *3| 3 &nbsp; --api_modattr *3|_silent _charid @{character_id} _repeating_resource_$0_resource_right|-3 &nbsp; --?? ~ChargesOnCharacterSheet$ == 3 ?? skipTo*16|DestructionCheck &nbsp; --skipTo*17|EndOfCard &nbsp;&nbsp; &nbsp; --:4Charges| &nbsp; --?? ~ChargesOnCharacterSheet$ &lt; 4 ?? skipTo*18|NotEnoughCharges &nbsp; --Spell Cast *4| Magic Missile &nbsp; --Effect *4| You create 6 glowing darts of magical force. &nbsp; --npc_qualities_summary *4|@{selected|character_id} &nbsp; --Missile 1 : *13|[[ [$Dmg1] 1d4+1 ]] vs @{target|1 Target|token_name} &nbsp; --Missile 2 : *14|[[ [$Dmg2] 1d4+1 ]] vs @{target|2 Target|token_name} &nbsp; --Missile 3 : *15|[[ [$Dmg3] 1d4+1 ]] vs @{target|3 Target|token_name} &nbsp; --Missile 4 : *16|[[ [$Dmg4] 1d4+1 ]] vs @{target|4 Target|token_name} &nbsp; --Missile 5 : *17|[[ [$Dmg5] 1d4+1 ]] vs @{target|5 Target|token_name} &nbsp; --Missile 6 : *18|[[ [$Dmg6] 1d4+1 ]] vs @{target|6 Target|token_name} &nbsp; --alterbar4a|_target|@{target|1 Target|token_id} _bar|1 _amount|-[^Dmg1] _show|all &nbsp; --alterbar4b|_target|@{target|2 Target|token_id} _bar|1 _amount|-[^Dmg2] _show|all &nbsp; --alterbar4c|_target|@{target|3 Target|token_id} _bar|1 _amount|-[^Dmg3] _show|all &nbsp; --alterbar4d|_target|@{target|4 Target|token_id} _bar|1 _amount|-[^Dmg4] _show|all &nbsp; --alterbar4e|_target|@{target|5 Target|token_id} _bar|1 _amount|-[^Dmg5] _show|all &nbsp; --alterbar4f|_target|@{target|6 Target|token_id} _bar|1 _amount|-[^Dmg6] _show|all&nbsp;&nbsp; &nbsp; --Charges Spent *4| 4 &nbsp; --api_modattr *4|_silent _charid @{character_id} _repeating_resource_$0_resource_right|-4 &nbsp; --?? ~ChargesOnCharacterSheet$ == 4 ?? skipTo*19|DestructionCheck &nbsp; --skipTo*20|EndOfCard &nbsp;&nbsp; &nbsp; --:5Charges| &nbsp; --?? ~ChargesOnCharacterSheet$ &lt; 5 ?? skipTo*21|NotEnoughCharges &nbsp; --Spell Cast *5| Magic Missile &nbsp; --Effect *5| You create 7 glowing darts of magical force. &nbsp; --npc_qualities_summary *5|@{selected|character_id} &nbsp; --Missile 1 : *19|[[ [$Dmg1] 1d4+1 ]] vs @{target|1 Target|token_name} &nbsp; --Missile 2 : *20|[[ [$Dmg2] 1d4+1 ]] vs @{target|2 Target|token_name} &nbsp; --Missile 3 : *21|[[ [$Dmg3] 1d4+1 ]] vs @{target|3 Target|token_name} &nbsp; --Missile 4 : *22|[[ [$Dmg4] 1d4+1 ]] vs @{target|4 Target|token_name} &nbsp; --Missile 5 : *23|[[ [$Dmg5] 1d4+1 ]] vs @{target|5 Target|token_name} &nbsp; --Missile 6 : *24|[[ [$Dmg6] 1d4+1 ]] vs @{target|6 Target|token_name} &nbsp; --Missile 7 : *25|[[ [$Dmg7] 1d4+1 ]] vs @{target|7 Target|token_name} &nbsp; --alterbar5a|_target|@{target|1 Target|token_id} _bar|1 _amount|-[^Dmg1] _show|all &nbsp; --alterbar5b|_target|@{target|2 Target|token_id} _bar|1 _amount|-[^Dmg2] _show|all &nbsp; --alterbar5c|_target|@{target|3 Target|token_id} _bar|1 _amount|-[^Dmg3] _show|all &nbsp; --alterbar5d|_target|@{target|4 Target|token_id} _bar|1 _amount|-[^Dmg4] _show|all &nbsp; --alterbar5e|_target|@{target|5 Target|token_id} _bar|1 _amount|-[^Dmg5] _show|all &nbsp; --alterbar5f|_target|@{target|6 Target|token_id} _bar|1 _amount|-[^Dmg6] _show|all &nbsp; --alterbar5g|_target|@{target|7 Target|token_id} _bar|1 _amount|-[^Dmg7] _show|all &nbsp; --Charges Spent *5| 5 &nbsp; --api_modattr *5|_silent _charid @{character_id} _repeating_resource_$0_resource_right|-5 &nbsp; --?? ~ChargesOnCharacterSheet$ == 5 ?? skipTo*22|DestructionCheck &nbsp; --skipTo*23|EndOfCard &nbsp;&nbsp; &nbsp; --:6Charges| &nbsp; --?? ~ChargesOnCharacterSheet$ &lt; 6 ?? skipTo*24|NotEnoughCharges &nbsp; --Spell Cast *6| Magic Missile &nbsp; --Effect *6| You create 8 glowing darts of magical force. &nbsp; --npc_qualities_summary *6|@{selected|character_id} &nbsp; --Missile 1 : *26|[[ [$Dmg1] 1d4+1 ]] vs @{target|1 Target|token_name} &nbsp; --Missile 2 : *27|[[ [$Dmg2] 1d4+1 ]] vs @{target|2 Target|token_name} &nbsp; --Missile 3 : *28|[[ [$Dmg3] 1d4+1 ]] vs @{target|3 Target|token_name} &nbsp; --Missile 4 : *29|[[ [$Dmg4] 1d4+1 ]] vs @{target|4 Target|token_name} &nbsp; --Missile 5 : *30|[[ [$Dmg5] 1d4+1 ]] vs @{target|5 Target|token_name} &nbsp; --Missile 6 : *31|[[ [$Dmg6] 1d4+1 ]] vs @{target|6 Target|token_name} &nbsp; --Missile 7 : *32|[[ [$Dmg7] 1d4+1 ]] vs @{target|7 Target|token_name} &nbsp; --Missile 8 : *33|[[ [$Dmg8] 1d4+1 ]] vs @{target|8 Target|token_name} &nbsp; --alterbar6a|_target|@{target|1 Target|token_id} _bar|1 _amount|-[^Dmg1] _show|all &nbsp; --alterbar6b|_target|@{target|2 Target|token_id} _bar|1 _amount|-[^Dmg2] _show|all &nbsp; --alterbar6c|_target|@{target|3 Target|token_id} _bar|1 _amount|-[^Dmg3] _show|all &nbsp; --alterbar6d|_target|@{target|4 Target|token_id} _bar|1 _amount|-[^Dmg4] _show|all &nbsp; --alterbar6e|_target|@{target|5 Target|token_id} _bar|1 _amount|-[^Dmg5] _show|all &nbsp; --alterbar6f|_target|@{target|6 Target|token_id} _bar|1 _amount|-[^Dmg6] _show|all &nbsp; --alterbar6g|_target|@{target|7 Target|token_id} _bar|1 _amount|-[^Dmg7] _show|all &nbsp; --alterbar6h|_target|@{target|8 Target|token_id} _bar|1 _amount|-[^Dmg8] _show|all&nbsp; &nbsp; --Charges Spent *6| 6 &nbsp; --api_modattr *6|_silent _charid @{character_id} _repeating_resource_$0_resource_right|-6 &nbsp; --?? ~ChargesOnCharacterSheet$ == 6 ?? skipTo*25|DestructionCheck &nbsp; --skipTo*26|EndOfCard &nbsp;&nbsp; &nbsp; &nbsp;--:7Charges| &nbsp; --?? ~ChargesOnCharacterSheet$ &lt; 7 ?? skipTo*27|NotEnoughCharges &nbsp; --Spell Cast *7| Magic Missile &nbsp; --Effect *7| You create 9 glowing darts of magical force. &nbsp; --npc_qualities_summary *7|@{selected|character_id} &nbsp; --Missile 1 : *34|[[ [$Dmg1] 1d4+1 ]] vs @{target|1 Target|token_name} &nbsp; --Missile 2 : *35|[[ [$Dmg2] 1d4+1 ]] vs @{target|2 Target|token_name} &nbsp; --Missile 3 : *36|[[ [$Dmg3] 1d4+1 ]] vs @{target|3 Target|token_name} &nbsp; --Missile 4 : *37|[[ [$Dmg4] 1d4+1 ]] vs @{target|4 Target|token_name} &nbsp; --Missile 5 : *38|[[ [$Dmg5] 1d4+1 ]] vs @{target|5 Target|token_name} &nbsp; --Missile 6 : *39|[[ [$Dmg6] 1d4+1 ]] vs @{target|6 Target|token_name} &nbsp; --Missile 7 : *40|[[ [$Dmg7] 1d4+1 ]] vs @{target|7 Target|token_name} &nbsp; --Missile 8 : *41|[[ [$Dmg8] 1d4+1 ]] vs @{target|8 Target|token_name} &nbsp; --Missile 9 : *42|[[ [$Dmg9] 1d4+1 ]] vs @{target|9 Target|token_name} &nbsp; --alterbar7a|_target|@{target|1 Target|token_id} _bar|1 _amount|-[^Dmg1] _show|all &nbsp; --alterbar7b|_target|@{target|2 Target|token_id} _bar|1 _amount|-[^Dmg2] _show|all &nbsp; --alterbar7c|_target|@{target|3 Target|token_id} _bar|1 _amount|-[^Dmg3] _show|all &nbsp; --alterbar7d|_target|@{target|4 Target|token_id} _bar|1 _amount|-[^Dmg4] _show|all &nbsp; --alterbar7e|_target|@{target|5 Target|token_id} _bar|1 _amount|-[^Dmg5] _show|all &nbsp; --alterbar7f|_target|@{target|6 Target|token_id} _bar|1 _amount|-[^Dmg6] _show|all &nbsp; --alterbar7g|_target|@{target|7 Target|token_id} _bar|1 _amount|-[^Dmg7] _show|all &nbsp; --alterbar7h|_target|@{target|8 Target|token_id} _bar|1 _amount|-[^Dmg8] _show|all &nbsp; --alterbar7i|_target|@{target|9 Target|token_id} _bar|1 _amount|-[^Dmg9] _show|all &nbsp; --Charges Spent *7| 7 &nbsp; --api_modattr *7|_silent _charid @{character_id} _repeating_resource_$0_resource_right|-7 &nbsp; --?? ~ChargesOnCharacterSheet$ == 7 ?? skipTo*28|DestructionCheck &nbsp; --skipTo*29|EndOfCard &nbsp;&nbsp; &nbsp; &nbsp;--:Recharge| &nbsp; --Recharge Formula|[[ [XPND] [$RegainedCharges] 1d6+1 + @{repeating_resource_$0_resource_right}]]&nbsp; &nbsp; --?? $RegainedCharges &gt;= 7 ?? api_setattr *5|_silent _charid @{character_id} _repeating_resource_$0_resource_right|7 &nbsp; --?? $RegainedCharges &lt; 7 ?? api_setattr *6|_silent _charid @{character_id} _repeating_resource_$0_resource_right|[^RegainedCharges] &nbsp; --Note *51|The Recharge Formula above is calculated by rolling 1d6+1, and then adding the number of charges the wand currently has (if any). The wand can hold a maximum of 7 charges. If the total number of charges exceeds 7, then the number of charges will be set to 7. &nbsp; --skipTo*30|EndOfCard &nbsp;&nbsp; &nbsp; --:NotEnoughCharges| &nbsp; --Failure|Not enough charges for this option &nbsp; --skipTo*31|EndOfCard &nbsp;&nbsp; &nbsp; --:DestructionCheck| &nbsp; --Warning|All charges used &nbsp; --Destruction Check| [[ [$Dest] 1d20]] &nbsp; --?? $Dest &gt; 1 ?? Safe|The wand is out of charges, but undamaged &nbsp; --?? $Dest == 1 ?? Destroyed|The wand crumbles into ashes and is destroyed! &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; --:EndOfCard| }}
1620251196
Kurt J.
Pro
API Scripter
David P. said: Hello,&nbsp; This seems like the best place to post my problem, so here it is. I made a powercard for a Wand of Magic Missile, based on an example by Nick Olivo (staff of frost example). It works, but not perfectly. Whatever option I choose (number of charges, so number of magic missiles), the script always ask me for 9 targets (maximum of targets for 7 charges). Is there a way to change the script so that I only have to input the exact number of target I need? Here is the card: *snip* :) Unfortunately, this isn't something that can be done with PowerCards. The problem lies with the fact that when you include a roll query anywhere in your macro, the roll20 chat server sees that and processes it before sending anything to the API. It will ask every roll query (the ?{...} notation) right up front and then turn the results (with just the response text filled in where the roll queries were) the the API. You would need to use ScriptCards (the successor to PowerCards) to do something like this, using the "--i" information request statement type. In fact, Magic Missile is one of the sample scripts for ScriptCards specifically because of the variable number of targets.
Thanks for the quick reply Kurt. I'll check out ScriptCards. Is it compatible with PowerCards? or do I get to use one or the other? I've done a lot of PowerCards script recently and I don't feel like re-doing them right now :) But I'll check out ScriptCards for use. In fact, it was your ScriptCards Deep Dive Magic Missile video was open in my browser, just haven't watch it yet. Guess I know what to do next :) Kurt J. said: David P. said: Hello,&nbsp; This seems like the best place to post my problem, so here it is. I made a powercard for a Wand of Magic Missile, based on an example by Nick Olivo (staff of frost example). It works, but not perfectly. Whatever option I choose (number of charges, so number of magic missiles), the script always ask me for 9 targets (maximum of targets for 7 charges). Is there a way to change the script so that I only have to input the exact number of target I need? Here is the card: *snip* :) Unfortunately, this isn't something that can be done with PowerCards. The problem lies with the fact that when you include a roll query anywhere in your macro, the roll20 chat server sees that and processes it before sending anything to the API. It will ask every roll query (the ?{...} notation) right up front and then turn the results (with just the response text filled in where the roll queries were) the the API. You would need to use ScriptCards (the successor to PowerCards) to do something like this, using the "--i" information request statement type. In fact, Magic Missile is one of the sample scripts for ScriptCards specifically because of the variable number of targets.
@David P. &nbsp;Scriptcard is it's own API and can do a lot more then Powercards. You can have both scripts in your game though. I use both in my game as I have been slowly converting my Powercards to Scriptcard.&nbsp;
Guess I'll do that too. I knew they were different API, but wondered if they would overlap or cause shenanigans when used together. Snow said: @David P. &nbsp;Scriptcard is it's own API and can do a lot more then Powercards. You can have both scripts in your game though. I use both in my game as I have been slowly converting my Powercards to Scriptcard.&nbsp;
Hi Everyone - probably an obvious question and answer, but I'm running Powercards with the Powercards Macro helper, called through Combatmaster but the Saves and Attributes buttons in combat don't seem to work, bringing up menus that don't allow selection of the different saves etc - instead the save box gives this option; Strength,+[[(3*(1-ceil((0)*0.00001)))+(3*0)]][STR SAVE] ]] Ability checks give; Acrobatics,+[[(11*(1-ceil((0)*0.00001)))+(5*0)]][ACRO] ]] I've not modified these Macros, so anyone have an idea what I'm doing wrong?
Hey is there a way to have a part of the powercard to whisper only to the GM and the other part to the player. I have solved this sometimes by having two powercards in the same macro but Since I need variables and conditionals from the first is not working.
Hello, I have a powercard I am using for a creature that has multiple attacks. Amazingly enough that part is working. At the end of the output, I want to include text from a rollable table (basically a list of insults to my PC's from this creature). How can I get a powercard to roll from a rollable table and present the result in a card? Thanks in advance, I feel like this is a very stupid question.
1620746230
timmaugh
Pro
API Scripter
@Alexander Mann - Tough to tell from your description, but I think you're running up against the order of operations for Roll20, where those inline rolls aren't being spotted by the Roll20 parsers because of when they are returned to the command line. I'm not sure if PowerCards can correct that natively, but the Meta-Toolbox can probably help. For instance, ZeroFrame (the main engine of driving the toolbox) does recursion of inline rolls, and there are ways to "hide" them from the command line until you are ready for them to be included, discovered, and parsed. Here is an example of a similar application to give you a flavor. If you want more specific help, post back. @Dave - Not sure if PowerCards can run an external macro (I think it can), but if so you might look into DiscreteWhisper . You can send differentiated whispers out of the same command. Not sure about sending the powercard output through, but it would be interesting to try. At least you could send pieces of information through. @Chris M. - If PowerCards doesn't unpack an inline roll against a table natively, inline for you, then you can use the ZeroFrame metascript and post-pend your inline roll against the table with .value . That will extract the roll total (for a dice based roll) or text (for a table return). Do that right in your PowerCards macro: [[ 1t[Insults] ]].value If there are other inline rolls (or syntax constructions recognized by any of the meta scripts you have installed), ZeroFrame will also expand those and make sure they are caught, too.