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)

1526349406

Edited 1526354882
Kurt J. said: Anthony V. said: Anyone else having this problem with the PC Action list? This seems to happen on repeating items if the order of the items gets rearranges at ANY time. Once the items have been rearranged, they get permanently messed up (if you check your API log, there will be a misspelled error from the UI about finding an existing order). This is a bug in Roll20 itself. I've been trying to find a way around the problem, but haven't gotten anything pinned down yet. Hmm so how does the monster action list/spell list function properly? And is there a way to reset it once you re arrange the order? Sorry for the questions 
1526423022

Edited 1526425677
Kurt J.
Pro
API Scripter
Anthony V. said: Kurt J. said: Anthony V. said: Anyone else having this problem with the PC Action list? This seems to happen on repeating items if the order of the items gets rearranges at ANY time. Once the items have been rearranged, they get permanently messed up (if you check your API log, there will be a misspelled error from the UI about finding an existing order). This is a bug in Roll20 itself. I've been trying to find a way around the problem, but haven't gotten anything pinned down yet. Hmm so how does the monster action list/spell list function properly? And is there a way to reset it once you re arrange the order? Sorry for the questions  It is specific to each individual character sheet... A "freshly created" sheet won't display the error, but the first time a repeating list is rearranged, the bug happens and as far as I can tell there is no way to undo it. EDIT: I found a way around this, which bypasses the problem completely. It is now up on the development gist as version 3.7.5
1526423343

Edited 1526423440
Kurt J.
Pro
API Scripter
Ben L. said: I'm creating a character stats readout using PowerCards for the  DnD5e Character Sheet , and I'm trying to use some logic to determine whether to display magic info or not. Here's the script (with most irrelevant code removed): Maybe I'm missing something, but shouldn't this logic be giving me $Spellcaster = 1 where the character's sorcerer_level=1 ? This is simple logic: If the character doesn't have levels in any of the magic-using classes, the $SpellCaster value should be set to 0. Yet it's clearly not doing that when it should be. I believe the issue is 0d0.. a roll has to have at least 1 die, so 1d0 will work, but 0d0 (or 0dAnything) won't. However, there is a much easier way to do what you are trying to do: ?? ${selected|spell_slots_l1_max} > 0 ?? Spellcaster|Yep, this is a spellcaster! Because only a spellcaster will have level 1 spell slots (spell_slots_l1_max is the attribute for that character sheet that contains the max number of slots the character has for 1st level spells).
1526425515
Kurt J.
Pro
API Scripter
Version 3.7.5 is on the development gist. After some blatant copy/paste from Jacob's answer in this thread ( <a href="https://app.roll20.net/forum/post/5781755/using-ge" rel="nofollow">https://app.roll20.net/forum/post/5781755/using-ge</a>... ), I've got a workaround for the action lists on sheets that have been reordered. Sheets that have had their repeating lists reordered should no longer show buttons out of order for their action lists.
Kurt J. said: Ben L. said: I'm creating a character stats readout using PowerCards for the&nbsp; DnD5e Character Sheet , and I'm trying to use some logic to determine whether to display magic info or not. Here's the script (with most irrelevant code removed): Maybe I'm missing something, but shouldn't this logic be giving me $Spellcaster = 1 where the character's sorcerer_level=1 ? This is simple logic: If the character doesn't have levels in any of the magic-using classes, the $SpellCaster value should be set to 0. Yet it's clearly not doing that when it should be. I believe the issue is 0d0.. a roll has to have at least 1 die, so 1d0 will work, but 0d0 (or 0dAnything) won't. However, there is a much easier way to do what you are trying to do: ?? ${selected|spell_slots_l1_max} &gt; 0 ?? Spellcaster|Yep, this is a spellcaster! Because only a spellcaster will have level 1 spell slots (spell_slots_l1_max is the attribute for that character sheet that contains the max number of slots the character has for 1st level spells). You're a genius! I think I thought about that at one point but don't remember why I abandoned it. As for the 0d0, I've used it elsewhere with no apparent problems but I'll double check those scripts. Thanks!
1526479275
Good morning, wow, I haven't played in a long time. I used v2 for my games a few years ago, but now we're way beyond that. I'm looking for a list of possible tags for the power cards. The wiki at&nbsp; <a href="https://wiki.roll20.net/Script:PowerCards" rel="nofollow">https://wiki.roll20.net/Script:PowerCards</a> doesn't have the list. I can't seem to find them. My google-fu as failed too.
1526496199
Kurt J.
Pro
API Scripter
Dallas Wilke said: Good morning, wow, I haven't played in a long time. I used v2 for my games a few years ago, but now we're way beyond that. I'm looking for a list of possible tags for the power cards. The wiki at&nbsp; <a href="https://wiki.roll20.net/Script:PowerCards" rel="nofollow">https://wiki.roll20.net/Script:PowerCards</a> doesn't have the list. I can't seem to find them. My google-fu as failed too. The Wiki has the list of all of the tags with special meanings/functions. Anything else is a tag you make up.
I'm running into an error that I can't seem to fix: I keep finding conditional that work separately but when they're included with each other on separate lines the script only seems to acknowledge the first one. Do you know what might be causing this? Here's an example: !power {{ --?? @{GM|Dodge Check} &lt;= @{GM|Accuracy Check} AND @{GM|Parry} &lt; @{GM|Damage Check} AND @{GM|Target Stun} == 1 ?? Stun:| @{Dave|Name} is stunned! --?? @{GM|Dodge Check} &lt;= @{GM|Accuracy Check} AND @{GM|Parry} &lt; @{GM|Damage Check} ?? Hit:| @{Dave|Name}’s attack is successful! }} Each line works on its own but not together. Thanks!
Hi guys, I wonder if i can get a hand on a macro I want to do but cannot find how would be the easiest way. So what i want to do is be able to do multiple attacks on the same targets, but instead of clicking the target (x) times just have a prompt query where i can just write the number of attacks i want to do. Could i get some help on how the logical build would be?&nbsp; This is the macro I am using atm !power {{ --whisper|GM --titlefontshadow|none --titlefont|Georgia --titlefontsize| 20px --orowbg|#D87E7E --erowbg|#DA3C3C --corners|10 --format|Attack --name| Crude Weapons --rightsub|Balanced, Tearing --leftsub|Melee --tokenid|@{selected|Token_Id} --targettokenid|@{target|token_id} --emote| **@{selected|character_name}** Attacks **@{target|character_name}** --?? $ARoll.base &lt;= $Target ?? Damage|[[ [$Dmg1] 2d10kh1 + [[ ([[floor(@{selected|Strength}/10)]]&nbsp;+[[floor(@{selected|advanceS}/10)]]) ]] ]] ~R **Pen** 0 ~R --Degrees| ~R [[ round(([[@{Selected|WeaponSkill}+?{Modifier|0}+@{Selected|advanceWS}]] - [$ARoll] 1d100) / 10) ]] ~R --?? $ARoll.base &lt;= $Target ?? Horde Damage| [[1d10]] [[1d10]] --hroll| [[ [$Target] @{Selected|WeaponSkill}+?{Modifier|0}+@{Selected|advanceWS} + 0d0 ]]&nbsp; --?? $ARoll.base &gt; $Target ?? Outcome|~R //Miss// ~R --?? $ARoll.base &lt;= $Target AND $ARoll.base &lt;= 10 ?? Outcome|~R //Hit Head// ~R --?? $ARoll.base &lt;= $Target AND $ARoll.base &gt;= 11 AND $ARoll.base &lt;= 20 ?? Outcome|~R //Hit Right Arm// ~R --?? $ARoll.base &lt;= $Target AND $ARoll.base &gt;= 21 AND $ARoll.base &lt;= 30 ?? Outcome|~R //Hit Left Arm// ~R --?? $ARoll.base &lt;= $Target AND $ARoll.base &gt;= 31 AND $ARoll.base &lt;= 70 ?? Outcome|~R //Hit Body// ~R --?? $ARoll.base &lt;= $Target AND $ARoll.base &gt;= 71 AND $ARoll.base &lt;= 85 ?? Outcome|~R //Hit Right Leg// ~R --?? $ARoll.base &lt;= $Target AND $ARoll.base &gt;= 86 ?? Outcome|~R //Hit Left Leg// ~R --?? $Dmg1.base == 10 AND $ARoll.base &lt;= $Target ?? Righteous Fury|~R + [[1d10]] If WS succeed ~R --?? $ARoll.base &lt;= $Target ?? soundfx1|_play|Knife Hit --?? $ARoll.base &gt; $Target ?? soundfx2|_play|Knife Miss }} Any help would be super appreciate it as i am hammering my head but I cannot find an easy way. The idea I have is to make a drop query, but that would mean i would need to make all this for each attack, wich it would not be faster than clicking a couple of times.
1526738379
Kurt J.
Pro
API Scripter
Danny C. said: Hi guys, I wonder if i can get a hand on a macro I want to do but cannot find how would be the easiest way. So what i want to do is be able to do multiple attacks on the same targets, but instead of clicking the target (x) times just have a prompt query where i can just write the number of attacks i want to do. Could i get some help on how the logical build would be?&nbsp; This is the macro I am using atm !power {{ --whisper|GM --titlefontshadow|none --titlefont|Georgia --titlefontsize| 20px --orowbg|#D87E7E --erowbg|#DA3C3C --corners|10 --format|Attack --name| Crude Weapons --rightsub|Balanced, Tearing --leftsub|Melee --tokenid|@{selected|Token_Id} --targettokenid|@{target|token_id} --emote| **@{selected|character_name}** Attacks **@{target|character_name}** --?? $ARoll.base &lt;= $Target ?? Damage|[[ [$Dmg1] 2d10kh1 + [[ ([[floor(@{selected|Strength}/10)]]&nbsp;+[[floor(@{selected|advanceS}/10)]]) ]] ]] ~R **Pen** 0 ~R --Degrees| ~R [[ round(([[@{Selected|WeaponSkill}+?{Modifier|0}+@{Selected|advanceWS}]] - [$ARoll] 1d100) / 10) ]] ~R --?? $ARoll.base &lt;= $Target ?? Horde Damage| [[1d10]] [[1d10]] --hroll| [[ [$Target] @{Selected|WeaponSkill}+?{Modifier|0}+@{Selected|advanceWS} + 0d0 ]]&nbsp; --?? $ARoll.base &gt; $Target ?? Outcome|~R //Miss// ~R --?? $ARoll.base &lt;= $Target AND $ARoll.base &lt;= 10 ?? Outcome|~R //Hit Head// ~R --?? $ARoll.base &lt;= $Target AND $ARoll.base &gt;= 11 AND $ARoll.base &lt;= 20 ?? Outcome|~R //Hit Right Arm// ~R --?? $ARoll.base &lt;= $Target AND $ARoll.base &gt;= 21 AND $ARoll.base &lt;= 30 ?? Outcome|~R //Hit Left Arm// ~R --?? $ARoll.base &lt;= $Target AND $ARoll.base &gt;= 31 AND $ARoll.base &lt;= 70 ?? Outcome|~R //Hit Body// ~R --?? $ARoll.base &lt;= $Target AND $ARoll.base &gt;= 71 AND $ARoll.base &lt;= 85 ?? Outcome|~R //Hit Right Leg// ~R --?? $ARoll.base &lt;= $Target AND $ARoll.base &gt;= 86 ?? Outcome|~R //Hit Left Leg// ~R --?? $Dmg1.base == 10 AND $ARoll.base &lt;= $Target ?? Righteous Fury|~R + [[1d10]] If WS succeed ~R --?? $ARoll.base &lt;= $Target ?? soundfx1|_play|Knife Hit --?? $ARoll.base &gt; $Target ?? soundfx2|_play|Knife Miss }} Any help would be super appreciate it as i am hammering my head but I cannot find an easy way. The idea I have is to make a drop query, but that would mean i would need to make all this for each attack, wich it would not be faster than clicking a couple of times. Well, if I was going to build potential multiple attacks in to a card, I would do something like the card below. This is my "best guess" at something similar to what you are looking for without system-specifics. It asks right off the bat the number of attacks to perform and stores this in a Roll ID (And thanks to Ben L. above, I know that 0d0 works just fine :)) After that, it is a matter of determining what to do. This card will handle from 0 to 9 attacks. If you enter a number higher than 9, it will only perform 9 of them, but you could just add more lines if needed. One thing I noticed about your macro above is that you have the Outcome tag repeated several times. Even if only one of these lines would ever actually be displayed because of conditionals, the tags still need to be unique to prevent problems (Outcome*1, Outcome*2, etc). !power {{ &nbsp; --name|Testing &nbsp; --Number of Attacks:|[[ [$AtkCount] ?{Attacks|1} + 0d0 ]] &nbsp; --hroll|[[ [$defense] 1d20 ]] &nbsp; --?? $AtkCount &gt;= 1 ?? Attack 1|Attack roll of [[ [$A1] 1d20 ]] vs [^defense] &nbsp; --?? $AtkCount &gt;= 1 AND $A1 &gt;= $defense ?? Hit 1|Hit for [[ 1d6 ]] damage! &nbsp; --?? $AtkCount &gt;= 1 AND $A1 &lt; $defense ?? Miss 1|Attack roll missed! &nbsp; --?? $AtkCount &gt;= 2 ?? Attack 2|Attack roll of [[ [$A2] 1d20 ]] vs [^defense] &nbsp; --?? $AtkCount &gt;= 2 AND $A2 &gt;= $defense ?? Hit 2|Hit for [[ 1d6 ]] damage! &nbsp; --?? $AtkCount &gt;= 2 AND $A2 &lt; $defense ?? Miss 2|Attack roll missed! &nbsp; --?? $AtkCount &gt;= 3 ?? Attack 3|Attack roll of [[ [$A3] 1d20 ]] vs [^defense] &nbsp; --?? $AtkCount &gt;= 3 AND $A3 &gt;= $defense ?? Hit 3|Hit for [[ 1d6 ]] damage! &nbsp; --?? $AtkCount &gt;= 3 AND $A3 &lt; $defense ?? Miss 3|Attack roll missed! &nbsp; --?? $AtkCount &gt;= 4 ?? Attack 4|Attack roll of [[ [$A4] 1d20 ]] vs [^defense] &nbsp; --?? $AtkCount &gt;= 4 AND $A4 &gt;= $defense ?? Hit 4|Hit for [[ 1d6 ]] damage! &nbsp; --?? $AtkCount &gt;= 4 AND $A4 &lt; $defense ?? Miss 4|Attack roll missed! &nbsp; --?? $AtkCount &gt;= 5 ?? Attack 5|Attack roll of [[ [$A5] 1d20 ]] vs [^defense] &nbsp; --?? $AtkCount &gt;= 5 AND $A5 &gt;= $defense ?? Hit 5|Hit for [[ 1d6 ]] damage! &nbsp; --?? $AtkCount &gt;= 5 AND $A5 &lt; $defense ?? Miss 5|Attack roll missed! &nbsp; --?? $AtkCount &gt;= 6 ?? Attack 6|Attack roll of [[ [$A6] 1d20 ]] vs [^defense] &nbsp; --?? $AtkCount &gt;= 6 AND $A6 &gt;= $defense ?? Hit 6|Hit for [[ 1d6 ]] damage! &nbsp; --?? $AtkCount &gt;= 6 AND $A6 &lt; $defense ?? Miss 6|Attack roll missed! &nbsp; --?? $AtkCount &gt;= 7 ?? Attack 7|Attack roll of [[ [$A7] 1d20 ]] vs [^defense] &nbsp; --?? $AtkCount &gt;= 7 AND $A7 &gt;= $defense ?? Hit 7|Hit for [[ 1d6 ]] damage! &nbsp; --?? $AtkCount &gt;= 7 AND $A7 &lt; $defense ?? Miss 7|Attack roll missed! &nbsp; --?? $AtkCount &gt;= 8 ?? Attack 8|Attack roll of [[ [$A8] 1d20 ]] vs [^defense] &nbsp; --?? $AtkCount &gt;= 8 AND $A8 &gt;= $defense ?? Hit 8|Hit for [[ 1d6 ]] damage! &nbsp; --?? $AtkCount &gt;= 8 AND $A8 &lt; $defense ?? Miss 8|Attack roll missed! &nbsp; --?? $AtkCount &gt;= 9 ?? Attack 9|Attack roll of [[ [$A9] 1d20 ]] vs [^defense] &nbsp; --?? $AtkCount &gt;= 9 AND $A9 &gt;= $defense ?? Hit 9|Hit for [[ 1d6 ]] damage! &nbsp; --?? $AtkCount &gt;= 9 AND $A9 &lt; $defense ?? Miss 9|Attack roll missed! }}
1526739535
Kurt J.
Pro
API Scripter
Dave Rake said: I'm running into an error that I can't seem to fix: I keep finding conditional that work separately but when they're included with each other on separate lines the script only seems to acknowledge the first one. Do you know what might be causing this? Here's an example: !power {{ --?? @{GM|Dodge Check} &lt;= @{GM|Accuracy Check} AND @{GM|Parry} &lt; @{GM|Damage Check} AND @{GM|Target Stun} == 1 ?? Stun:| @{Dave|Name} is stunned! --?? @{GM|Dodge Check} &lt;= @{GM|Accuracy Check} AND @{GM|Parry} &lt; @{GM|Damage Check} ?? Hit:| @{Dave|Name}’s attack is successful! }} Each line works on its own but not together. Thanks! I'm not familiar with the system you might be using, but it would largely depend on what is being substituted for your character specifiers. Any @{character|attribute} replacements happen in the chat system before things get passed to PowerCards, so in the end these conditionals will end up checking against static values, like this: !power {{ --?? 5 &lt;= 6 AND 3 &lt; 7 AND 1 == 1 ?? Stun:| Dave is stunned! --?? 4 &lt;= 7 AND 2 &lt; 8 ?? Hit:| Dave’s attack is successful! }} Which works fine if things like @{DM|Dodge Check} is a static value. If it is a dice rolls specifier, though, you'll need to do these as rolls first because the conditional lines won't process them as rolls, and you'll end up with something more like: !power {{ --?? 1d20+1 &lt;= 1d20+10 AND 1d20+2 &lt; 1d20+4 AND 1 == 1 ?? Stun:| Dave is stunned! --?? 1d20 &lt;= 1d20+5 AND 1d20 &lt; 1d20+8 ?? Hit:| Dave’s attack is successful! }} Which might look ok, but the comparisons are not going to function properly. No dice will be rolled and the &lt;= will just be evaluating the strings and not their outcome values. Finally, even if the dice were evaluated the values for Dodge Check, Accuracy Check, Parry, and Damage Check would likely be different between lines. Something like the following would be the approach to take: !power {{ --name|Testing --hroll| [[ [$Dodge] @{GM|Dodge Check} ]] [[ [$Accuracy] @{GM|Accuracy Check} ]] [[ [$Damage] @{GM|Damage Check} ]] [[ [$Parry] @{GM|Parry} ]] --?? $Dodge &lt;= $Accuracy AND $Parry &lt; $Damage AND @{GM|Target Stun} == 1 ?? Stun:| Dave is stunned! --?? $Dodge &lt;= $Accuracy AND $Parry &lt; $Damage ?? Hit:| Dave’s attack is successful! }} All of the rolls are then done and stored in Roll IDs which can then be used to compare for conditionals. $Dodge, $Accuracy, etc would be the same value for each conditional line. Again, this assumes that the value of @{GM|Dodge Check} is something like "1d20+5", etc. In the case of @{GM|Target Stun} it looks like this is just a static value of 1 or 0. If that isn't the case, it could be added to the hroll line.
trying to use legendary actions for a demilich i dragged into my campaign and getting this error.
1527014766
Kurt J.
Pro
API Scripter
Anthony V. said: trying to use legendary actions for a demilich i dragged into my campaign and getting this error. There is a typo on line 277 of 3.7.5. There is a $ after repeating_npcaction-l_ which should not be there. I've fixed it in the dev gist, though I haven't bumped the version number for this change.
Kurt J. said: Anthony V. said: trying to use legendary actions for a demilich i dragged into my campaign and getting this error. There is a typo on line 277 of 3.7.5. There is a $ after repeating_npcaction-l_ which should not be there. I've fixed it in the dev gist, though I haven't bumped the version number for this change. That worked thank you!
I was wondering if there was anyway to attach a sound to a paticular action for instance whenever a fireball spell is cast it would trigger the Roll20AM script to play a fireball spell or something to that effect. Right now I do it all by macros by hand.
1527034829
Kurt J.
Pro
API Scripter
Anthony V. said: I was wondering if there was anyway to attach a sound to a paticular action for instance whenever a fireball spell is cast it would trigger the Roll20AM script to play a fireball spell or something to that effect. Right now I do it all by macros by hand. Well, not with Power Cards. At least not directly. You could create a card for fireball and substitute the button that gets generated with a reference to the macro for the card. The current version supports that for NPC actions but not yet for PC actions. That wouldn't cover cases where someone just clicked it from their character sheet though. That would be an API script of its own, assuming it is even possible with the API.
talking about power cards and Roll20AM, is it possible to use other commands then just _play?, can i also have like delay or other roll20AM commands on the&nbsp;--soundfx tag?
1527119201
Kurt J.
Pro
API Scripter
Danny C. said: talking about power cards and Roll20AM, is it possible to use other commands then just _play?, can i also have like delay or other roll20AM commands on the&nbsp;--soundfx tag? The full range of commands for Roll20AM should be available. The _ character is replaced with -- when the API command is passed (since -- would tell PowerCards to start a new tag).
Hi everyone, I'm back. I am working on a new attack macro for a new character on D&D5. And I can not find the solution. he has the possibility to add +2 or not to its attack, but there is a conflict with the avatange and the disadvantage. I want the +0 or +2 of the "Escrime" line to be added to the attack line. !power {{ --tokenid|@{selected|token_id} --emote|**@{selected|token_name}** tente d’estoquer @{target|character_name} --target_list|@{target|token_id} --name|Rapière --leftsub|Action --rightsub|Cac 1,5m --Escrime :| ?{Escrimeur (Action bonus)|Non, Non 0|Oui, Oui 2 [$Esc] } --Attaque :|[[ [$Atk] ?{Advantage?| Normal, 1d20 + [^Esc] + [[@{selected|dexterity_mod}]] [DEX] + [[@{selected|pb}]] [PROF]] | Advantage, 2d20kh1 + [^Esc] + [[@{selected|dexterity_mod}]] [DEX] + [[@{selected|pb}]] [PROF]] | Disadvantage, 2d20kl1 + [^Esc] + [[@{selected|dexterity_mod}]] [DEX] + [[@{selected|pb}]] [PROF]]} ]] vs AC --?? $Atk.base == 1 ?? !Cmiss:|**Echec Critique**. --?? $Atk.base == 1 ?? soundfx|_play|Cmiss --?? $Atk.base &gt;= 2 AND $Atk.total &lt; @{target|AC} ?? !Miss:|Echec. --?? $Atk.base &gt;= 2 AND $Atk.total &lt; @{target|AC} ?? soundfx|_play|miss --?? $Atk &gt;= @{target||ac} ?? soundfx|_play|Stab --?? $Atk.total &gt;= @{target||ac} AND $Atk.base &lt;&gt; 1 AND $Atk.base &lt;&gt; 20 ?? Dégâts :|[[ [$Dmg] 1d8 + @{selected|dexterity_mod}]] Dommage Perforant --?? $Atk &gt;= @{target||ac} AND $Atk.base &lt;&gt; 20 ?? alterbar1|_target|@{target||token_id} _bar|1 _amount|-[^Dmg] _show|all --?? $Atk.base == 20 ?? Coup critique :|[[ [$CritDmg] 2d8 +@{selected|dexterity_mod} ]] Dommage Perforant --?? $Atk.base == 20 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-[^CritDmg] _show|all --?? $Atk &gt;= @{target|AC} ?? vfx_opt|@{target|token_id} glow-blood }} See the results :&nbsp; I don't undestand why it dosen't work. I've try multiples solutions.The first idea its to put the "escrime" bonus in the "Attaque" tag, but it seem query in a query dosen't work.
1527201242

Edited 1527202255
Kurt J.
Pro
API Scripter
Ziterman S. said: Hi everyone, I'm back. I am working on a new attack macro for a new character on D&D5. And I can not find the solution. he has the possibility to add +2 or not to its attack, but there is a conflict with the avatange and the disadvantage. I want the +0 or +2 of the "Escrime" line to be added to the attack line. !power {{ --tokenid|@{selected|token_id} --emote|**@{selected|token_name}** tente d’estoquer @{target|character_name} --target_list|@{target|token_id} --name|Rapière --leftsub|Action --rightsub|Cac 1,5m --Escrime :| ?{Escrimeur (Action bonus)|Non, Non 0|Oui, Oui 2 [$Esc] } --Attaque :|[[ [$Atk] ?{Advantage?| Normal, 1d20 + [^Esc] + [[@{selected|dexterity_mod}]] [DEX] + [[@{selected|pb}]] [PROF]] | Advantage, 2d20kh1 + [^Esc] + [[@{selected|dexterity_mod}]] [DEX] + [[@{selected|pb}]] [PROF]] | Disadvantage, 2d20kl1 + [^Esc] + [[@{selected|dexterity_mod}]] [DEX] + [[@{selected|pb}]] [PROF]]} ]] vs AC --?? $Atk.base == 1 ?? !Cmiss:|**Echec Critique**. --?? $Atk.base == 1 ?? soundfx|_play|Cmiss --?? $Atk.base &gt;= 2 AND $Atk.total &lt; @{target|AC} ?? !Miss:|Echec. --?? $Atk.base &gt;= 2 AND $Atk.total &lt; @{target|AC} ?? soundfx|_play|miss --?? $Atk &gt;= @{target||ac} ?? soundfx|_play|Stab --?? $Atk.total &gt;= @{target||ac} AND $Atk.base &lt;&gt; 1 AND $Atk.base &lt;&gt; 20 ?? Dégâts :|[[ [$Dmg] 1d8 + @{selected|dexterity_mod}]] Dommage Perforant --?? $Atk &gt;= @{target||ac} AND $Atk.base &lt;&gt; 20 ?? alterbar1|_target|@{target||token_id} _bar|1 _amount|-[^Dmg] _show|all --?? $Atk.base == 20 ?? Coup critique :|[[ [$CritDmg] 2d8 +@{selected|dexterity_mod} ]] Dommage Perforant --?? $Atk.base == 20 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-[^CritDmg] _show|all --?? $Atk &gt;= @{target|AC} ?? vfx_opt|@{target|token_id} glow-blood }} See the results :&nbsp; I don't undestand why it dosen't work. I've try multiples solutions.The first idea its to put the "escrime" bonus in the "Attaque" tag, but it seem query in a query dosen't work. Roll IDs (like [^Esc] above) can't be used like variables, however, you can simplify your roll to achieve the same effect like this (remove the --Escrime tag completely): --Attaque :|[[ [$Atk] ?{Advantage?| Normal, 1d20 | Advantage, 2d20kh1 | Disadvantage, 2d20kl1} + ?{Escrimeur (Action bonus)|Non, 0 | Oui, 2 } [ESC] + @{selected|dexterity_mod} [DEX] + @{selected|pb} [PROF] ]] vs AC You will first be prompted for advantage, then for the action bonus. Because the roll queries will return their selected components, (1d20, 2d20kh1, 2d20kl1) that can be the end of the query and a new one can be started to get the action bonus. Another advantage is that you don't have to duplicate the Dex and Prof Bonus portions of the roll.
Kurt J. said: Ziterman S. said: Hi everyone, I'm back. I am working on a new attack macro for a new character on D&D5. And I can not find the solution. he has the possibility to add +2 or not to its attack, but there is a conflict with the avatange and the disadvantage. I want the +0 or +2 of the "Escrime" line to be added to the attack line. !power {{ --tokenid|@{selected|token_id} --emote|**@{selected|token_name}** tente d’estoquer @{target|character_name} --target_list|@{target|token_id} --name|Rapière --leftsub|Action --rightsub|Cac 1,5m --Escrime :| ?{Escrimeur (Action bonus)|Non, Non 0|Oui, Oui 2 [$Esc] } --Attaque :|[[ [$Atk] ?{Advantage?| Normal, 1d20 + [^Esc] + [[@{selected|dexterity_mod}]] [DEX] + [[@{selected|pb}]] [PROF]] | Advantage, 2d20kh1 + [^Esc] + [[@{selected|dexterity_mod}]] [DEX] + [[@{selected|pb}]] [PROF]] | Disadvantage, 2d20kl1 + [^Esc] + [[@{selected|dexterity_mod}]] [DEX] + [[@{selected|pb}]] [PROF]]} ]] vs AC --?? $Atk.base == 1 ?? !Cmiss:|**Echec Critique**. --?? $Atk.base == 1 ?? soundfx|_play|Cmiss --?? $Atk.base &gt;= 2 AND $Atk.total &lt; @{target|AC} ?? !Miss:|Echec. --?? $Atk.base &gt;= 2 AND $Atk.total &lt; @{target|AC} ?? soundfx|_play|miss --?? $Atk &gt;= @{target||ac} ?? soundfx|_play|Stab --?? $Atk.total &gt;= @{target||ac} AND $Atk.base &lt;&gt; 1 AND $Atk.base &lt;&gt; 20 ?? Dégâts :|[[ [$Dmg] 1d8 + @{selected|dexterity_mod}]] Dommage Perforant --?? $Atk &gt;= @{target||ac} AND $Atk.base &lt;&gt; 20 ?? alterbar1|_target|@{target||token_id} _bar|1 _amount|-[^Dmg] _show|all --?? $Atk.base == 20 ?? Coup critique :|[[ [$CritDmg] 2d8 +@{selected|dexterity_mod} ]] Dommage Perforant --?? $Atk.base == 20 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-[^CritDmg] _show|all --?? $Atk &gt;= @{target|AC} ?? vfx_opt|@{target|token_id} glow-blood }} See the results :&nbsp; I don't undestand why it dosen't work. I've try multiples solutions.The first idea its to put the "escrime" bonus in the "Attaque" tag, but it seem query in a query dosen't work. Roll IDs (like [^Esc] above) can't be used like variables, however, you can simplify your roll to achieve the same effect like this (remove the --Escrime tag completely): --Attaque :|[[ [$Atk] ?{Advantage?| Normal, 1d20 | Advantage, 2d20kh1 | Disadvantage, 2d20kl1} + ?{Escrimeur (Action bonus)|Non, 0 | Oui, 2 } [ESC] + @{selected|dexterity_mod} [DEX] + @{selected|pb} [PROF] ]] vs AC You will first be prompted for advantage, then for the action bonus. Because the roll queries will return their selected components, (1d20, 2d20kh1, 2d20kl1) that can be the end of the query and a new one can be started to get the action bonus. Another advantage is that you don't have to duplicate the Dex and Prof Bonus portions of the roll. Ohhh Kurt you save my life, this line is so simple. Thanks you.
I don't know if this is an obvious thing and I have just read over it or not, but is there a way to change the size of the text in the emote?
1527338105
Kurt J.
Pro
API Scripter
Caleb said: I don't know if this is an obvious thing and I have just read over it or not, but is there a way to change the size of the text in the emote? Yes, though currently it only works if you have specified either a character id or token id to display an avatar. Then you would use the --emotefont tag to set the font: !power {{ --name|Testing --tokenid|@{selected|token_id} --emotefont|font-family: "Script"; font-weight: bold; font-size:22pt; --emote|Fred attacks George }} There isn't really a reason it has to be this way (requiring a token) so I'll look at updating this for version 3.7.6 so --emotefont is taken into consideration when a token/charid isn't specified.
Hi, i have a complex macro to made. I don't know if it possible. But, my Cleric want to use Prayer of healing spell. Up to six creatures of your choice that you can see within range each regain hit points equal to 2d8 + your spellcasting ability modifier. This spell has no effect on undead or constructs. I've try to made a macro, it's ok for multiple target, but i want to alterbar of this multiple targets, with the same roll. At this time, i'm stuck. !power {{ --emote| @{selected|token_name} psalmodie une prière à l’attention de Kelemvor --tokenid|@{selected|token_id} --name|Prière de soins --leftsub|Action --rightsub|9m --Niveau de sort :| Niveau 2 --Ecole :| Evocation --Incantation :| 1 Action --Résultats:| --target_list|@{target|1st|token_id} | @{target|2nd|token_id} | @{target|3rd|token_id} | @{target|4th|token_id} | @{target|5th|token_id} | @{target|6th|token_id} --Guérison#?{nombre de patients|4}|[[ [$eal] 2d8 + @{selected|wisdom_mod}]] points de vie pour %%token_name%% --soundfx|_play|spell2 --alterbar1|_target|1st[|@{target|1st|token_id} _bar|1 _amount|+[^eal] --alterbar2|_target|2nd[|@{target|2nd|token_id} _bar|1 _amount|+[^eal] --alterbar3|_target|3rd[|@{target|3rd|token_id} _bar|1 _amount|+[^eal] --alterbar4|_target|4th[|@{target|4th|token_id} _bar|1 _amount|+[^eal] --alterbar5|_target|5th[|@{target|5th|token_id} _bar|1 _amount|+[^eal] --alterbar6|_target|6th[|@{target|6th|token_id} _bar|1 _amount|+[^eal] --Description:|Vous canalisez l’énergie divine du Maître du Palais de Cristal afin de soigner votre groupe. }} Result :&nbsp;
1527722910

Edited 1527722933
Having an issue with this power card script: !power {{ --name|Attack --title|[[ [$Def] ?{Defense, KAC (1), EAC (2)|1} + 0d0 ]] --erowtx|#FFFFFF --erowbg|#081722 --orowtx|#FFFFFF --orowbg|#013133 --corners|10 --bgcolor|#000000 --border|3px solid #081722 --?? $Def == 1 ?? Attack:| [[ [$Atk] 1d20 + ?{Attack Mod|0} ]] vs **KAC** [[@{target|kac}]] --?? $Def == 2 ?? Attack:| [[ [$Atk] 1d20 + ?{Attack Mod|0} ]] vs **EAC** [[@{target|eac}]] --?? $Def == 1 AND $Atk.total &lt; @{target|kac} ?? Miss| Attack Missed @{target|character_name} --?? $Def == 2 AND $Atk.total &lt; @{target|eac} ?? Miss| Attack Missed @{target|character_name} --?? $Def == 1 AND $Atk.total &gt;= @{target|kac} AND $Atk.base &lt;&gt; 20 ?? Hit| Attack Hit @{target|character_name} --?? $Def == 2 AND $Atk.total &gt;= @{target|eac} AND $Atk.base &lt;&gt; 20 ?? Hit| Attack Hit @{target|character_name} --?? $Def == 1 AND $Atk.total &gt;= @{target|kac} AND $Atk.base == 20 ?? Critical Hit| Attack Critically Hit @{target|character_name} --?? $Def == 2 AND $Atk.total &gt;= @{target|eac} AND $Atk.base == 20 ?? Critical Hit| Attack Critically Hit @{target|character_name} --?? $Def == 1 AND $Atk.total &lt; @{target|kac} AND $Atk.base == 20 ?? Hit| Attack Hit @{target|character_name} --?? $Def == 2 AND $Atk.total &lt; @{target|eac} AND $Atk.base == 20 ?? Hit| Attack Hit @{target|character_name} }} Using the Starfinder HUD character sheet Long story short, what it's supposed to do is allow you to target a player's token, select which AC you'd like to target ( [$Def] ), give it the bonus that the enemy has to-hit ( ?{Attack Mod|0} ), and from there it compares the total attack bonus to the selected defense. The issue is that it's rather inconsistent with how it reports the results (this was actually among the longest streaks of correctness that we've seen):
1527723981
Kurt J.
Pro
API Scripter
Patrick U. said: Having an issue with this power card script: !power {{ --name|Attack --title|[[ [$Def] ?{Defense, KAC (1), EAC (2)|1} + 0d0 ]] --erowtx|#FFFFFF --erowbg|#081722 --orowtx|#FFFFFF --orowbg|#013133 --corners|10 --bgcolor|#000000 --border|3px solid #081722 --?? $Def == 1 ?? Attack:| [[ [$Atk] 1d20 + ?{Attack Mod|0} ]] vs **KAC** [[@{target|kac}]] --?? $Def == 2 ?? Attack:| [[ [$Atk] 1d20 + ?{Attack Mod|0} ]] vs **EAC** [[@{target|eac}]] --?? $Def == 1 AND $Atk.total &lt; @{target|kac} ?? Miss| Attack Missed @{target|character_name} --?? $Def == 2 AND $Atk.total &lt; @{target|eac} ?? Miss| Attack Missed @{target|character_name} --?? $Def == 1 AND $Atk.total &gt;= @{target|kac} AND $Atk.base &lt;&gt; 20 ?? Hit| Attack Hit @{target|character_name} --?? $Def == 2 AND $Atk.total &gt;= @{target|eac} AND $Atk.base &lt;&gt; 20 ?? Hit| Attack Hit @{target|character_name} --?? $Def == 1 AND $Atk.total &gt;= @{target|kac} AND $Atk.base == 20 ?? Critical Hit| Attack Critically Hit @{target|character_name} --?? $Def == 2 AND $Atk.total &gt;= @{target|eac} AND $Atk.base == 20 ?? Critical Hit| Attack Critically Hit @{target|character_name} --?? $Def == 1 AND $Atk.total &lt; @{target|kac} AND $Atk.base == 20 ?? Hit| Attack Hit @{target|character_name} --?? $Def == 2 AND $Atk.total &lt; @{target|eac} AND $Atk.base == 20 ?? Hit| Attack Hit @{target|character_name} }} Using the Starfinder HUD character sheet Long story short, what it's supposed to do is allow you to target a player's token, select which AC you'd like to target ( [$Def] ), give it the bonus that the enemy has to-hit ( ?{Attack Mod|0} ), and from there it compares the total attack bonus to the selected defense. The issue is that it's rather inconsistent with how it reports the results (this was actually among the longest streaks of correctness that we've seen): There are two issues here: First, the all tags must be unique, so having two Attack lines is not allowed. Same for Miss, Critical Hit, etc. Append *1, *2, *3, etc after the tag name to make them unique without them being shown. The other issue is that conditionals are only used to determine if a line is displayed. Rolls that happen in the lines still take place, so $Atk will always be equal to the second roll. Instead of these two lines: --?? $Def == 1 ?? Attack:| [[ [$Atk] 1d20 + ?{Attack Mod|0} ]] vs **KAC** [[@{target|kac}]] --?? $Def == 2 ?? Attack:| [[ [$Atk] 1d20 + ?{Attack Mod|0} ]] vs **EAC** [[@{target|eac}]] Try this: --hroll|[[ [$Atk] 1d20 + ?{Attack Mod|0} ]] --?? $Def == 1 ?? Attack:*1|[^Atk] vs **KAC** [[@{target|kac}]]a --?? $Def == 2 ?? Attack:*2|[^Atk] vs **EAC** [[@{target|eac}]] After that, as long as you update the names of the remaining conditional tags as described above, things should work as expected.
1527724153
Kurt J.
Pro
API Scripter
Ziterman S. said: Hi, i have a complex macro to made. I don't know if it possible. But, my Cleric want to use Prayer of healing spell. Up to six creatures of your choice that you can see within range each regain hit points equal to 2d8 + your spellcasting ability modifier. This spell has no effect on undead or constructs. I've try to made a macro, it's ok for multiple target, but i want to alterbar of this multiple targets, with the same roll. At this time, i'm stuck. --alterbar1|_target|1st [ |@{target|1st|token_id} _bar|1 _amount|+[^eal] --alterbar2|_target|2nd [ |@{target|2nd|token_id} _bar|1 _amount|+[^eal] --alterbar3|_target|3rd [ |@{target|3rd|token_id} _bar|1 _amount|+[^eal] --alterbar4|_target|4th [ |@{target|4th|token_id} _bar|1 _amount|+[^eal] --alterbar5|_target|5th [ |@{target|5th|token_id} _bar|1 _amount|+[^eal] --alterbar6|_target|6th [ |@{target|6th|token_id} _bar|1 _amount|+[^eal] There is an extra [ in the lines above... I would guess that is what is interfering with your alterbar commands.
Thanks Kurt, that seems to have got it working (or I've been on an insane lucky streak).
1527767304

Edited 1527833479
Kurt J. said: ] There is an extra [ in the lines above... I would guess that is what is interfering with your alterbar commands. Thanks for ur help. I'm on an antother complex macro. EDIT : It work perfectly now with this line : !power {{ --tokenid|@{selected|token_id} --emote|**@{selected|token_name}** tente de trancher @{target|character_name} --target_list|@{target|token_id} --name|Vibrolame --Test de mêlée :|[[ [$Rol] 1d100 ]] --Mêlée :| [[ [$rx] @{selected|total-Melee} ?{Difficulté attaque ?| 0 Moyen, +0 | -30 Expert, -30 | -20 Défi, -20 | -10 Difficile, -10 | +10 Facile, +10 | +20 Simple, +20 | +30 Sans effort, +30} + 10 + 0d0 ]] -- ?? $Rol.total &gt; $rx.total ?? Echec| @{selected|token_name} ne parvient pas à porter correctement son coup. --?? $Rol.total &lt;= $rx.total ?? Test d’esquive :|[[ [$Esq] 1d100 ]] --?? $Rol.total &lt;= $rx.total ?? Esquive :|[[ [$rz] @{target|total-Fray} ?{Difficulté esquive ?| 0 Moyen, +0 | -30 Expert, -30 | -20 Défi, -20 | -10 Difficile, -10 | +10 Facile, +10 | +20 Simple, +20 | +30 Sans effort, +30} + 0d0 ]] --?? $Esq.total &gt; $Rol.total AND $Rol.total &lt;= $rx.total AND $Esq.total &lt;= $rz.total ?? Succès| @{target|character_name} parvient à éviter le coup. --?? $Rol.total &lt;= $rx.total AND $Esq.total &gt;= $rz.total ?? Dommages :|[[ [$Dmg1] {1d10 + 1d6 +?{Tronçonneuse ?|2d10} -[[@{target|armorKineticTotalValue}/2]], 0d0}kh1]] --?? $Rol.total &lt;= $rx.total AND $Esq.total &gt;= $rz.total ?? alterbar1|_target|@{target||token_id} _bar|1 _amount|-[^Dmg1] _show|all --?? $Rol.total &lt;= $rx.total AND $Esq.total &gt;= $rz.total ?? soundfx|_play|Sword --?? $Rol.total &lt;= $rx.total AND $Esq.total &gt;= $rz.total ?? vfx_opt|@{target|token_id} glow-blood --?? $Rol.total &lt;= $rx.total AND $Esq.total &lt;= $rz.total AND $Esq.total &lt; $Rol.total ?? Dommages :|[[ [$Dmg2] {1d10 + 1d6 +?{Tronçonneuse ?|2d10} -[[@{target|armorKineticTotalValue}/2]], 0d0}kh1]] --?? $Rol.total &lt;= $rx.total AND $Esq.total &lt;= $rz.total AND $Esq.total &lt; $Rol.total ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-[^Dmg2] _show|all --?? $Rol.total &lt;= $rx.total AND $Esq.total &lt;= $rz.total AND $Esq.total &lt; $Rol.total ?? soundfx|_play|Sword --?? $Rol.total &lt;= $rx.total AND $Esq.total &lt;= $rz.total AND $Esq.total &lt; $Rol.total ?? vfx_opt|@{target|token_id} glow-blood }} This is a macro combat for Eclipse Phase V2 :&nbsp; - First step, the attacker make a guns test. Fail, the macro stop. Ok. - Second step, if the attacker hit the defender try a fray test. - Third step,if the attacker fails, the attack misses completely. If the attacker succeeds and the defender fails, the attack hits.&nbsp;dice rolls. If the attacker’s dice roll is higher, the attack hits despite a spirited defense; otherwise, the attack fails to connect If both attacker and defender succeed in their tests, compare their.
1527968034
Kurt,&nbsp; First of all awesome script! I have just started to use it.&nbsp; Question, you have the ability to change the format of the cards using a template on a handout. Would it be possible for future release to incorporate handouts for some NPC information versus having to build your NPC's in the character sheets first? Often we simply need base information: Name HP Stats Abilities If these could be read from a handout, we could use that as a "standing variable" card for information. We could even then extend it further for information that can be used in other scenarios. For example, right now in macro we cant have a variable that is in a static place unless it is on a character sheet. So we have to query the user every time they fire off the macro. If we could read a handout and have variables on it, "var1, var2, var3," etc that is static, we now have a place where we can update that data versus having to write it into our macros and then adjust every macro versus one location. --J
1527982661
Hey folks, got another script question for the pros here. Came back after some downtime and updated my powercards, and now my scan macro is kicking back this error: No attribute was found for targeted token by the name of background SyntaxError: Expected "(", ".", "[", "abs(", "ceil(", "d", "floor(", "round(", "t", "{", [ |\t], [+|\-] or [0-9] but "/" found. The script is as follows: !power {{ --whisper|@{selected|character_name} --name|Scan --tokenid|@{selected|token_id} --Action|@{selected|token_name} takes a quick look at @{target|Target1|token_name}, assessing their health. --hroll|[[ [$HPchecker] @{target|Target1|bar3} / @{target|Target1|bar3|max} * 100 + 0d0]] --?? $HPchecker &lt; 10 ?? Status|Another hit and @{target|Target1|token_name} will surely collapse, dead to the world.&nbsp; --?? $HPchecker &gt;= 10 AND $HPchecker &lt; 30 ?? Status|@{target|Target1|token_name} is barely able to stand.&nbsp; Significant blood loss has left them pale, and their every movement looks like a strain. --?? $HPchecker &gt;= 30 AND $HPchecker &lt; 50 ?? Status|Serious injuries cover @{target|Target1|token_name}'s body.&nbsp; They need healing or a great deal of rest, and soon. --?? $HPchecker &gt;= 50 AND $HPchecker &lt; 70 ?? Status|@{target|Target1|token_name} is battered, but still standing.&nbsp; Healing would help, but they will probably make it without. --?? $HPchecker &gt;= 70 AND $HPchecker &lt; 90 ?? Status|@{target|Target1|token_name} has a few cuts and scrapes, but nothing that cannot heal on it's own. --?? $HPchecker &gt;= 90 ?? Status|@{target|Target1|token_name} appears completely healthy. --Description*1|@{target|Target1|bar2|max} &{noerror} --Description*2|@{target|Target1|background} &{noerror} }} /w gm inspected @{target|Target1|token_name} The objective being a player clicks their [Scan] button, then the target, whether it be a creature or an object to be inspected, and the script returns basic descriptive information from either Target1|bar2|max or Target1|background. Any suggestions?
1528027456
Kurt J.
Pro
API Scripter
Patrick said: Hey folks, got another script question for the pros here. Came back after some downtime and updated my powercards, and now my scan macro is kicking back this error: No attribute was found for targeted token by the name of background SyntaxError: Expected "(", ".", "[", "abs(", "ceil(", "d", "floor(", "round(", "t", "{", [ |\t], [+|\-] or [0-9] but "/" found. The script is as follows: !power {{ --whisper|@{selected|character_name} --name|Scan --tokenid|@{selected|token_id} --Action|@{selected|token_name} takes a quick look at @{target|Target1|token_name}, assessing their health. --hroll|[[ [$HPchecker] @{target|Target1|bar3} / @{target|Target1|bar3|max} * 100 + 0d0]] --?? $HPchecker &lt; 10 ?? Status|Another hit and @{target|Target1|token_name} will surely collapse, dead to the world.&nbsp; --?? $HPchecker &gt;= 10 AND $HPchecker &lt; 30 ?? Status|@{target|Target1|token_name} is barely able to stand.&nbsp; Significant blood loss has left them pale, and their every movement looks like a strain. --?? $HPchecker &gt;= 30 AND $HPchecker &lt; 50 ?? Status|Serious injuries cover @{target|Target1|token_name}'s body.&nbsp; They need healing or a great deal of rest, and soon. --?? $HPchecker &gt;= 50 AND $HPchecker &lt; 70 ?? Status|@{target|Target1|token_name} is battered, but still standing.&nbsp; Healing would help, but they will probably make it without. --?? $HPchecker &gt;= 70 AND $HPchecker &lt; 90 ?? Status|@{target|Target1|token_name} has a few cuts and scrapes, but nothing that cannot heal on it's own. --?? $HPchecker &gt;= 90 ?? Status|@{target|Target1|token_name} appears completely healthy. --Description*1|@{target|Target1|bar2|max} &{noerror} --Description*2|@{target|Target1|background} &{noerror} }} /w gm inspected @{target|Target1|token_name} The objective being a player clicks their [Scan] button, then the target, whether it be a creature or an object to be inspected, and the script returns basic descriptive information from either Target1|bar2|max or Target1|background. Any suggestions? For this line: --Description*2|@{target|Target1|background} &{noerror} Does the target character have an attribute called "background"? That's the only obvious thing I see based on the error message.
1528027558
Kurt J.
Pro
API Scripter
Justin A. said: Kurt,&nbsp; First of all awesome script! I have just started to use it.&nbsp; Question, you have the ability to change the format of the cards using a template on a handout. Would it be possible for future release to incorporate handouts for some NPC information versus having to build your NPC's in the character sheets first? Often we simply need base information: Name HP Stats Abilities If these could be read from a handout, we could use that as a "standing variable" card for information. We could even then extend it further for information that can be used in other scenarios. For example, right now in macro we cant have a variable that is in a static place unless it is on a character sheet. So we have to query the user every time they fire off the macro. If we could read a handout and have variables on it, "var1, var2, var3," etc that is static, we now have a place where we can update that data versus having to write it into our macros and then adjust every macro versus one location. --J I'll need to ponder this... I can see a couple of places where something along these lines might be useful.
1528049243
Kurt J. said: Patrick said: Hey folks, got another script question for the pros here. Came back after some downtime and updated my powercards, and now my scan macro is kicking back this error: No attribute was found for targeted token by the name of background SyntaxError: Expected "(", ".", "[", "abs(", "ceil(", "d", "floor(", "round(", "t", "{", [ |\t], [+|\-] or [0-9] but "/" found. The script is as follows: !power {{ --whisper|@{selected|character_name} --name|Scan --tokenid|@{selected|token_id} --Action|@{selected|token_name} takes a quick look at @{target|Target1|token_name}, assessing their health. --hroll|[[ [$HPchecker] @{target|Target1|bar3} / @{target|Target1|bar3|max} * 100 + 0d0]] --?? $HPchecker &lt; 10 ?? Status|Another hit and @{target|Target1|token_name} will surely collapse, dead to the world.&nbsp; --?? $HPchecker &gt;= 10 AND $HPchecker &lt; 30 ?? Status|@{target|Target1|token_name} is barely able to stand.&nbsp; Significant blood loss has left them pale, and their every movement looks like a strain. --?? $HPchecker &gt;= 30 AND $HPchecker &lt; 50 ?? Status|Serious injuries cover @{target|Target1|token_name}'s body.&nbsp; They need healing or a great deal of rest, and soon. --?? $HPchecker &gt;= 50 AND $HPchecker &lt; 70 ?? Status|@{target|Target1|token_name} is battered, but still standing.&nbsp; Healing would help, but they will probably make it without. --?? $HPchecker &gt;= 70 AND $HPchecker &lt; 90 ?? Status|@{target|Target1|token_name} has a few cuts and scrapes, but nothing that cannot heal on it's own. --?? $HPchecker &gt;= 90 ?? Status|@{target|Target1|token_name} appears completely healthy. --Description*1|@{target|Target1|bar2|max} &{noerror} --Description*2|@{target|Target1|background} &{noerror} }} /w gm inspected @{target|Target1|token_name} The objective being a player clicks their [Scan] button, then the target, whether it be a creature or an object to be inspected, and the script returns basic descriptive information from either Target1|bar2|max or Target1|background. Any suggestions? For this line: --Description*2|@{target|Target1|background} &{noerror} Does the target character have an attribute called "background"? That's the only obvious thing I see based on the error message. Hey Kurt, no. The goal there is to use the {noerror} flag to remove the line if it throws an error, such as if the target either has no bar2|max or background. Like I said, it worked before I updated the back end, but I couldn't tell you when the last time I had updated it.
1528158786

Edited 1528160003
for the life of me I can not get token-mod to fire in power cards. I am currently using 3.7.5.&nbsp; I am just testing to get a marker on the token selected and found a couple of threads that address it, but I never get the marker.&nbsp; the rest of the power card works as expected. !setattr --name @{selected|character_name} --modb --other_resource|-1 --silent !power {{ --titlefontshadow|none --emote|** @{selected|token_name} bites at an enemy. ** --tokenid|@{selected|token_id} --format|atwill --corners|10 --name|Bite --leftsub|Melee Attack --rightsub|Bite --Range| 5' --api_token-mod | _ids @{selected|token_id} _ignore-selected _set statusmarkers|stopwatch --Attack|[[ [$Atk] ?{Advantage?| Normal, 1d20 + 5 [PROF]] | Pack Tactic, 2d20KH1 + 5 [PROF]] | Advantage, 2d20KH1 + 5 [PROF]] | Disadvantage, 2d20KL1 + 5 [PROF]]} ]] vs **AC** [[@{target||npc_ac}]] --?? $Atk &lt; @{target||npc_ac} ?? !Missed|**You missed!** --?? $Atk &gt;= @{target||npc_ac} AND $Atk.base &lt;&gt; 20 ?? Hit:|[[ [$Dmg] 2d6+3 ]] 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] 4d6+6 ]] piercing damage --?? $Atk.base == 20 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-[^CritDmg] _show|all --?? $Atk.base == 1 ?? !|**Fumble:** --api_token-mod|_ids @{selected|token_id} _ignore-selected _set statusmarkers|stopwatch }} Thanks in advance
1528211090
Found a very repeatable sandbox crash: use --charid|something then use [TRKR], if there is not a charid that is valid, the script crashes. I was trying to use --charid|random name here, to represent my NPC's using Power Cards to represent my Mooks for my Shadowrun Game, trying to avoid having to create a new character sheet for every Mook. This is why I asked about using variables in Handouts, ideally, I would like something like: PowerCards &lt;name here&gt; that way I can create a simple handout for each of my NPC's and use a similar function like you use with&nbsp;--npc_attribute_summary. Instead I reference something like --var_&lt;name here&gt;_&lt;var_blah&gt;:blah -J
Hi, i Want to know how i can use action for my monsters. DnD 5e OGL, im very new in roll20 pro!
1528292431

Edited 1528292478
Kurt, Is there any way to use html in a tag line? I am trying to build a table on 2 lines to represent the following information: I can add the table information, but it strips the tags and they are ignored. -J
1528360993
Ok, so I figured out where the error in my script is being thrown, but apparently because the line is resulting in an error, thereby not allowing it to continue to run and simply stopping at that point. Using &{noerror} is not working to negate the line. Is there another way to ignore a line that results in an error so that a script can continue? --hroll|[[ [$HPchecker] @{target|Target1|bar3} % @{target|Target1|bar3|max} * 100 + 0d0]] The error happens here, when the target is like, a table or a pile of bones or what have you. Anything that doesn't have a current or max HP, represented in Bar3 and Bar3|max, stops the script from running once it returns (I assume) a null value. I'd really prefer that random objects are able to be inspected, but not necessarily mistaken for a mimic every time someone checks something that interests them.
1528417645
Kurt J.
Pro
API Scripter
Carl F. said: for the life of me I can not get token-mod to fire in power cards. I am currently using 3.7.5.&nbsp; I am just testing to get a marker on the token selected and found a couple of threads that address it, but I never get the marker.&nbsp; the rest of the power card works as expected. !setattr --name @{selected|character_name} --modb --other_resource|-1 --silent !power {{ --titlefontshadow|none --emote|** @{selected|token_name} bites at an enemy. ** --tokenid|@{selected|token_id} --format|atwill --corners|10 --name|Bite --leftsub|Melee Attack --rightsub|Bite --Range| 5' --api_token-mod | _ids @{selected|token_id} _ignore-selected _set statusmarkers|stopwatch --Attack|[[ [$Atk] ?{Advantage?| Normal, 1d20 + 5 [PROF]] | Pack Tactic, 2d20KH1 + 5 [PROF]] | Advantage, 2d20KH1 + 5 [PROF]] | Disadvantage, 2d20KL1 + 5 [PROF]]} ]] vs **AC** [[@{target||npc_ac}]] --?? $Atk &lt; @{target||npc_ac} ?? !Missed|**You missed!** --?? $Atk &gt;= @{target||npc_ac} AND $Atk.base &lt;&gt; 20 ?? Hit:|[[ [$Dmg] 2d6+3 ]] 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] 4d6+6 ]] piercing damage --?? $Atk.base == 20 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-[^CritDmg] _show|all --?? $Atk.base == 1 ?? !|**Fumble:** --api_token-mod|_ids @{selected|token_id} _ignore-selected _set statusmarkers|stopwatch }} Thanks in advance This is a line directly from my own macro: --api_token-mod|_ids @{selected|token_id} _ignore-selected _set statusmarkers|stopwatch I think the spaces around your | might be causing the problem, as everything else seems the same.
1528418464
Kurt J.
Pro
API Scripter
Patrick said: Ok, so I figured out where the error in my script is being thrown, but apparently because the line is resulting in an error, thereby not allowing it to continue to run and simply stopping at that point. Using &{noerror} is not working to negate the line. Is there another way to ignore a line that results in an error so that a script can continue? --hroll|[[ [$HPchecker] @{target|Target1|bar3} % @{target|Target1|bar3|max} * 100 + 0d0]] The error happens here, when the target is like, a table or a pile of bones or what have you. Anything that doesn't have a current or max HP, represented in Bar3 and Bar3|max, stops the script from running once it returns (I assume) a null value. I'd really prefer that random objects are able to be inspected, but not necessarily mistaken for a mimic every time someone checks something that interests them. I think there needs to be some clarification about what parts of Roll20 are handling what. The @{} notation is handled by the chat server long before the PowerCards gets to process anything. This means that when you use something like: --hroll|[[ [$HPchecker] @{target|Target1|bar3} % @{target|Target1|bar3|max} * 100 + 0d0]] PowerCars actually gets something along the lines of: --hroll|[[ [$HPchecker] 15 % 30 * 100 + 0d0]] It doesn't know anything about the target. All PowerCards gets are the numbers. When using a target that doesn't have that information, it gets: --hroll|[[ [$HPchecker] % * 100 + 0d0]] Hence the issues with trying to perform math. In addition, the error about an attribute not being present is being returned by the chat server before calling PowerCards when it is trying to replace the values. It would require a fairly massive overhaul of the API script (along with an entirely new set of notations) to allow PowerCards to get its own information about a target (and there would still be the potential for such errors as the target would need to be conveyed to PowerCards in some way. Also, keep in mind that PowerCard macros aren't scripts. They are more or less fancy text replacements. There are a lot of automation features built in, and while Roll IDs and conditionals make things pretty flexible, it does not have the robustness of being its own scripting language.
1528420202
Damn. You should drop that in your wiki, because it's an excellent explanation of the limitations of PC3. Thanks anyway. :)
1528422276
Kurt J.
Pro
API Scripter
Justin A. said: Kurt, Is there any way to use html in a tag line? I am trying to build a table on 2 lines to represent the following information: I can add the table information, but it strips the tags and they are ignored. -J There is not currently a way to do this, because the HTML code gets stripped out by the chat server (PowerCards never sees it). That said, I had a go at adding formatting strings for table elements, and that worked out pretty well. In my own testing code, I now have a way to generate table, tr, and td tags in power cards, along with formatting modifiers (ie, [TRB bgcolor='black'] generates a table row with a black background color). Using this I was able to duplicate the Shadowrun Stats table above. One big caveat though is that the whole table would need to be contained in a single PowerCards tag, and improper use of formatting (leaving off the close table for example) would likely screw up the rest of the card. This seems generally useful, so I'll make sure everything is stable and fold it into 3.7.6, which should be up on the gist in a couple of days.
1528422596
Kurt J.
Pro
API Scripter
Patrick said: Damn. You should drop that in your wiki, because it's an excellent explanation of the limitations of PC3. Thanks anyway. :) I added the above (with a few wording changes) to the Wiki.
1528422643
Kurt J.
Pro
API Scripter
Justin A. said: Found a very repeatable sandbox crash: use --charid|something then use [TRKR], if there is not a charid that is valid, the script crashes. I was trying to use --charid|random name here, to represent my NPC's using Power Cards to represent my Mooks for my Shadowrun Game, trying to avoid having to create a new character sheet for every Mook. This is why I asked about using variables in Handouts, ideally, I would like something like: PowerCards &lt;name here&gt; that way I can create a simple handout for each of my NPC's and use a similar function like you use with&nbsp;--npc_attribute_summary. Instead I reference something like --var_&lt;name here&gt;_&lt;var_blah&gt;:blah -J I'll see if I can stop the sandbox crash in this circumstance and the look into the handouts.
1528568785
Still banging my head on the --api_ tag&nbsp; I have stripped it down to the bare bones.&nbsp; I am on the ribboned page trying two different api's as the syntax is different for both.&nbsp; Tracker jacker and token mod.&nbsp; I get the powercard header and no out put after that. !power {{ --name|API Test --leftsub|PC selected --rightsub|place marker --api_tj| -listfavs --api_token-mod|_ids @{selected|token_id} _ignore-selected _set statusmarkers|!stopwatch }} any assistance would be appreciated.&nbsp; the goal is to place a marker if the PC is knocked pron on a hit.
1528570090
Kurt J. said: Carl F. said: for the life of me I can not get token-mod to fire in power cards. I am currently using 3.7.5.&nbsp; I am just testing to get a marker on the token selected and found a couple of threads that address it, but I never get the marker.&nbsp; the rest of the power card works as expected. !setattr --name @{selected|character_name} --modb --other_resource|-1 --silent !power {{ --titlefontshadow|none --emote|** @{selected|token_name} bites at an enemy. ** --tokenid|@{selected|token_id} --format|atwill --corners|10 --name|Bite --leftsub|Melee Attack --rightsub|Bite --Range| 5' --api_token-mod | _ids @{selected|token_id} _ignore-selected _set statusmarkers|stopwatch --Attack|[[ [$Atk] ?{Advantage?| Normal, 1d20 + 5 [PROF]] | Pack Tactic, 2d20KH1 + 5 [PROF]] | Advantage, 2d20KH1 + 5 [PROF]] | Disadvantage, 2d20KL1 + 5 [PROF]]} ]] vs **AC** [[@{target||npc_ac}]] --?? $Atk &lt; @{target||npc_ac} ?? !Missed|**You missed!** --?? $Atk &gt;= @{target||npc_ac} AND $Atk.base &lt;&gt; 20 ?? Hit:|[[ [$Dmg] 2d6+3 ]] 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] 4d6+6 ]] piercing damage --?? $Atk.base == 20 ?? alterbar2|_target|@{target||token_id} _bar|1 _amount|-[^CritDmg] _show|all --?? $Atk.base == 1 ?? !|**Fumble:** --api_token-mod|_ids @{selected|token_id} _ignore-selected _set statusmarkers|stopwatch }} Thanks in advance This is a line directly from my own macro: --api_token-mod|_ids @{selected|token_id} _ignore-selected _set statusmarkers|stopwatch I think the spaces around your | might be causing the problem, as everything else seems the same. ya, no luck.&nbsp; The last statement in the powercard was just like you posted.&nbsp; I pasted you example as well into a new one with no luck as well.&nbsp; reverting the syntax and placing it after the powercard and token-mod runs fine.&nbsp; stumped
1528570581
Kurt J.
Pro
API Scripter
Version 3.7.6 is now up on the development GIST, and has been queued for One-Click install as well: 2018-06-09 - Version 3.7.6 - Fixed a sandbox crash when using the [TRKR] roll modifier with an invalid --charid specified. - Added new formatting tags for creating HTML tables. These are (compared to other PowerCards formatting commands) a bit more complicated to use: The table MUST be properly formatted (opening and closing all tags) and MUST be contained within a single PowerCards tag. The formatting tags are [TTB] and [TTE] to open and close a table (&lt;table&gt; and &lt;/table&gt;), [TRB] and [TRE] to open and close a table row (&lt;tr&gt; and &lt;/tr&gt;) and [TDB] and [TDE] to open and close a table cell (&lt;td&gt; and &lt;/td&gt;). You can place modifiers to the HTML tags inside the square brackets (alignment, coloring, etc). Here is an example: !power {{ --name|Testing --!Hello|~C[TTB 'width=100%' 'bgcolor=Black'][TRB][TDB align=left colspan=10]**$$#fff|Male Dwarf$$**[TDE][TRE] [TRB][TDB width='10%']**$$#fff|B$$**[TDE][TDB width='10%']**$$#fff|A$$**[TDE][TDB width='10%']**$$#fff|R$$**[TDE][TDB width='10%']**$$#fff|S$$**[TDE][TDB width='10%']**$$#fff|W$$**[TDE][TDB width='10%']**$$#fff|L$$**[TDE][TDB width='10%']**$$#fff|I$$**[TDE][TDB width='10%']**$$#fff|C$$**[TDE][TDB width='10%']**$$#fff|EDG$$**[TDE][TDB width='10%']**$$#fff|ESS$$**[TDE][TRE] [TRB 'bgcolor=#444444'][TDB width='10%']**$$#fff|5(6)$$**[TDE][TDB width='10%']**$$#fff|4$$**[TDE][TDB width='10%']**$$#fff|4(5)$$**[TDE][TDB width='10%']**$$#fff|6$$**[TDE][TDB width='10%']**$$#fff|6$$**[TDE][TDB width='10%']**$$#fff|5$$**[TDE][TDB width='10%']**$$#fff|5$$**[TDE][TDB width='10%']**$$#fff|3$$**[TDE][TDB width='10%']**$$#fff|2$$**[TDE][TDB width='10%']**$$#fff|4.3$$**[TDE][TRE][TTE]~C }} which will produce the following:
1528571007
Kurt J.
Pro
API Scripter
Carl F. said: Still banging my head on the --api_ tag&nbsp; I have stripped it down to the bare bones.&nbsp; I am on the ribboned page trying two different api's as the syntax is different for both.&nbsp; Tracker jacker and token mod.&nbsp; I get the powercard header and no out put after that. !power {{ --name|API Test --leftsub|PC selected --rightsub|place marker --api_tj| -listfavs --api_token-mod|_ids @{selected|token_id} _ignore-selected _set statusmarkers|!stopwatch }} any assistance would be appreciated.&nbsp; the goal is to place a marker if the PC is knocked pron on a hit. Ah! I'll bet I know what is wrong, at least on the token-mod (I've never used Tracker Jacker). Did you set Token-Mod to allow non-GMs (and PowerCards usually run as non-GMs) to use the --ids command? The command is: !token-mod --config players-can-ids Which will toggle the option on or off. It needs to be on for --api_token-mod to work with the _ids option.
1528571863
Playing with the table stuff now, outstanding work Kurt!! --J