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

Silvyre said: 1d20cs>19 Thanks again Silvyre. I think I'm finally good for now. At least until the next bright idea strikes me.
Unless you need to show both rolls, I prefer to do advantage/disadvantage with a roll query now. I made an attribute on my character sheet called AtkRoll and put ?{Attack|Standard, 1d20|Advantage, 2d20kh1|Disadvantage, 2d20kl1} into that attribute. Then when I need to, I just call @{AtkRoll} and it asks if I am attack with or without advantage or disadvantage. It reduces the number of roll id's needed to just one per attack roll and greatly simplifies and condenses the conditional logic. !power {{ @{format} --charid|@{character_id} --emote|//Nameless strides forward and strikes with a spectral blade.// --title|Hex: [[ [$Hex] ?{Hexed Target|No, 0|Yes, 1} + 0d0 ]] --name|Pact Blade --leftsub|Melee Attack --rightsub|Reach 5 ft --Attack:|[[ [$Atk] @{AtkRoll} + [[@{strength_mod}]] [Str Mod] + [[@{PB}]] [Proficiency] ]] vs AC --Hit:|[[ [nh] 1d8 + [[@{strength_mod}]] [Str Mod] ]] slashing damage --?? $Hex == 1 ?? !Hex|^* **+** [[ [nh] 2d6 ]] necrotic damage --?? $Atk.base == 20 ?? Critical Hit:| --?? $Atk.base == 20 ?? !CritHit|^* **+** [[ [nh] 1d8]] slashing damage --?? $Atk.base == 20 AND $Hex == 1 ?? !CritHex|^* **+** [[ [nh] 2d6 ]] necrotic damage }}
HoneyBadger said: Unless you need to show both rolls, I prefer to do advantage/disadvantage with a roll query now. I made an attribute on my character sheet called AtkRoll and put ?{Attack|Standard, 1d20|Advantage, 2d20kh1|Disadvantage, 2d20kl1} into that attribute. Then when I need to, I just call @{AtkRoll} and it asks if I am attack with or without advantage or disadvantage. It reduces the number of roll id's needed to just one per attack roll and greatly simplifies and condenses the conditional logic. !power {{ @{format} --charid|@{character_id} --emote|//Nameless strides forward and strikes with a spectral blade.// --title|Hex: [[ [$Hex] ?{Hexed Target|No, 0|Yes, 1} + 0d0 ]] --name|Pact Blade --leftsub|Melee Attack --rightsub|Reach 5 ft --Attack:|[[ [$Atk] @{AtkRoll} + [[@{strength_mod}]] [Str Mod] + [[@{PB}]] [Proficiency] ]] vs AC --Hit:|[[ [nh] 1d8 + [[@{strength_mod}]] [Str Mod] ]] slashing damage --?? $Hex == 1 ?? !Hex|^* **+** [[ [nh] 2d6 ]] necrotic damage --?? $Atk.base == 20 ?? Critical Hit:| --?? $Atk.base == 20 ?? !CritHit|^* **+** [[ [nh] 1d8]] slashing damage --?? $Atk.base == 20 AND $Hex == 1 ?? !CritHex|^* **+** [[ [nh] 2d6 ]] necrotic damage }} That's kind of where I have gone now -- unless I need to have the Advantage reflected elsewhere (like a field saying I have advantage), I use a single drop down query for it. It cuts down on coding, etc. It's allowed me to cut my macro lengths roughly in half.
I just discovered something cool for you then Sean. You can test for the value of the drop down this way: --?? @{AtkRoll} == 2d20kh1 ?? Advantage|I have advantage on this roll.
I thought about that -- but for some reason (admittedly, I'm not running on all my cylinders at the moment), I seem to recall the conditional fields were not working properly unless what you were searching for was a number only. I'll check in a bit, to be sure, but that is on my brain as to the drawback of that.
1447092227

Edited 1447092277
Disregard previous transmission.... The issue was that I couldn't set it up inside the roll itself. So this works (where @{Adv} is  ?{Advantage?|Advantage, 2d20kh1|No, 1d20|Disadvantage, 2d20kl1}  ): !power {{ @{format} --charid|@{character_id} --emote|@{character_name} kicks a rock in the general direction of the bad people coming at him...  --name|Initiative --Initiative Roll:|~R[[ [trkr] @{Adv} + [[@{initiative_overall}]] ]]~R --?? @{Adv} == 2d20kh1 ?? Advantange|Advantage --Note| --!^1text1|//Due to his // **$$#da0000|Sentinel Shield$$**//, @{selected|token_name} has advantage on initiative rolls. The lowest is automatically dropped.// But this does not: !power {{ @{format} --charid|@{character_id} --emote|@{character_name} kicks a rock in the general direction of the bad people coming at him...  --name|Initiative --Initiative Roll:|~R[[ [$Adv|trkr] ?{Advantage?|Advantage, 2d20kh1|No, 1d20|Disadvantage, 2d20kl1} + [[@{initiative_overall}]] ]]~R --?? $Adv == 2d20kh1 ?? Advantange|Advantage --Note| --!^1text1|//Due to his // **$$#da0000|Sentinel Shield$$**//, @{selected|token_name} has advantage on initiative rolls. The lowest is automatically dropped.// }} And I only ever tested it coded like the second one, rather than creating a field for use and adding it accordingly.
The only reason I even check for that is because (while my group is 80% family) I don't trust people... it's a flaw, I admit. But, with my parents also playing, I tend to write their code for them to make it as easy as possible for them to do as much as possible from a single macro: my mother is 59, my father is 66. While he is perfectly capable of writing the macros himself, I do it faster and have a much broader mind as to pushing the extents. With her playing a Vengeance Paladin, and he a Way of the Fist Monk, all-encompassing attack macros can get long... (his is currently at 78 lines of code, whereas 2 weeks ago, it was almost 200, and hers is 56 when it was 130+ 2 weeks ago). His especially, since he has flurry of blows, can be a pain because of when an attack has advantage or not -- and I have set it up so they cannot see the AC of what is attacked, but are told if they hit or miss based upon the calculations done. Damage is only rolled if there is a hit, etc. This new method for an Advantage roll will make life so much easier for me.
Conditionals work on anything. Text or numbers.
1447093718

Edited 1447100405
So weird because it wasn't working on the first one. Oh well, since it works on the second, I'll run with it like that. Edit: I'm a damned idiot... it wasn't working because $Adv would have been the entire roll result, not the simple check. Edit 2: Okay, I spoke too soon... !power {{ @{format} --charid|@{character_id} --emote|@{character_name} kicks a rock in the general direction of the bad people coming at him...  --name|Initiative --Initiative Roll:|~R[[ [trkr] @{Adv} + [[@{initiative_overall}]] ]]~R --?? @{Adv} == 2d20kh1 ?? Note| --?? @{Adv} == 2d20kh1 ?? !^1text1|//Due to his // **$$#da0000|Sentinel Shield$$**//, @{selected|token_name} has advantage on initiative rolls. The lowest is automatically dropped.// }} The conditional part also showed when I chose Disadvantage... Is it stopping the check after the 2d20? I changed the Disadvantage to just 2 (no 2d20kl1) and it still showed the lines as if I have advantage.
It seems to be the case the more I look at it, that letters and numbers are not equal in the eyes of the conditional... !power {{ --name|test --hroll|?{Works?|Yes,yes|No,no} --?? ?{Works?} == yes ?? Yes:|?{Works?}  --?? ?{Works?} == no ?? No:|?{Works?}  }} Both conditionals trigger regardless of which is selected--both outputs show the appropriate selection (yes/no), but each field shows regardless of which is actually selected. It's almost as though it simply looks, sees a letter, and accepts the condition as having been met.
1447105161

Edited 1447105186
Weird.
1447112605

Edited 1447112713
HoneyBadger said: Unless you need to show both rolls, I prefer to do advantage/disadvantage with a roll query now. I made an attribute on my character sheet called AtkRoll and put ?{Attack|Standard, 1d20|Advantage, 2d20kh1|Disadvantage, 2d20kl1} into that attribute. Then when I need to, I just call @{AtkRoll} and it asks if I am attack with or without advantage or disadvantage. It reduces the number of roll id's needed to just one per attack roll and greatly simplifies and condenses the conditional logic. I've been trying that now, but when I test it for some reason on a Disadvantage roll it keeps a Crit roll. Do you know why this happens? EDIT:  Nevermind, it shows that there was a Crit rolled but still keeps the lower die. Is there a way around that?
Nope. PowerCards isn't set up to ignore rolls not kept due to way too many game systems that may still need that information.
1447456408

Edited 1447462511
Is anyone else getting this error after the new update? Or does anyone know why I'm getting this error. Everything was working just fine the day before the update and when we had a campaign several of the power cards were coming up with this same error. I thought maybe it was something with the update, so I waited a couple of days to check it and see if it's still happening and it is. Here's the error: Here's the code for one of the PowerCards that still works. !power {{ --charid|@{character_id} --emote|**@{selected|token_name}** swings sword at target! --format|ambrose --name|Short Sword --leftsub|Action --rightsub|Reach 5 ft. --target_list|@{target| |token_id} --Attack|~R[[ [$Atk] @{AtkRoll} + @{Melee To Hit} ]] vs. [[0+ %%AC%% ]] (AC) (%%token_name%%)~R --?? $Atk.total >= @{target| |bar3} AND $Atk.base <= 20 ?? Hit|~R[[ [NH] d6 +@{STR} ]] ~R --?? $Atk.total < @{target| |bar3} AND $Atk.base < 20 ?? !Miss| ~C$$#ff0000|**You Missed!**$$~C --?? $Atk.base == 20 ?? Critical Hit|~R[[ [NH] d6]]~R --?? $Atk.total >= @{target| |bar3} AND $Atk.base <= 20 ?? Properties|~RPiercing, Finesse, Light~R --?? $Atk.total < @{target| |bar3} AND $Atk.base == 1 ?? !Miss *1:|You missed horribly: ^^^^ $$#ff0000|**[[1t[Critical-Miss-Melee] [txt] ]]**$$ }} And...Here's the code for one of the PowerCards that is giving the error. I've looked it over but can't find anything wrong with it. !power {{ --charid|@{character_id} --emote|**@{selected|token_name}** aims bow at target! --format|ambrose --name|Short Bow --leftsub|Action --rightsub|Range 80/320 --!|**Ambrose** fires ?{Arrows fired|1} arrows(s) and has [[@{Arrows}-1]] arrows remaining. --target_list|@{target| |token_id} --Attack|~R[[ [$Atk] @{AtkRoll} + @{Melee To Hit} +4 ]] vs. [[0+ %%AC%% ]] (AC) (%%token_name%%)~R --?? $Atk.total >= @{target| |bar3} AND $Atk.base <= 20 ?? Hit|~R[[ [NH] d6 +@{STR} +4 ]] ~R --?? $Atk.total < @{target| |bar3} AND $Atk.base < 20 ?? !Miss| ~C$$#ff0000|**You Missed!**$$~C --?? $Atk.base == 20 ?? Critical Hit|~R[[ [NH] d6]]~R --?? $Atk.total >= @{target| |bar3} AND $Atk.base <= 20 ?? Properties|~RPiercing, Ammunition, 2-Handed~R --?? $Atk.total < @{target| |bar3} AND $Atk.base == 1 ?? !Miss *1:|You missed horribly: ^^^^ $$#ff0000|**[[1t[Critical-Miss-Ranged] [txt] ]]**$$ }} !ammo @{selected|token_id} Arrows -?{How many arrows?|1}
What update? On Dev?
SeanOG said: What update? On Dev? Yea, everything was working fine before they updated Dev and now getting that error.
I just jumped onto the Dev server, and ran that card macro fine. Granted, I didn't add the !ammo deduction portion, and I hard coded several of the attributes you have -- but I had no problem.
SeanOG said: I just jumped onto the Dev server, and ran that card macro fine. Granted, I didn't add the !ammo deduction portion, and I hard coded several of the attributes you have -- but I had no problem. Hmmm...I tried it also without the !ammo portion as well but it's still not working. Do you have any idea what is causing it?
Here is what I used: !power {{ --charid|@{character_id} --emote|**@{selected|token_name}** aims bow at target! --name|Short Bow --leftsub|Action --rightsub|Range 80/320 --!|**Ambrose** fires ?{Arrows fired|1} arrows(s) and has [[10-1]] arrows remaining. --target_list|@{target| |token_id} --Attack|~R[[ [$Atk] 1d20 + 6 +4 ]] vs. [[0+ %%bar3%% ]] (AC) (%%token_name%%)~R --?? $Atk.total >= @{target| |bar3} AND $Atk.base <= 20 ?? Hit|~R[[ [NH] d6 +6+4 ]] ~R --?? $Atk.total < @{target| |bar3} AND $Atk.base < 20 ?? !Miss| ~C$$#ff0000|**You Missed!**$$~C --?? $Atk.base == 20 ?? Critical Hit|~R[[ [NH] d6]]~R --?? $Atk.total >= @{target| |bar3} AND $Atk.base <= 20 ?? Properties|~RPiercing, Ammunition, 2-Handed~R --?? $Atk.total < @{target| |bar3} AND $Atk.base == 1 ?? !Miss *1:|You missed horribly: ^^^^ $$#ff0000|**dumbass**$$ } The only other thing I changed besides hardcoding some of the things you have (and deleting the format tag), was changing %%AC%% to %%bar3%%.
Weird... dunno what it could be. There are only four instances of e.replace in the PowerCards script and they're all part of the emote.replace, not e.replace by itself.
SeanOG said: Here is what I used: !power {{ --charid|@{character_id} --emote|**@{selected|token_name}** aims bow at target! --name|Short Bow --leftsub|Action --rightsub|Range 80/320 --!|**Ambrose** fires ?{Arrows fired|1} arrows(s) and has [[10-1]] arrows remaining. --target_list|@{target| |token_id} --Attack|~R[[ [$Atk] 1d20 + 6 +4 ]] vs. [[0+ %%bar3%% ]] (AC) (%%token_name%%)~R --?? $Atk.total >= @{target| |bar3} AND $Atk.base <= 20 ?? Hit|~R[[ [NH] d6 +6+4 ]] ~R --?? $Atk.total < @{target| |bar3} AND $Atk.base < 20 ?? !Miss| ~C$$#ff0000|**You Missed!**$$~C --?? $Atk.base == 20 ?? Critical Hit|~R[[ [NH] d6]]~R --?? $Atk.total >= @{target| |bar3} AND $Atk.base <= 20 ?? Properties|~RPiercing, Ammunition, 2-Handed~R --?? $Atk.total < @{target| |bar3} AND $Atk.base == 1 ?? !Miss *1:|You missed horribly: ^^^^ $$#ff0000|**dumbass**$$ } The only other thing I changed besides hardcoding some of the things you have (and deleting the format tag), was changing %%AC%% to %%bar3%%. I tried hard coding like you did in this example and I'm still getting the error. Annoying!
1447540791
Silvyre
Forum Champion
Silvyre said: Why don't you incrementally add to the macro to pinpoint the issue?
Silvyre said: Silvyre said: Why don't you incrementally add to the macro to pinpoint the issue? Ok, so I went through incrementally and it's giving the error when I try to add this part of the code: --!|**Cairo** throws ?{Daggers thrown|1} dagger(s) and has [[@{Daggers}-1]] daggers remaining. Specifically when adding the [[@{Daggers} -1]]. With or without the -1.
1447544475
Silvyre
Forum Champion
Try replacing @{Daggers} with @{selected|Daggers}
Silvyre said: Try replacing @{Daggers} with @{selected|Daggers} Nope, that still gives the same error.
1447545598

Edited 1447548587
Arthur B. said: Silvyre said: Try replacing @{Daggers} with @{selected|Daggers} Nope, that still gives the same error. It looks like anytime I try to access any of the Abilities it gives the same error. When I remove that part of the code it works fine. EDIT:   Ok, so not always does it throw an error when recalling Abilities. Here's a code that is recalling something from the Abilities list that works just fine : !power {{ --emote|After getting hit **@{selected|token_name}**  points his finger at target that damaged him and says, "I rebuke thee!!!" --name|Hellish rebuke --leftsub|DC  [[ @{Spell DC Bard}]] DEX --rightsub|1 Reaction ¤ 60’ ¤ Instant ¤ Evocation ~C**Components**~C ~CN/A~C --target_list|@{target| |token_id}  --!Target| ~R[[@{Spell DC Bard}]] vs. [[d20+ %%DEX%%  ]] (DEX Check) | [[d20 + %%DEX%% + %%Proficiency%% ]] (DEX Save) (%%token_name%%)~R --Failed Save|~R[[ [nh] 2d10]] Fire damage~R --Successful Save|~RTake ½ damage!~R --!Effect|^*Creature that damaged **@{selected|token_name}** is surrounded by hellish flames. }} Look at leftsub and !Target tags both are recalling @{Spell DC Bard} and working, but in other codes not working when recalling Abilities. EDIT 2: Ok, problem solved. Every Ability that I added to the character sheets on the day of (or just before) the Dev update is the problem. If I delete and re-add the Abilities they work just fine.
1447548308
Silvyre
Forum Champion
Try replacing [[@{Daggers}-1]] with [[ @{Daggers}-1 ]]. At this point, I'll recommend that you further troubleshoot only using your minimal replicable case. Delete any and all lines of code from the Ability Macro that you are testing that are (apparently) working without error. As a side note: what you've been referring to as Abilities are actually Attributes .
1447548634

Edited 1447548660
Once again, this is NOT an error with PowerCards. There is absolutely no instance of e.replace in the PowerCards script. Also, that error message in chat is a Roll20 error message. API scripts cannot create an error message like that.
Silvyre said: Try replacing [[@{Daggers}-1]] with [[ @{Daggers}-1 ]]. At this point, I'll recommend that you further troubleshoot only using your minimal replicable case. Delete any and all lines of code from the Ability Macro that you are testing that are (apparently) working without error. As a side note: what you've been referring to as Abilities are actually Attributes . Lol, you're right. I was confusing the two. I have figured out the issue though, the attributes that I created on the day of (or just before) the Dev update were somehow corrupted. If I delete and re-add them, everything works fine.
HoneyBadger said: Once again, this is NOT an error with PowerCards. There is absolutely no instance of e.replace in the PowerCards script. Also, that error message in chat is a Roll20 error message. API scripts cannot create an error message like that. Hey HoneyBadger, sorry about all the confusion. The problem is now fixed. If you scan through the previous posts you will see what the error was and how I fixed it. Thank you everyone for helping me figure this out. I'm still pretty new to writing code and trying to figure out how to troubleshoot some of the errors that may occur.
1447559191

Edited 1447561251
SeanOG said: The conditional part also showed when I chose Disadvantage... Is it stopping the check after the 2d20? I changed the Disadvantage to just 2 (no 2d20kl1) and it still showed the lines as if I have advantage. I think it's stopping the check after the 2. The code that does conditionals uses the javascript "parseInt" function on the left and right parameters. Instead of rolling one's own parser, why not use something like this library to parse arbitrary expressions to check for errors, and if they're good, then use javascript's eval() function to do the calculation (this use of eval() should be fine security wise, since we ought to trust the string the user sends if it parses out) <a href="http://jsep.from.so/" rel="nofollow">http://jsep.from.so/</a> The only thing lacking might be the inline roll functionality, but perhaps pre-parsing the entire conditional expression to calculate inline rolls and roll IDs would do the trick? Failing that, here's a fix: Find the line that has&nbsp; LeftVal = (parseInt(LeftVal) || 0); Replace With if (!isNaN(parseFloat(LeftVal)) && isFinite(LeftVal)) LeftVal = (parseFloat(LeftVal) || 0); Also RightVal = (parseInt(RightVal) || 0); With if (!isNaN(parseFloat(RightVal)) && isFinite(RightVal)) RightVal = (parseFloat(RightVal) || 0); That should change the logic to still parse numbers, but compare strings correctly.
Nate W. said: SeanOG said: The conditional part also showed when I chose Disadvantage... Is it stopping the check after the 2d20? I changed the Disadvantage to just 2 (no 2d20kl1) and it still showed the lines as if I have advantage. I think it's stopping the check after the 2. The code that does conditionals uses the javascript "parseInt" function on the left and right parameters. Instead of rolling one's own parser, why not use something like this library to parse arbitrary expressions to check for errors, and if they're good, then use javascript's eval() function to do the calculation (this use of eval() should be fine security wise, since we ought to trust the string the user sends if it parses out) <a href="http://jsep.from.so/" rel="nofollow">http://jsep.from.so/</a> The only thing lacking might be the inline roll functionality, but perhaps pre-parsing the entire conditional expression to calculate inline rolls and roll IDs would do the trick? Failing that, here's a fix: Find the line that has&nbsp; LeftVal = (parseInt(LeftVal) || 0); Replace With if (!isNaN(parseFloat(LeftVal)) && isFinite(LeftVal)) LeftVal = (parseFloat(LeftVal) || 0); Also RightVal = (parseInt(RightVal) || 0); With if (!isNaN(parseFloat(RightVal)) && isFinite(RightVal)) RightVal = (parseFloat(RightVal) || 0); That should change the logic to still parse numbers, but compare strings correctly. I'll take a look in a sec to see if that works. I'll let you know.
That seemed to work Nate. Thank you sir!
Yeah, I kinda figured it was a parseInt screwing it up. That's a nice solution. Will add it later.
Hey All, I'm getting the following error after targeting a token (at least the API doesn't spit it out until then):&nbsp; evalmachine.&lt;anonymous&gt;:2696 LeftVal = parseInt(x[0].inlinerolls[LeftVal.match(/[0-9]+/)].results.tot ^ TypeError: Cannot read property 'results' of undefined at evalmachine.&lt;anonymous&gt;:2696:67 at Array.forEach (native) at evalmachine.&lt;anonymous&gt;:2679:8 at checkFinishedOps ( I'm attempting to use this power card set up in a macro: !power {{ --name|Melee Attack --leftsub|Mace --rightsub|Reach 5 ft. --Attack:|[[ [$Atk] 1d20 + @{strength_mod} + @{basic_strength_bonus} + @{jack_of_all_trades} + @{global_check_bonus} ]] vs AC --?? $Atk.base == 1 OR $Atk.total &lt; @{target|AC}?? !Miss:|You missed. --?? $Atk.total &gt;= @{target|AC} AND $Atk.base &lt;&gt; 1 AND $Atk.base &lt;&gt; 20 ?? Hit:|[[@{meleedmg1} + @{strength_mod}]] bludgeoning damage --?? $Atk.base == 20 ?? Critical Hit:|[[@{meleecritdmg1}]] bludgeoning damage }} I'm sure its something have in there, but I didn't think anything I added was to wild.&nbsp; Thanks!
*sigh* Never mind, I think I know what it is.&nbsp; I recently imported the 5e shaped sheet after first using the base 5e sheet.&nbsp; I forgot it had hosed all my NPCs.&nbsp; Its probably gacking due to the target not having proper values set up.&nbsp; I'll report back if it continues after I get my head out of my backside. ;-)
1447818027

Edited 1447818159
Silvyre
Forum Champion
Bear in mind that the Shaped sheet has grown to deprecate a fair number of Attributes from the legacy sheet—take care to ensure that all Attributes in your present macros are still provided by the new sheet using the same name. Otherwise, any macros using them will only "work" for Characters created before your sheet change.
Thanks for the feedback, Silvyre!&nbsp; In your opinion, does trying to use power cards with the shaped sheet seem redundant?&nbsp; I love the look and flexibility of the power cards, but the sheet has some sweet templates as well.&nbsp; I've been successful in getting the sheet cards to have some custom settings, but the power cards just seem like you can do just about anything with them.&nbsp; And you're right, I think I was attempting to use some of the older attributes.&nbsp; I'll play with it some more tonight.
1447871364
Silvyre
Forum Champion
Craig L. said: In your opinion, does trying to use power cards with the shaped sheet seem redundant?&nbsp; I love the look and flexibility of the power cards, but the sheet has some sweet templates as well.&nbsp; I've been successful in getting the sheet cards to have some custom settings, but the power cards just seem like you can do just about anything with them. I really like the 5eDefault Roll Template, and have made the decision to write the majority of the macros I've required (which are exceedingly simple for an exceedingly simple system) using it. I appreciate the Shaped sheet's ability to store Roll Template macros (i.e. via the Class Action section) that can be then called as Abilities or dragged to the Quick Bar. However, PowerCards are much better suited to handling some of the more complex mechanics in the system. Hence, it's definitely not redundant to utilize both Roll Templates and PowerCards within a campaign. Once PowerCards introduces the capacity to place conditionals within the bodies of tags, or method of defining variables, I can see a greater number of my D&D macros shifting to PowerCards for utility purposes. If/when PowerCards gains its own style-able API Command Buttons, or expands the its ability to style text in-line (above coloring it), that'll happen a lot quicker... ;)
1447990318
Phoxounet
Sheet Author
Translator
Hi there ! I'm sorry if I post in the wrong thread or section, or if it already has been suggested. The only true limitation to Powercard for me is that powercards are displayed in the chat panel. Let me explain : I don't really use them for combat or skill checks. I used them as power, combat maneuvers and tactics, special rules reminders, and so on. Right now, I created full sets of powers, magics and combat maneuvers for my players. The only problem is that when they want to check these, it can easily spam the chat panel. I don't know if my idea is even possible to script or to add. I don't have enough scripting skills for that. Anyway, here is my suggestion : have a command in a powercard structure that don't send the powercard to the chat panel but make it appear as an image zoom, like when zooming on a handout image.
1447991660
Gen Kitty
Forum Champion
Phoxounet said: I don't know if my idea is even possible to script or to add. I don't have enough scripting skills for that. Anyway, here is my suggestion : have a command in a powercard structure that don't send the powercard to the chat panel but make it appear as an image zoom, like when zooming on a handout image. As a workaround you could have it whisper the result to the person who invoked the macro.&nbsp; That at least would save the rest of the party from the spam.&nbsp; Unless I'm mis-understanding and you already have them set up as whispers. I am 99% sure you can have a macro pop up a handout, but I'm not in a position where I can test that right now.
1447992968

Edited 1447993153
Silvyre
Forum Champion
GenKitty said: I am 99% sure you can have a macro pop up a handout, but I'm not in a position where I can test that right now. Yup; links within the text chat can pop up Characters and Handouts. The URL for a Character is of the form journal.roll20.net/character/@{character_id} and the URL for a Handout is of the form journal.roll20.net/handout/[Specific handout ID] . Both IDs can be acquired via a Link Between Journal Entries or through the examination of the Journal tab with a browser's element inspector]
1448005895
Phoxounet
Sheet Author
Translator
Whispers could be a nice idea but I need to see these cards too, and I need to keep the chat quiet :p Having a handout or a character sheet poping up is not what I suggested, actually. The idea is to have the result of the powercard appear as a zoomed image as we can do with images.
1448007385

Edited 1448007618
Silvyre
Forum Champion
It would be really nice if the functionality of the --whisper tag was expanded to take additional values when 'self' is present, e.g. --whisper|self, gm --whisper|all would be awesome too (at least until PowerCards officially supports inline Markdown images and API Command Buttons).
1448010815
Gen Kitty
Forum Champion
Phoxounet said: Whispers could be a nice idea but I need to see these cards too, and I need to keep the chat quiet :p Having a handout or a character sheet poping up is not what I suggested, actually. The idea is to have the result of the powercard appear as a zoomed image as we can do with images. Honeybadger doesn't have a lot of time for coding right now, so we're trying to give you workarounds that might approximate what you want.&nbsp; You might be able to get something similar by using card decks .&nbsp; I suspect that Honeybadger'll tell you that having powercards appear like images isn't something the API is set up to handle and this may need to go to the Suggestions & Ideas forum, which is based on voting from the whole community. You might review the Forum Voting wiki page for more information on how voting works, and the Suggestions & Ideas Posting Guidelines for the added expectations above and beyond our standard Code of Conduct .
Actually you should already be able to use --whisper|self,gm. If not, that would be easy to fix. I will try to get a small update out this weekend, updating some of the minor nuisances that people have been asking about.
1448022238
Phoxounet
Sheet Author
Translator
Thx all of you for your answers. :) I already checked the card decks. For now, I am using handouts and skills scans. I made powercards and my players really enjoy them. This is why I wanted to propose them a solution so that the chat can stay readable. :) I'll give /self a try and we'll see if it does the trick. ;) Thx again ! :)
Phoxounet said: Thx all of you for your answers. :) I already checked the card decks. For now, I am using handouts and skills scans. I made powercards and my players really enjoy them. This is why I wanted to propose them a solution so that the chat can stay readable. :) I'll give /self a try and we'll see if it does the trick. ;) Thx again ! :) No, not /self. &nbsp;Try --whisper|self,gm
1448034049

Edited 1448034185
Is it possible to nest conditionals (like a nested "IF-ELSE")?&nbsp; I've got the following snippet in a PowerCard macro.&nbsp; What I want to have happen is to have no attack happen at all if a PC were to run out of ammo.&nbsp; The "@(rangedammo1} - 1" is just there to make sure the value displays correctly.&nbsp; Although, I still have to figure out how to keep it from showing "-1" when the ammo is at zero.&nbsp; I'm using Aaron's Ammo API script to adjust an attribute for the ammo.&nbsp; Here's what I've got, but I know it is wrong since it does not work and still tries to make the attack.&nbsp; Thanks! --Ammo:|[[ [$Ammo] @{rangedammo1} - 1]] out of [[@{rangedammo1|max}]] --?? $Ammo.total &lt;= 0 ?? No Ammo:|You are out of ammo for your @{rangedweaponname1}! --?? $Ammo.total &gt;= 1 ?? Attack:|[[ [$Atk] @{AdvDisadv} + @{dexterity_mod} + @{PB} ]] vs AC --?? $Atk.total &lt; @{target|npc_AC} AND $Atk.base &lt;&gt; 1 AND $Atk.base &lt;&gt; 20 ?? Miss:|The attack missed! --?? $Atk.base == 1 ?? Critical Miss:|The attack was fumbled! --?? $Atk.total &gt;= @{target|npc_AC} AND $Atk.base &lt;&gt; 1 AND $Atk.base &lt;&gt; 20 ?? Hit:|You hit for [[ @{rangeddmg1} + @{dexterity_mod} ]] @{rangeddmgtype1} damage! --?? $Atk.base == 20 ?? Critical Hit:|You decimate your target for [[ (@{rangeddmg1} + @{dexterity_mod}) * 2 ]] @{rangeddmgtype1} damage!
Can't nest, but you can just add AND $Ammo.total &gt;= 1 to the attack roll lines.