Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
Advertisement Create a free account Compendium in Game, Join Today
This post has been closed. You can still view previous posts, but you can't post any new replies.

[Script] PowerCards 3 (Thread 4)

1491770522
Why does the 3D dice not roll in the power card macros?
1491770945
Because many of the features PowerCard offers are not compatible with how Roll20 interacts with messages sent from the API. I have not been able to find a way to make sendChat ({}, {use3d: true}) to work with PowerCards.
1491773237
Silvyre said: Enjoying the miscellaneous upgrades I'm discovering! I noticed this, though: April 9th, 2017 ~ 10:30 am eastern Version: 3.4.2 Link: <a href="https://gist.github.com/Sky-Captain-13/452330a3d9" rel="nofollow">https://gist.github.com/Sky-Captain-13/452330a3d9</a>... Bugfix: Fixed missing borders on single row powercards with or without a titlebox.
1491773806
Silvyre
Forum Champion
Thanks!
1491785436
Sky did you make changes to the default fonts and text? The text has a black outline and the color seem to have a fade now.&nbsp; Before After update:
1491786188
Yeah, I did. The font and stuff you can change as normal in the script settings.
1491787719
Sky said: Yeah, I did. The font and stuff you can change as normal in the script settings. How do i change it back and what were the settings to change it back 2 ?
1491788284
The settings are near the top of the script.
1491789333

Edited 1491789395
Silvyre
Forum Champion
Stumbled upon some buggy weirdness with multiple [^ID.base], [^ID.ss] and [^ID.ones]: !power {{ --!| [[ [$R] 10d6&gt;5cs&gt;5kh2 ]] -- This | [^R.base] [^R.base] [^R.base] [^R.base] [^R.base] [^R.base] [^R.base] [^R.base]... -- Looks almost like this | [^R.base] [^R.ss] [^R.ones] [^R] [^R.base] [^R.ss] [^R.ones] [^R]... }} !power --!|[[ [$R] d1&lt;0 ]] --!!|[^R.base] [^R.base] [^R.base] [^R.base] [^R.base] [^R.base] [^R.base] [^R.base] [^R.base]... // 1 0 1 0 1 0 1 0 1... !power --!|[[ [$R] d1&lt;0 ]] --!!|[^R.ones] [^R.ones] [^R.ones] [^R.ones] [^R.ones] [^R.ones] [^R.ones] [^R.ones] [^R.ones]... // 1 0 1 0 1 0 1 0 1... !power --!|[[ [$R] d1&lt;0 ]] --!!|[^R.ss] [^R.ss] [^R.ss] [^R.ss] [^R.ss] [^R.ss] [^R.ss] [^R.ss] [^R.ss]... // 0 1 0 0 1 0 0 1 0...
1491792618
Script is crashing and not sure why. TypeError: Cannot read property 'icon' of undefined TypeError: Cannot read property 'icon' of undefined at statusSymbol (apiscript.js:3114:50) at RegExp.[Symbol.replace] (native) at String.replace (native) at formatter (apiscript.js:3155:18) at doInlineFormatting (apiscript.js:3189:11) at apiscript.js:2773:23 at Array.forEach (native) at apiscript.js:2771:14 at checkFinishedOps (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:150:1), &lt;anonymous&gt;:751:7) at eval (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:150:1), &lt;anonymous&gt;:831:8)
1491792714
Silvyre
Forum Champion
Is a specific macro making it crash?
1491796279
I am building macros and I add a status to the handout PowerCard Status List Example Paralyzed|aura Then in then macro --Paralyzed|[+Paralyzed] or --Paralyzed|[+aura] I am saving the handout before testing.
1491817559
What are you putting into the handout? For example, this is the format for handout status effect definitions: dazed|half-haze|The creature is unable to act normally. A dazed creature can take no actions, but has no penalty to AC. !power --Dazed:|[+dazed]
1491817856
Silvyre said: Stumbled upon some buggy weirdness with multiple [^ID.base], [^ID.ss] and [^ID.ones]: !power {{ --!| [[ [$R] 10d6&gt;5cs&gt;5kh2 ]] -- This | [^R.base] [^R.base] [^R.base] [^R.base] [^R.base] [^R.base] [^R.base] [^R.base]... -- Looks almost like this | [^R.base] [^R.ss] [^R.ones] [^R] [^R.base] [^R.ss] [^R.ones] [^R]... }} !power --!|[[ [$R] d1&lt;0 ]] --!!|[^R.base] [^R.base] [^R.base] [^R.base] [^R.base] [^R.base] [^R.base] [^R.base] [^R.base]... // 1 0 1 0 1 0 1 0 1... !power --!|[[ [$R] d1&lt;0 ]] --!!|[^R.ones] [^R.ones] [^R.ones] [^R.ones] [^R.ones] [^R.ones] [^R.ones] [^R.ones] [^R.ones]... // 1 0 1 0 1 0 1 0 1... !power --!|[[ [$R] d1&lt;0 ]] --!!|[^R.ss] [^R.ss] [^R.ss] [^R.ss] [^R.ss] [^R.ss] [^R.ss] [^R.ss] [^R.ss]... // 0 1 0 0 1 0 0 1 0... o_0 That's gonna be fun to track down.
1491818929

Edited 1491819883
Craven . said: Sky did you make changes to the default fonts and text? The text has a black outline and the color seem to have a fade now.&nbsp; Before After update: You can also add&nbsp;--titlefontshadow|none to your powercard macros or format|default to remove the text outline. Or you could define your own text shadow as per the CSS/HTML guidelines for text shadows here &gt;&gt;&nbsp; <a href="https://www.w3schools.com/cssref/css3_pr_text-shadow.asp" rel="nofollow">https://www.w3schools.com/cssref/css3_pr_text-shadow.asp</a> --titlebackground|none will remove the color fade from the title box as well. You could also specify your own background there, including an image I think. I haven't actually tested that as they were something I was messing around with and forgot about... when I uploaded the latest update to gist.
1491820709
Sky said: Silvyre said: Stumbled upon some buggy weirdness with multiple [^ID.base], [^ID.ss] and [^ID.ones]: !power {{ --!| [[ [$R] 10d6&gt;5cs&gt;5kh2 ]] -- This | [^R.base] [^R.base] [^R.base] [^R.base] [^R.base] [^R.base] [^R.base] [^R.base]... -- Looks almost like this | [^R.base] [^R.ss] [^R.ones] [^R] [^R.base] [^R.ss] [^R.ones] [^R]... }} !power --!|[[ [$R] d1&lt;0 ]] --!!|[^R.base] [^R.base] [^R.base] [^R.base] [^R.base] [^R.base] [^R.base] [^R.base] [^R.base]... // 1 0 1 0 1 0 1 0 1... !power --!|[[ [$R] d1&lt;0 ]] --!!|[^R.ones] [^R.ones] [^R.ones] [^R.ones] [^R.ones] [^R.ones] [^R.ones] [^R.ones] [^R.ones]... // 1 0 1 0 1 0 1 0 1... !power --!|[[ [$R] d1&lt;0 ]] --!!|[^R.ss] [^R.ss] [^R.ss] [^R.ss] [^R.ss] [^R.ss] [^R.ss] [^R.ss] [^R.ss]... // 0 1 0 0 1 0 0 1 0... o_0 That's gonna be fun to track down. Why you gotta break all my shit? ; _ ; I have no idea how it is doing what it is doing when it starts replacing all those roll id's in the same line. I need better regex skills.
1491824564
April 10th, 2017 ~ 7:40 am eastern Version: 3.4.3a - Guilty Spark Link: <a href="https://gist.github.com/Sky-Captain-13/452330a3d9" rel="nofollow">https://gist.github.com/Sky-Captain-13/452330a3d9</a>... Bugfix: Re-wrote logic for searching and replacing RollID's and the different options when multiple instances were used in the same line, such as [^R.base] [^R.ones] [^R.total] Update: --titlefontshadow| can be used to add shadows or colored outlines around the name of the powercard using the CSS text-shadow properties. This defaults to either a black outline or white outline based on player color and can be removed using --titlefontshadow|none Update: --titlebackground| can possibly be used to add images (untested), using the css background properties. It defaults to a linear gradient from white to transparent which can be removed with --titlebackground|none. Adding an image this way to the top of the powercard is entirely untested and not supported. I only added it to fade the color from light to dark.
1491844126
Sky said: What are you putting into the handout? For example, this is the format for handout status effect definitions: dazed|half-haze|The creature is unable to act normally. A dazed creature can take no actions, but has no penalty to AC. !power --Dazed:|[+dazed] yes
1491854341
Try removing everything from the handout, copying it to a blank txt file, and then pasting it back in. Sometimes weird formatting characters get in there and mess it up. Only thing I can think of.
1491855262
Silvyre
Forum Champion
Sky said: April 10th, 2017 ~ 7:40 am eastern Version: 3.4.3a - Guilty Spark Link: <a href="https://gist.github.com/Sky-Captain-13/452330a3d9" rel="nofollow">https://gist.github.com/Sky-Captain-13/452330a3d9</a>... Bugfix: Re-wrote logic for searching and replacing RollID's and the different options when multiple instances were used in the same line, such as [^R.base] [^R.ones] [^R.total] Update: --titlefontshadow| can be used to add shadows or colored outlines around the name of the powercard using the CSS text-shadow properties. This defaults to either a black outline or white outline based on player color and can be removed using --titlefontshadow|none Update: --titlebackground| can possibly be used to add images (untested), using the css background properties. It defaults to a linear gradient from white to transparent which can be removed with --titlebackground|none. Adding an image this way to the top of the powercard is entirely untested and not supported. I only added it to fade the color from light to dark. Nice updates! Looks like you nailed down the [^R.ones]! My main issue at the moment is with plain old [^R], which is not quite whipped into shape yet. I typically pass more than one [^ID] to a single Command Buttons (which unfortunately cannot be spread out across multiple tags), e.g. !power {{ --Roll|[[ [$R] {1} ]] --!|[Should equal 2...](!&amp;#13; &amp;#91;[ [^R] + [^R] ]&amp;#93;) }} I have workarounds up my sleeve, of course, but I would greatly appreciate if [^R]'s (and maybe [^R.ss]'s)&nbsp;reg exps could function as well as [^R.ones]'s does now. My macros and I thank you for all of your efforts!!
1491889310
Here is what I am trying to do. I have set symbols as in the chart below. Some of the symbols I use twice as in the example Frightened and Rage. Rage has the little 1 and Frightened doesn't. Is there a way I can add the one to the command --Fightened|[+Afraid] ? So it show like in the first picture. The Macro I use to set the 1 is from Token Mod !token-mod --set statusmarkers|screaming:1 Powercard Macro to show the list. !power {{ &nbsp; --corners|10 --format|GM --name|**Condition Symbols** --leftsub| **Meaning of the Symbols.** --Blessed|[+Bless] --Blind|[+Blind] --Charmed|[+Charmed] --Deafened|[+Deaf] --Frightened|[+Afraid], **1-Rage**, --Grappled|[+Grap] --Invisible|[+Invis] --Paralyzed|[+Paralyzed], **1-Petrified**, --Poisoned|[+Poison] --Prone|[+Prone] --Restrained|[+Restrained] --Stunned|[+Stunned], **1-Unconscoius**, }} This is what the handout looks like for the PowerCard Status List Bless|angel-outfit Rage|screaming Blind|bleeding-eye Charmed|chained-heart Dead|dead Afraid|screaming Deaf|interdiction Grap|grab Invis|ninja-mask Paralyzed|aura Petrified|aura Poison|skull Prone|back-pain Restrained|fishing-net Stunned|sleepy Unconscious|sleepy
1491891357

Edited 1491891555
Silvyre said: Nice updates! Looks like you nailed down the [^R.ones]! My main issue at the moment is with plain old [^R], which is not quite whipped into shape yet. I typically pass more than one [^ID] to a single Command Buttons (which unfortunately cannot be spread out across multiple tags), e.g. !power {{ --Roll|[[ [$R] {1} ]] --!|[Should equal 2...](! [[ [^R] + [^R] ]]) }} I have workarounds up my sleeve, of course, but I would greatly appreciate if [^R]'s (and maybe [^R.ss]'s)&nbsp;reg exps could function as well as [^R.ones]'s does now. My macros and I thank you for all of your efforts!! Hrm, they should all work. The only regex is to find the [^?] information and then it just loops through each one. I will futz around again with it and see why it is not doing [^R] multiples properly.
1491891906
Try removing Dead|dead from the status icon list Craven. Otherwise I'll try and figure out what's wrong on my next day off.
1491910542
Craven . said: Here is what I am trying to do. I have set symbols as in the chart below. Some of the symbols I use twice as in the example Frightened and Rage. Rage has the little 1 and Frightened doesn't. Is there a way I can add the one to the command --Fightened|[+Afraid] ? So it show like in the first picture. The Macro I use to set the 1 is from Token Mod !token-mod --set statusmarkers|screaming:1 Powercard Macro to show the list. !power {{ &nbsp; --corners|10 --format|GM --name|**Condition Symbols** --leftsub| **Meaning of the Symbols.** --Blessed|[+Bless] --Blind|[+Blind] --Charmed|[+Charmed] --Deafened|[+Deaf] --Frightened|[+Afraid], **1-Rage**, --Grappled|[+Grap] --Invisible|[+Invis] --Paralyzed|[+Paralyzed], **1-Petrified**, --Poisoned|[+Poison] --Prone|[+Prone] --Restrained|[+Restrained] --Stunned|[+Stunned], **1-Unconscoius**, }} This is what the handout looks like for the PowerCard Status List Bless|angel-outfit Rage|screaming Blind|bleeding-eye Charmed|chained-heart Dead|dead Afraid|screaming Deaf|interdiction Grap|grab Invis|ninja-mask Paralyzed|aura Petrified|aura Poison|skull Prone|back-pain Restrained|fishing-net Stunned|sleepy Unconscious|sleepy This looks interesting, how do you set something like this up?
1491915899
Feh... somehow a single .replace is messing with both instances of [^R] in the string. It replaces the first instance with 1 and then replaces the second with 0. If I add a third [^R] it replaces that one the right way. &gt;_&lt; Every other one is being replaced right and then each one after that wrong. &nbsp; &nbsp; &nbsp; &nbsp; _.each(RollIDs, function(r) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rCount++; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rID = r.split(".")[0].split("[^")[1].replace("]", ""); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rOpt = (r.split(".")[1] !== undefined) ? r.split(".")[1].replace("]", "") : "total"; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (Rolls["$" + rID]) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; switch (rOpt) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case "base": &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; content = content.replace(r, Rolls["$" + rID].base); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case "total": &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; content = content.replace(r, Rolls["$" + rID].total); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case "ss": &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; content = content.replace(r, Rolls["$" + rID].successes); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case "ones": &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; content = content.replace(r, Rolls["$" + rID].ones); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; default: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; content = content.replace(r, " &gt; ROLL ID NOT FOUND &lt; "); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; });
1491916524
Duh, I bet it is because I need to add break; to each case. &gt;_&lt;
1491916586
Yup... that was it. Problem fixed. &gt;_&lt;
1491917035
April 11th, 2017 ~ 9:20 am eastern Version: 3.4.4 Link: <a href="https://gist.github.com/Sky-Captain-13/452330a3d9" rel="nofollow">https://gist.github.com/Sky-Captain-13/452330a3d9</a>... Bugfix: Fixed Silvyre's bug with multiple [^RollIDs] in the same tag/content.
1491931169
Jerry F. said: Craven . said: Here is what I am trying to do. I have set symbols as in the chart below. Some of the symbols I use twice as in the example Frightened and Rage. Rage has the little 1 and Frightened doesn't. Is there a way I can add the one to the command --Fightened|[+Afraid] ? So it show like in the first picture. The Macro I use to set the 1 is from Token Mod !token-mod --set statusmarkers|screaming:1 Powercard Macro to show the list. !power {{ &nbsp; --corners|10 --format|GM --name|**Condition Symbols** --leftsub| **Meaning of the Symbols.** --Blessed|[+Bless] --Blind|[+Blind] --Charmed|[+Charmed] --Deafened|[+Deaf] --Frightened|[+Afraid], **1-Rage**, --Grappled|[+Grap] --Invisible|[+Invis] --Paralyzed|[+Paralyzed], **1-Petrified**, --Poisoned|[+Poison] --Prone|[+Prone] --Restrained|[+Restrained] --Stunned|[+Stunned], **1-Unconscoius**, }} This is what the handout looks like for the PowerCard Status List Bless|angel-outfit Rage|screaming Blind|bleeding-eye Charmed|chained-heart Dead|dead Afraid|screaming Deaf|interdiction Grap|grab Invis|ninja-mask Paralyzed|aura Petrified|aura Poison|skull Prone|back-pain Restrained|fishing-net Stunned|sleepy Unconscious|sleepy This looks interesting, how do you set something like this up? Hrs of work lol what do you need to know? You will need the power card API and Token-mod API. Both are awesome API's. IF we can get the 3D dice to work and add the little numbers on the symbols to the ones I use more then once it will be perfect. Also goes with the macro below. !power {{ --whisper|all --corners|10 --format|GM --name|Token Mod Lighting --leftsub|Set light sources --rightsub|Set Vision --Blind|~R [Set](!&#13;#ConditionBlindSet) [Remove](!&#13;#ConditionBlindRemove) ~R&nbsp;&nbsp; --Charmed|~R [Set](!&#13;#ConditionCharmedSet) [Remove](!&#13;#ConditionCharmedRemove) ~R --Deafened|~R [Set](!&#13;#ConditionDeafSet) [Remove](!&#13;#ConditionDeafRemove) ~R --Frightened|~R [Set](!&#13;#ConditionFrightenedSet) [Remove](!&#13;#ConditionFrightenedRemove) ~R --Grappled|~R [Set](!&#13;#ConditionGrappledSet) [Remove](!&#13;#ConditionGrappledRemove) ~R --Invisibility|~R [Set](!&#13;#ConditionInvisibilitySet) [Remove](!&#13;#ConditionInvisibilityRemove) ~R --Paralyzed|~R [Set](!&#13;#ConditionParalyzedSet) [Remove](!&#13;#ConditionParalyzedRemove) ~R --Petrified|~R [Set](!&#13;#ConditionPetrifiedSet) [Remove](!&#13;#ConditionPetrifiedRemove) ~R --Poisoned|~R [Set](!&#13;#ConditionPoisonedSet) [Remove](!&#13;#ConditionPoisonRemove) ~R --Prone|~R [Set](!&#13;#ConditionProneSet) [Remove](!&#13;#ConditionProneRemove) ~R --Restrained|~R [Set](!&#13;#ConditionRestrainedSet) [Remove](!&#13;#ConditionRestrainedRemove) ~R --Stunned|~R [Set](!&#13;#ConditionStunnedSet) [Remove](!&#13;#ConditionStunnedRemove) ~R --Unconscious|~R [Set](!&#13;#ConditionUnconsciousSet) [Remove](!&#13;#ConditionUnconsciousRemove) ~R --Darkvision|~R [Set](!&#13;#Darkvision) ~R&nbsp;&nbsp; --Blind Sight|~R [Set](!&#13;#BlindSight) }} ~R Then when you click on the token a press set you get and remove. Stunned !token-mod {{ --set statusmarkers|sleepy }} !power {{&nbsp;&nbsp; --corners|10 --format|Conditions --name|Condition --leftsub|@{Selected|character_name} --rightsub|You are Stunned --Stunned|[+Stunned] • A stunned creature is incapacitated (see the condition), can’t move, and can speak only falteringly. • The creature automatically fails Strength and Dexterity saving throws. • Attack rolls against the creature have advantage. }} Removed !token-mod {{ --set statusmarkers|-sleepy }} !power {{&nbsp;&nbsp; --corners|10 --format|Conditions --name|Condition --leftsub|@{Selected|character_name} --rightsub|Removed! --Stunned|[+Stunned] • You shake your head. You are no longer stunned.&nbsp;&nbsp; }} This took a lot of work but was loads of fun.
1491941329
Silvyre
Forum Champion
Sky said: April 11th, 2017 ~ 9:20 am eastern Version: 3.4.4 Link: <a href="https://gist.github.com/Sky-Captain-13/452330a3d9" rel="nofollow">https://gist.github.com/Sky-Captain-13/452330a3d9</a>... Bugfix: Fixed Silvyre's bug with multiple [^RollIDs] in the same tag/content. It works! Awesome! :D Thanks!
1492076495

Edited 1492076580
Phoxounet
Sheet Author
Translator
Hi there ! Made a simple powercard to evaluate impact force and potential damages.&nbsp; !power {{ --corners|10 --name|Impact --leftsub|Distance --rightsub|Dégâts Potentiels --Force de l'Impact :| [[?{Impact}]] --Marge d'Echec :| [[?{Marge}]] --?? ?{Impact} &lt;= 9 AND ?{Marge} == -1 ?? Distance :| 1-3m ^^ **Dégâts :** NA --?? ?{Impact} &lt;= 9 AND ?{Marge} == -2 ?? Distance :| 2-4m ^^ **Dégâts :** NA --?? ?{Impact} &lt;= 9 AND ?{Marge} == -3 ?? Distance :| 3-6m ^^ **Dégâts :** NA --?? ?{Impact} &lt;= 9 AND ?{Marge} == -4 ?? Distance :| 3-6m ^^ **Dégâts :** NA --?? ?{Impact} &lt;= 9 AND ?{Marge} == -5 ?? Distance :| 5-10m ^^ **Dégâts :** NA --?? ?{Impact} &lt;= 9 AND ?{Marge} == -6 ?? Distance :| 5-10m ^^ **Dégâts :** NA --?? ?{Impact} &lt;= 9 AND ?{Marge} == -7 ?? Distance :| 7-15m ^^ **Dégâts :** NA --?? ?{Impact} &lt;= 9 AND ?{Marge} == -8 ?? Distance :| 7-15m ^^ **Dégâts :** NA --?? ?{Impact} &lt;= 9 AND ?{Marge} &lt;= -9 ?? Distance :| 10-20m ^^ **Dégâts :** 5 * 10 pts de Dégâts --?? ?{Impact} &lt;= 12 AND ?{Impact} &gt;= 10 AND ?{Marge} == -1 ?? Distance :| 5-10m ^^ **Dégâts :** NA --?? ?{Impact} &lt;= 12 AND ?{Impact} &gt;= 10 AND ?{Marge} == -2 ?? Distance :| 7-15m ^^ **Dégâts :** NA --?? ?{Impact} &lt;= 12 AND ?{Impact} &gt;= 10 AND ?{Marge} == -3 ?? Distance :| 10-20m ^^ **Dégâts :** 5-10 pts de Dégâts --?? ?{Impact} &lt;= 12 AND ?{Impact} &gt;= 10 AND ?{Marge} == -4 ?? Distance :| 10-20m ^^ **Dégâts :** 5-10 pts de Dégâts --?? ?{Impact} &lt;= 12 AND ?{Impact} &gt;= 10 AND ?{Marge} == -5 ?? Distance :| 15-25m ^^ **Dégâts :** 5-10 pts de Dégâts --?? ?{Impact} &lt;= 12 AND ?{Impact} &gt;= 10 AND ?{Marge} == -6 ?? Distance :| 15-25m ^^ **Dégâts :** 5-10 pts de Dégâts --?? ?{Impact} &lt;= 12 AND ?{Impact} &gt;= 10 AND ?{Marge} == -7 ?? Distance :| 20-35m ^^ **Dégâts :** 5-10 pts de Dégâts --?? ?{Impact} &lt;= 12 AND ?{Impact} &gt;= 10 AND ?{Marge} == -8 ?? Distance :| 20-35m ^^ **Dégâts :** 5-10 pts de Dégâts --?? ?{Impact} &lt;= 12 AND ?{Impact} &gt;= 10 AND ?{Marge} &lt;= -9 ?? Distance :| 30-50m ^^ **Dégâts :** 5-10 pts de Dégâts --?? ?{Impact} &lt;= 14 AND ?{Impact} &gt;= 13 AND ?{Marge} == -1 ?? Distance :| 10-15m ^^ **Dégâts :** 5-10 pts de Dégâts --?? ?{Impact} &lt;= 14 AND ?{Impact} &gt;= 13 AND ?{Marge} == -2 ?? Distance :| 15-30m ^^ **Dégâts :** 5-10 pts de Dégâts --?? ?{Impact} &lt;= 14 AND ?{Impact} &gt;= 13 AND ?{Marge} == -3 ?? Distance :| 30-50m ^^ **Dégâts :** 10-50 pts de Dégâts --?? ?{Impact} &lt;= 14 AND ?{Impact} &gt;= 13 AND ?{Marge} == -4 ?? Distance :| 13-20m ^^ **Dégâts :** 10-50 pts de Dégâts --?? ?{Impact} &lt;= 14 AND ?{Impact} &gt;= 13 AND ?{Marge} == -5 ?? Distance :| 15-25m ^^ **Dégâts :** 10-50 pts de Dégâts --?? ?{Impact} &lt;= 14 AND ?{Impact} &gt;= 13 AND ?{Marge} == -6 ?? Distance :| 15-25m ^^ **Dégâts :** 10-50 pts de Dégâts --?? ?{Impact} &lt;= 14 AND ?{Impact} &gt;= 13 AND ?{Marge} == -7 ?? Distance :| 20-35m ^^ **Dégâts :** 10-50 pts de Dégâts --?? ?{Impact} &lt;= 14 AND ?{Impact} &gt;= 13 AND ?{Marge} == -8 ?? Distance :| 20-35m ^^ **Dégâts :** 10-50 pts de Dégâts --?? ?{Impact} &lt;= 14 AND ?{Impact} &gt;= 13 AND ?{Marge} &lt;= -9 ?? Distance :| 20-50m ^^ **Dégâts :** 50-100 pts de Dégâts --?? ?{Impact} &lt;= 16 AND ?{Impact} &gt;= 15 AND ?{Marge} == -1 ?? Distance :| 15-30m ^^ **Dégâts :** 5-10 pts de Dégâts --?? ?{Impact} &lt;= 16 AND ?{Impact} &gt;= 15 AND ?{Marge} == -2 ?? Distance :| 30-50m ^^ **Dégâts :** 10-50 pts de Dégâts --?? ?{Impact} &lt;= 16 AND ?{Impact} &gt;= 15 AND ?{Marge} == -3 ?? Distance :| 50-100m ^^ **Dégâts :** 10-50 pts de Dégâts --?? ?{Impact} &lt;= 16 AND ?{Impact} &gt;= 15 AND ?{Marge} == -4 ?? Distance :| 50-100m ^^ **Dégâts :** 10-50 pts de Dégâts --?? ?{Impact} &lt;= 16 AND ?{Impact} &gt;= 15 AND ?{Marge} == -5 ?? Distance :| 100-200m ^^ **Dégâts :** 50-100 pts de Dégâts --?? ?{Impact} &lt;= 16 AND ?{Impact} &gt;= 15 AND ?{Marge} == -6 ?? Distance :| 100-200m ^^ **Dégâts :** 50-100 pts de Dégâts --?? ?{Impact} &lt;= 16 AND ?{Impact} &gt;= 15 AND ?{Marge} == -7 ?? Distance :| 200-500m ^^ **Dégâts :** 50-100 pts de Dégâts --?? ?{Impact} &lt;= 16 AND ?{Impact} &gt;= 15 AND ?{Marge} == -8 ?? Distance :| 200-500m ^^ **Dégâts :** 50-100 pts de Dégâts --?? ?{Impact} &lt;= 16 AND ?{Impact} &gt;= 15 AND ?{Marge} &lt;= -9 ?? Distance :| 500m-1Km ^^ **Dégâts :** 50-100 pts de Dégâts --?? ?{Impact} &lt;= 18 AND ?{Impact} &gt;= 17 AND ?{Marge} == -1 ?? Distance :| 30-50m ^^ **Dégâts :** 10-50 pts de Dégâts --?? ?{Impact} &lt;= 18 AND ?{Impact} &gt;= 17 AND ?{Marge} == -2 ?? Distance :| 50-150m ^^ **Dégâts :** 10-50 pts de Dégâts --?? ?{Impact} &lt;= 18 AND ?{Impact} &gt;= 17 AND ?{Marge} == -3 ?? Distance :| 150-500m ^^ **Dégâts :** 50-100 pts de Dégâts --?? ?{Impact} &lt;= 18 AND ?{Impact} &gt;= 17 AND ?{Marge} == -4 ?? Distance :| 150-500m ^^ **Dégâts :** 50-100 pts de Dégâts --?? ?{Impact} &lt;= 18 AND ?{Impact} &gt;= 17 AND ?{Marge} == -5 ?? Distance :| 500m-1Km ^^ **Dégâts :** 50-100 pts de Dégâts --?? ?{Impact} &lt;= 18 AND ?{Impact} &gt;= 17 AND ?{Marge} == -6 ?? Distance :| 500m-1Km ^^ **Dégâts :** 50-100 pts de Dégâts --?? ?{Impact} &lt;= 18 AND ?{Impact} &gt;= 17 AND ?{Marge} == -7 ?? Distance :| 1-5Km ^^ **Dégâts :** 100-250 pts de Dégâts --?? ?{Impact} &lt;= 18 AND ?{Impact} &gt;= 17 AND ?{Marge} == -8 ?? Distance :| 1-5Km ^^ **Dégâts :** 100-250 pts de Dégâts --?? ?{Impact} &lt;= 18 AND ?{Impact} &gt;= 17 AND ?{Marge} &lt;= -9 ?? Distance :| 5-25Km ^^ **Dégâts :** 100-250 pts de Dégâts --?? ?{Impact} &lt;= 20 AND ?{Impact} &gt;= 19 AND ?{Marge} == -1 ?? Distance :| 50-100m ^^ **Dégâts :** 50-100 pts de Dégâts **(GM)** --?? ?{Impact} &lt;= 20 AND ?{Impact} &gt;= 19 AND ?{Marge} == -2 ?? Distance :| 100-500m ^^ **Dégâts :** 50-100 pts de Dégâts **(GM)** --?? ?{Impact} &lt;= 20 AND ?{Impact} &gt;= 19 AND ?{Marge} == -3 ?? Distance :| 500m-1Km ^^ **Dégâts :** 50-100 pts de Dégâts **(GM)** --?? ?{Impact} &lt;= 20 AND ?{Impact} &gt;= 19 AND ?{Marge} == -4 ?? Distance :| 500m-1Km ^^ **Dégâts :** 50-100 pts de Dégâts **(GM)** --?? ?{Impact} &lt;= 20 AND ?{Impact} &gt;= 19 AND ?{Marge} == -5 ?? Distance :| 1-5Km ^^ **Dégâts :** 100-250 pts de Dégâts **(GM)** --?? ?{Impact} &lt;= 20 AND ?{Impact} &gt;= 19 AND ?{Marge} == -6 ?? Distance :| 1-5Km ^^ **Dégâts :** 100-250 pts de Dégâts **(GM)** --?? ?{Impact} &lt;= 20 AND ?{Impact} &gt;= 19 AND ?{Marge} == -7 ?? Distance :| 5-25Km ^^ **Dégâts :** 100-250 pts de Dégâts **(GM)** --?? ?{Impact} &lt;= 20 AND ?{Impact} &gt;= 19 AND ?{Marge} == -8 ?? Distance :| 5-25Km ^^ **Dégâts :** 100-250 pts de Dégâts **(GM)** --?? ?{Impact} &lt;= 20 AND ?{Impact} &gt;= 19 AND ?{Marge} &lt;= -9 ?? Distance :| 25+ Km ^^ **Dégâts :** 100-250 pts de Dégâts **(GM)** }} Everything is ok for impact values ranging from 1 to 16. For impact values equal to 17 and beyond, the conditional appears to stop working and I can't see why &gt;&lt;&nbsp; help welcomed :) Thx ! :)
1492090737

Edited 1492091458
Silvyre
Forum Champion
Phoxounet said: For impact values equal to 17 and beyond, the conditional appears to stop working and I can't see why &gt;&lt; There's a limit on how many Roll Queries will work when entered at the same time: 100. You can work around this by reducing the amount of Roll Queries your macro uses: !power {{ --corners|10 --name|Impact --leftsub|Distance --rightsub|Dégâts Potentiels --Force de l'Impact :| [! ?{Impact|1-9|10-12|13-14|15-16|17-18|19-20} !] --Marge d'Echec :| [! ?{Marge|-1|-2|-3/-4|-5/-6|-7/-8|-9} !] --?? ?{Impact} == 1-9 AND ?{Marge} == -1 ?? Distance :| 1-3m ^^ **Dégâts :** NA --?? ?{Impact} == 1-9 AND ?{Marge} == -2 ?? Distance :| 2-4m ^^ **Dégâts :** NA --?? ?{Impact} == 1-9 AND ?{Marge} == -3/-4 ?? Distance :| 3-6m ^^ **Dégâts :** NA --?? ?{Impact} == 1-9 AND ?{Marge} == -5/-6 ?? Distance :| 5-10m ^^ **Dégâts :** NA --?? ?{Impact} == 1-9 AND ?{Marge} == -7/-8 ?? Distance :| 7-15m ^^ **Dégâts :** NA --?? ?{Impact} == 1-9 AND ?{Marge} == -9 ?? Distance :| 10-20m ^^ **Dégâts :** 5-10 pts de Dégâts --?? ?{Impact} == 10-12 AND ?{Marge} == -1 ?? Distance :| 5-10m ^^ **Dégâts :** NA --?? ?{Impact} == 10-12 AND ?{Marge} == -2 ?? Distance :| 7-15m ^^ **Dégâts :** NA --?? ?{Impact} == 10-12 AND ?{Marge} == -3/-4 ?? Distance :| 10-20m ^^ **Dégâts :** 5-10 pts de Dégâts --?? ?{Impact} == 10-12 AND ?{Marge} == -5/-6 ?? Distance :| 15-25m ^^ **Dégâts :** 5-10 pts de Dégâts --?? ?{Impact} == 10-12 AND ?{Marge} == -7/-8 ?? Distance :| 20-35m ^^ **Dégâts :** 5-10 pts de Dégâts --?? ?{Impact} == 10-12 AND ?{Marge} == -9 ?? Distance :| 30-50m ^^ **Dégâts :** 5-10 pts de Dégâts --?? ?{Impact} == 13-14 AND ?{Marge} == -1 ?? Distance :| 10-15m ^^ **Dégâts :** 5-10 pts de Dégâts --?? ?{Impact} == 13-14 AND ?{Marge} == -2 ?? Distance :| 15-30m ^^ **Dégâts :** 5-10 pts de Dégâts --?? ?{Impact} == 13-14 AND ?{Marge} == -3/-4 ?? Distance :| 30-50m ^^ **Dégâts :** 10-50 pts de Dégâts --?? ?{Impact} == 13-14 AND ?{Marge} == -5/-6 ?? Distance :| 15-25m ^^ **Dégâts :** 10-50 pts de Dégâts --?? ?{Impact} == 13-14 AND ?{Marge} == -7/-8 ?? Distance :| 20-35m ^^ **Dégâts :** 10-50 pts de Dégâts --?? ?{Impact} == 13-14 AND ?{Marge} == -9 ?? Distance :| 20-50m ^^ **Dégâts :** 50-100 pts de Dégâts --?? ?{Impact} == 15-16 AND ?{Marge} == -1 ?? Distance :| 15-30m ^^ **Dégâts :** 5-10 pts de Dégâts --?? ?{Impact} == 15-16 AND ?{Marge} == -2 ?? Distance :| 30-50m ^^ **Dégâts :** 10-50 pts de Dégâts --?? ?{Impact} == 15-16 AND ?{Marge} == -3/-4 ?? Distance :| 50-100m ^^ **Dégâts :** 10-50 pts de Dégâts --?? ?{Impact} == 15-16 AND ?{Marge} == -5/-6 ?? Distance :| 100-200m ^^ **Dégâts :** 50-100 pts de Dégâts --?? ?{Impact} == 15-16 AND ?{Marge} == -7/-8 ?? Distance :| 200-500m ^^ **Dégâts :** 50-100 pts de Dégâts --?? ?{Impact} == 15-16 AND ?{Marge} == -9 ?? Distance :| 500m-1Km ^^ **Dégâts :** 50-100 pts de Dégâts --?? ?{Impact} == 17-18 AND ?{Marge} == -1 ?? Distance :| 30-50m ^^ **Dégâts :** 10-50 pts de Dégâts --?? ?{Impact} == 17-18 AND ?{Marge} == -2 ?? Distance :| 50-150m ^^ **Dégâts :** 10-50 pts de Dégâts --?? ?{Impact} == 17-18 AND ?{Marge} == -3/-4 ?? Distance :| 150-500m ^^ **Dégâts :** 50-100 pts de Dégâts --?? ?{Impact} == 17-18 AND ?{Marge} == -5/-6 ?? Distance :| 500m-1Km ^^ **Dégâts :** 50-100 pts de Dégâts --?? ?{Impact} == 17-18 AND ?{Marge} == -7/-8 ?? Distance :| 1-5Km ^^ **Dégâts :** 100-250 pts de Dégâts --?? ?{Impact} == 17-18 AND ?{Marge} == -9 ?? Distance :| 5-25Km ^^ **Dégâts :** 100-250 pts de Dégâts --?? ?{Impact} == 19-20 AND ?{Marge} == -1 ?? Distance :| 50-100m ^^ **Dégâts :** 50-100 pts de Dégâts **(GM)** --?? ?{Impact} == 19-20 AND ?{Marge} == -2 ?? Distance :| 100-500m ^^ **Dégâts :** 50-100 pts de Dégâts **(GM)** --?? ?{Impact} == 19-20 AND ?{Marge} == -3/-4 ?? Distance :| 500m-1Km ^^ **Dégâts :** 50-100 pts de Dégâts **(GM)** --?? ?{Impact} == 19-20 AND ?{Marge} == -5/-6 ?? Distance :| 1-5Km ^^ **Dégâts :** 100-250 pts de Dégâts **(GM)** --?? ?{Impact} == 19-20 AND ?{Marge} == -7/-8 ?? Distance :| 5-25Km ^^ **Dégâts :** 100-250 pts de Dégâts **(GM)** --?? ?{Impact} == 19-20 AND ?{Marge} == -9 ?? Distance :| 25+ Km ^^ **Dégâts :** 100-250 pts de Dégâts **(GM)** }}
1492122235
Sky said: Because many of the features PowerCard offers are not compatible with how Roll20 interacts with messages sent from the API. I have not been able to find a way to make sendChat ({}, {use3d: true}) to work with PowerCards. Have you ask them for help maybe a Dev can look at it?
1492123130
Craven . said: Sky said: Because many of the features PowerCard offers are not compatible with how Roll20 interacts with messages sent from the API. I have not been able to find a way to make sendChat ({}, {use3d: true}) to work with PowerCards. Have you ask them for help maybe a Dev can look at it? The scripting required to send PowerCards to chat window as a formatted display is not compatible with the sendChat 3dDice function. THere's no way to make it work as is... and you can see how long it takes for any suggestions to get implemented.
1492124493
Sky said: Craven . said: Sky said: Because many of the features PowerCard offers are not compatible with how Roll20 interacts with messages sent from the API. I have not been able to find a way to make sendChat ({}, {use3d: true}) to work with PowerCards. Have you ask them for help maybe a Dev can look at it? The scripting required to send PowerCards to chat window as a formatted display is not compatible with the sendChat 3dDice function. THere's no way to make it work as is... and you can see how long it takes for any suggestions to get implemented. ok thanks
1492188486
Silvyre
Forum Champion
Noticing that inline rolls within subtitles are malformatted: !power --titlefontshadow|none --name|Test --leftsub|[[0]] Changing the inlinerollresult's display property from inline-block to inline seems like an easy fix:
1492193980
Yeah, but then the minimum-width doesn't work. Feh. That was why I had issues with changing line-height and such. &gt;_&lt;
1492196250
PowerCard. Using D&D 5e OGL sheet and trying to display the Spell save DC = 8 + your proficiency bonus + your Wisdom modifier and Spell Attack modifier = your proficiency bonus + your Wisdom modifier. Any ideas?
1492197543
**Spell Save DC** [[ 8 + [[@{pb}]] [Prof. Bonus] + @{wisdom_mod} [Wisdom Mod] ]] **Spell Attack Bonus**&nbsp;[[ [[@{pb}]] [Prof. Bonus] + @{wisdom_mod} [Wisdom Mod] ]]
1492202108
doesn't work I get d is undefined error for both.
1492207954
You may have to add @{selected|pb} instead if you're not using the powercard on a character sheet and running it from the collections tab.
1492223045
Sky said: You may have to add @{selected|pb} instead if you're not using the powercard on a character sheet and running it from the collections tab. Alright I had to add selected to both pb and wisdom_mod. Work in chat then I had to remove [Wisdom Mod] and [Prof. Bonus] to get it to work on the power card. Thanks for the help. Result
1492224773
Oh yeah... the labels only work if you add 0d0 + 8 + PB + WisMod. So it would need to be... [[ 0d0 + 8 + @{PB} [Prof. Bonus] + @{wisdom_mod} [Wis Mod] ]]
1492224986
Sky said: Oh yeah... the labels only work if you add 0d0 + 8 + PB + WisMod. So it would need to be... [[ 0d0 + 8 + @{PB} [Prof. Bonus] + @{wisdom_mod} [Wis Mod] ]] Do you know of a way to check if a spell is prepared and display it in powercards.
1492225733
Craven . said: Sky said: Oh yeah... the labels only work if you add 0d0 + 8 + PB + WisMod. So it would need to be... [[ 0d0 + 8 + @{PB} [Prof. Bonus] + @{wisdom_mod} [Wis Mod] ]] Do you know of a way to check if a spell is prepared and display it in powercards. You can always right click on anything on a character sheet and inspect the html for attributes. Any attribute will start with attr_ and can be displayed with @{} stuff that way.
1492227556
Sky said: Craven . said: Sky said: Oh yeah... the labels only work if you add 0d0 + 8 + PB + WisMod. So it would need to be... [[ 0d0 + 8 + @{PB} [Prof. Bonus] + @{wisdom_mod} [Wis Mod] ]] Do you know of a way to check if a spell is prepared and display it in powercards. You can always right click on anything on a character sheet and inspect the html for attributes. Any attribute will start with attr_ and can be displayed with @{} stuff that way. Thanks I got it to work with @{selected|repeating_spell-1_$1_spellprepared} which returns a 0 for no and 1 for yes. is there a way to change to 0 and 1 to symbols? Like a check for 1 and small empty box for 0?
1492228041

Edited 1492228089
Silvyre
Forum Champion
Craven . said: Thanks I got it to work with @{selected|repeating_spell-1_$1_spellprepared} which returns a 0 for no and 1 for yes. is there a way to change to 0 and 1 to symbols? Like a check for 1 and small empty box for 0? Can be done using an advanced technique . After creating the sel_prefix Attribute, create two additional Attributes (e.g. named prepsymbol-0 and prepsymbol-1) and add a symbol to the Current value of each. Then, use @{selected|sel_prefix}prepsymbol-@{selected|repeating_spell-1_$0_spellprepared}}
1492228761
Silvyre said: Craven . said: Thanks I got it to work with @{selected|repeating_spell-1_$1_spellprepared} which returns a 0 for no and 1 for yes. is there a way to change to 0 and 1 to symbols? Like a check for 1 and small empty box for 0? Can be done using an advanced technique . After creating the sel_prefix Attribute, create two additional Attributes (e.g. named prepsymbol-0 and prepsymbol-1) and add a symbol to the Current value of each. Then, use @{selected|sel_prefix}prepsymbol-@{selected|repeating_spell-1_$0_spellprepared}} What symbols can powercards use?