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

April 09 (7 years ago)
Why does the 3D dice not roll in the power card macros?

April 09 (7 years ago)
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.
April 09 (7 years ago)

Silvyre said:

Enjoying the miscellaneous upgrades I'm discovering!

I noticed this, though:


April 9th, 2017 ~ 10:30 am eastern
April 09 (7 years ago)
Thanks!
April 10 (7 years ago)
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. 
Before




After update:



April 10 (7 years ago)
Yeah, I did. The font and stuff you can change as normal in the script settings.
April 10 (7 years ago)

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 ?
April 10 (7 years ago)
The settings are near the top of the script.
April 10 (7 years ago)

Edited April 10 (7 years ago)
Stumbled upon some buggy weirdness with multiple [^ID.base], [^ID.ss] and [^ID.ones]:
!power {{ 
--!| [[ [$R] 10d6>5cs>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<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<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<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...
April 10 (7 years ago)
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 <anonymous> (/home/node/d20-api-server/api.js:150:1), <anonymous>:751:7)
    at eval (eval at <anonymous> (/home/node/d20-api-server/api.js:150:1), <anonymous>:831:8)


April 10 (7 years ago)
Is a specific macro making it crash?
April 10 (7 years ago)
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.


April 10 (7 years ago)
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]

April 10 (7 years ago)

Silvyre said:

Stumbled upon some buggy weirdness with multiple [^ID.base], [^ID.ss] and [^ID.ones]:
!power {{ 
--!| [[ [$R] 10d6>5cs>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<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<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<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.
April 10 (7 years ago)

Edited April 10 (7 years ago)

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. 
Before




After update:



You can also add --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 >> https://www.w3schools.com/cssref/css3_pr_text-shadow.asp

--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.
April 10 (7 years ago)

Sky said:

Silvyre said:

Stumbled upon some buggy weirdness with multiple [^ID.base], [^ID.ss] and [^ID.ones]:
!power {{ 
--!| [[ [$R] 10d6>5cs>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<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<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<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.
April 10 (7 years ago)
April 10th, 2017 ~ 7:40 am eastern
  • Version: 3.4.3a - Guilty Spark
  • Link: https://gist.github.com/Sky-Captain-13/452330a3d9...
  • 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.
April 10 (7 years ago)

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
April 10 (7 years ago)
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.
April 10 (7 years ago)

Sky said:

April 10th, 2017 ~ 7:40 am eastern
  • Version: 3.4.3a - Guilty Spark
  • Link: https://gist.github.com/Sky-Captain-13/452330a3d9...
  • 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...](!&#13; &#91;[ [^R] + [^R] ]&#93;) 
}}
I have workarounds up my sleeve, of course, but I would greatly appreciate if [^R]'s (and maybe [^R.ss]'s) reg exps could function as well as [^R.ones]'s does now.

My macros and I thank you for all of your efforts!!
April 11 (7 years ago)
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 {{  
--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


April 11 (7 years ago)

Edited April 11 (7 years ago)

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) 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.
April 11 (7 years ago)
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.

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 {{  
--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?
April 11 (7 years ago)
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. >_< Every other one is being replaced right and then each one after that wrong.

        _.each(RollIDs, function(r) {
            rCount++;
            rID = r.split(".")[0].split("[^")[1].replace("]", "");
            rOpt = (r.split(".")[1] !== undefined) ? r.split(".")[1].replace("]", "") : "total";
            if (Rolls["$" + rID]) {
                switch (rOpt) {
                    case "base":
                        content = content.replace(r, Rolls["$" + rID].base);
                    case "total":
                        content = content.replace(r, Rolls["$" + rID].total);
                    case "ss":
                        content = content.replace(r, Rolls["$" + rID].successes);
                    case "ones":
                        content = content.replace(r, Rolls["$" + rID].ones);
                    default:
                }
            } else {
                content = content.replace(r, " > ROLL ID NOT FOUND < ");
            }
        });
April 11 (7 years ago)
Duh, I bet it is because I need to add break; to each case. >_<
April 11 (7 years ago)
Yup... that was it. Problem fixed. >_<
April 11 (7 years ago)
April 11th, 2017 ~ 9:20 am eastern
April 11 (7 years ago)

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 {{  
--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](!
#ConditionBlindSet) [Remove](!
#ConditionBlindRemove) ~R  

--Charmed|~R [Set](!
#ConditionCharmedSet) [Remove](!
#ConditionCharmedRemove) ~R

--Deafened|~R [Set](!
#ConditionDeafSet) [Remove](!
#ConditionDeafRemove) ~R

--Frightened|~R [Set](!
#ConditionFrightenedSet) [Remove](!
#ConditionFrightenedRemove) ~R

--Grappled|~R [Set](!
#ConditionGrappledSet) [Remove](!
#ConditionGrappledRemove) ~R

--Invisibility|~R [Set](!
#ConditionInvisibilitySet) [Remove](!
#ConditionInvisibilityRemove) ~R

--Paralyzed|~R [Set](!
#ConditionParalyzedSet) [Remove](!
#ConditionParalyzedRemove) ~R

--Petrified|~R [Set](!
#ConditionPetrifiedSet) [Remove](!
#ConditionPetrifiedRemove) ~R

--Poisoned|~R [Set](!
#ConditionPoisonedSet) [Remove](!
#ConditionPoisonRemove) ~R

--Prone|~R [Set](!
#ConditionProneSet) [Remove](!
#ConditionProneRemove) ~R

--Restrained|~R [Set](!
#ConditionRestrainedSet) [Remove](!
#ConditionRestrainedRemove) ~R

--Stunned|~R [Set](!
#ConditionStunnedSet) [Remove](!
#ConditionStunnedRemove) ~R

--Unconscious|~R [Set](!
#ConditionUnconsciousSet) [Remove](!
#ConditionUnconsciousRemove) ~R

--Darkvision|~R [Set](!
#Darkvision) ~R  


--Blind Sight|~R [Set](!
#BlindSight) }} ~R



Then when you click on the token a press set you get and remove.




Stunned

!token-mod {{

--set

statusmarkers|sleepy

}}



!power {{  

--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 {{  

--corners|10

--format|Conditions

--name|Condition

--leftsub|@{Selected|character_name}

--rightsub|Removed!

--Stunned|[+Stunned] • You shake your head. You are no longer stunned.  

}}

This took a lot of work but was loads of fun.

April 11 (7 years ago)

Sky said:

April 11th, 2017 ~ 9:20 am eastern

It works! Awesome! :D Thanks!
April 13 (7 years ago)

Edited April 13 (7 years ago)
Phoxounet
Sheet Author
Translator
Hi there !

Made a simple powercard to evaluate impact force and potential damages. 
!power {{
--corners|10
--name|Impact
--leftsub|Distance
--rightsub|Dégâts Potentiels
--Force de l'Impact :| [[?{Impact}]]
--Marge d'Echec :| [[?{Marge}]]
--?? ?{Impact} <= 9 AND ?{Marge} == -1 ?? Distance :| 1-3m ^^ **Dégâts :** NA
--?? ?{Impact} <= 9 AND ?{Marge} == -2 ?? Distance :| 2-4m ^^ **Dégâts :** NA
--?? ?{Impact} <= 9 AND ?{Marge} == -3 ?? Distance :| 3-6m ^^ **Dégâts :** NA
--?? ?{Impact} <= 9 AND ?{Marge} == -4 ?? Distance :| 3-6m ^^ **Dégâts :** NA
--?? ?{Impact} <= 9 AND ?{Marge} == -5 ?? Distance :| 5-10m ^^ **Dégâts :** NA
--?? ?{Impact} <= 9 AND ?{Marge} == -6 ?? Distance :| 5-10m ^^ **Dégâts :** NA
--?? ?{Impact} <= 9 AND ?{Marge} == -7 ?? Distance :| 7-15m ^^ **Dégâts :** NA
--?? ?{Impact} <= 9 AND ?{Marge} == -8 ?? Distance :| 7-15m ^^ **Dégâts :** NA
--?? ?{Impact} <= 9 AND ?{Marge} <= -9 ?? Distance :| 10-20m ^^ **Dégâts :** 5 * 10 pts de Dégâts
--?? ?{Impact} <= 12 AND ?{Impact} >= 10 AND ?{Marge} == -1 ?? Distance :| 5-10m ^^ **Dégâts :** NA
--?? ?{Impact} <= 12 AND ?{Impact} >= 10 AND ?{Marge} == -2 ?? Distance :| 7-15m ^^ **Dégâts :** NA
--?? ?{Impact} <= 12 AND ?{Impact} >= 10 AND ?{Marge} == -3 ?? Distance :| 10-20m ^^ **Dégâts :** 5-10 pts de Dégâts
--?? ?{Impact} <= 12 AND ?{Impact} >= 10 AND ?{Marge} == -4 ?? Distance :| 10-20m ^^ **Dégâts :** 5-10 pts de Dégâts
--?? ?{Impact} <= 12 AND ?{Impact} >= 10 AND ?{Marge} == -5 ?? Distance :| 15-25m ^^ **Dégâts :** 5-10 pts de Dégâts
--?? ?{Impact} <= 12 AND ?{Impact} >= 10 AND ?{Marge} == -6 ?? Distance :| 15-25m ^^ **Dégâts :** 5-10 pts de Dégâts
--?? ?{Impact} <= 12 AND ?{Impact} >= 10 AND ?{Marge} == -7 ?? Distance :| 20-35m ^^ **Dégâts :** 5-10 pts de Dégâts
--?? ?{Impact} <= 12 AND ?{Impact} >= 10 AND ?{Marge} == -8 ?? Distance :| 20-35m ^^ **Dégâts :** 5-10 pts de Dégâts
--?? ?{Impact} <= 12 AND ?{Impact} >= 10 AND ?{Marge} <= -9 ?? Distance :| 30-50m ^^ **Dégâts :** 5-10 pts de Dégâts
--?? ?{Impact} <= 14 AND ?{Impact} >= 13 AND ?{Marge} == -1 ?? Distance :| 10-15m ^^ **Dégâts :** 5-10 pts de Dégâts
--?? ?{Impact} <= 14 AND ?{Impact} >= 13 AND ?{Marge} == -2 ?? Distance :| 15-30m ^^ **Dégâts :** 5-10 pts de Dégâts
--?? ?{Impact} <= 14 AND ?{Impact} >= 13 AND ?{Marge} == -3 ?? Distance :| 30-50m ^^ **Dégâts :** 10-50 pts de Dégâts
--?? ?{Impact} <= 14 AND ?{Impact} >= 13 AND ?{Marge} == -4 ?? Distance :| 13-20m ^^ **Dégâts :** 10-50 pts de Dégâts
--?? ?{Impact} <= 14 AND ?{Impact} >= 13 AND ?{Marge} == -5 ?? Distance :| 15-25m ^^ **Dégâts :** 10-50 pts de Dégâts
--?? ?{Impact} <= 14 AND ?{Impact} >= 13 AND ?{Marge} == -6 ?? Distance :| 15-25m ^^ **Dégâts :** 10-50 pts de Dégâts
--?? ?{Impact} <= 14 AND ?{Impact} >= 13 AND ?{Marge} == -7 ?? Distance :| 20-35m ^^ **Dégâts :** 10-50 pts de Dégâts
--?? ?{Impact} <= 14 AND ?{Impact} >= 13 AND ?{Marge} == -8 ?? Distance :| 20-35m ^^ **Dégâts :** 10-50 pts de Dégâts
--?? ?{Impact} <= 14 AND ?{Impact} >= 13 AND ?{Marge} <= -9 ?? Distance :| 20-50m ^^ **Dégâts :** 50-100 pts de Dégâts
--?? ?{Impact} <= 16 AND ?{Impact} >= 15 AND ?{Marge} == -1 ?? Distance :| 15-30m ^^ **Dégâts :** 5-10 pts de Dégâts
--?? ?{Impact} <= 16 AND ?{Impact} >= 15 AND ?{Marge} == -2 ?? Distance :| 30-50m ^^ **Dégâts :** 10-50 pts de Dégâts
--?? ?{Impact} <= 16 AND ?{Impact} >= 15 AND ?{Marge} == -3 ?? Distance :| 50-100m ^^ **Dégâts :** 10-50 pts de Dégâts
--?? ?{Impact} <= 16 AND ?{Impact} >= 15 AND ?{Marge} == -4 ?? Distance :| 50-100m ^^ **Dégâts :** 10-50 pts de Dégâts
--?? ?{Impact} <= 16 AND ?{Impact} >= 15 AND ?{Marge} == -5 ?? Distance :| 100-200m ^^ **Dégâts :** 50-100 pts de Dégâts
--?? ?{Impact} <= 16 AND ?{Impact} >= 15 AND ?{Marge} == -6 ?? Distance :| 100-200m ^^ **Dégâts :** 50-100 pts de Dégâts
--?? ?{Impact} <= 16 AND ?{Impact} >= 15 AND ?{Marge} == -7 ?? Distance :| 200-500m ^^ **Dégâts :** 50-100 pts de Dégâts
--?? ?{Impact} <= 16 AND ?{Impact} >= 15 AND ?{Marge} == -8 ?? Distance :| 200-500m ^^ **Dégâts :** 50-100 pts de Dégâts
--?? ?{Impact} <= 16 AND ?{Impact} >= 15 AND ?{Marge} <= -9 ?? Distance :| 500m-1Km ^^ **Dégâts :** 50-100 pts de Dégâts
--?? ?{Impact} <= 18 AND ?{Impact} >= 17 AND ?{Marge} == -1 ?? Distance :| 30-50m ^^ **Dégâts :** 10-50 pts de Dégâts
--?? ?{Impact} <= 18 AND ?{Impact} >= 17 AND ?{Marge} == -2 ?? Distance :| 50-150m ^^ **Dégâts :** 10-50 pts de Dégâts
--?? ?{Impact} <= 18 AND ?{Impact} >= 17 AND ?{Marge} == -3 ?? Distance :| 150-500m ^^ **Dégâts :** 50-100 pts de Dégâts
--?? ?{Impact} <= 18 AND ?{Impact} >= 17 AND ?{Marge} == -4 ?? Distance :| 150-500m ^^ **Dégâts :** 50-100 pts de Dégâts
--?? ?{Impact} <= 18 AND ?{Impact} >= 17 AND ?{Marge} == -5 ?? Distance :| 500m-1Km ^^ **Dégâts :** 50-100 pts de Dégâts
--?? ?{Impact} <= 18 AND ?{Impact} >= 17 AND ?{Marge} == -6 ?? Distance :| 500m-1Km ^^ **Dégâts :** 50-100 pts de Dégâts
--?? ?{Impact} <= 18 AND ?{Impact} >= 17 AND ?{Marge} == -7 ?? Distance :| 1-5Km ^^ **Dégâts :** 100-250 pts de Dégâts
--?? ?{Impact} <= 18 AND ?{Impact} >= 17 AND ?{Marge} == -8 ?? Distance :| 1-5Km ^^ **Dégâts :** 100-250 pts de Dégâts
--?? ?{Impact} <= 18 AND ?{Impact} >= 17 AND ?{Marge} <= -9 ?? Distance :| 5-25Km ^^ **Dégâts :** 100-250 pts de Dégâts
--?? ?{Impact} <= 20 AND ?{Impact} >= 19 AND ?{Marge} == -1 ?? Distance :| 50-100m ^^ **Dégâts :** 50-100 pts de Dégâts **(GM)**
--?? ?{Impact} <= 20 AND ?{Impact} >= 19 AND ?{Marge} == -2 ?? Distance :| 100-500m ^^ **Dégâts :** 50-100 pts de Dégâts **(GM)**
--?? ?{Impact} <= 20 AND ?{Impact} >= 19 AND ?{Marge} == -3 ?? Distance :| 500m-1Km ^^ **Dégâts :** 50-100 pts de Dégâts **(GM)**
--?? ?{Impact} <= 20 AND ?{Impact} >= 19 AND ?{Marge} == -4 ?? Distance :| 500m-1Km ^^ **Dégâts :** 50-100 pts de Dégâts **(GM)**
--?? ?{Impact} <= 20 AND ?{Impact} >= 19 AND ?{Marge} == -5 ?? Distance :| 1-5Km ^^ **Dégâts :** 100-250 pts de Dégâts **(GM)**
--?? ?{Impact} <= 20 AND ?{Impact} >= 19 AND ?{Marge} == -6 ?? Distance :| 1-5Km ^^ **Dégâts :** 100-250 pts de Dégâts **(GM)**
--?? ?{Impact} <= 20 AND ?{Impact} >= 19 AND ?{Marge} == -7 ?? Distance :| 5-25Km ^^ **Dégâts :** 100-250 pts de Dégâts **(GM)**
--?? ?{Impact} <= 20 AND ?{Impact} >= 19 AND ?{Marge} == -8 ?? Distance :| 5-25Km ^^ **Dégâts :** 100-250 pts de Dégâts **(GM)**
--?? ?{Impact} <= 20 AND ?{Impact} >= 19 AND ?{Marge} <= -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 >< 

help welcomed :)
Thx ! :)
April 13 (7 years ago)

Edited April 13 (7 years ago)

Phoxounet said:

For impact values equal to 17 and beyond, the conditional appears to stop working and I can't see why ><

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)**
}}
April 13 (7 years ago)

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?

April 13 (7 years ago)

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.
April 13 (7 years ago)

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
April 14 (7 years ago)
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:

April 14 (7 years ago)
Yeah, but then the minimum-width doesn't work. Feh. That was why I had issues with changing line-height and such. >_<
April 14 (7 years ago)
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?

April 14 (7 years ago)
**Spell Save DC** [[ 8 + [[@{pb}]] [Prof. Bonus] + @{wisdom_mod} [Wisdom Mod] ]]
**Spell Attack Bonus** [[ [[@{pb}]] [Prof. Bonus] + @{wisdom_mod} [Wisdom Mod] ]]
April 14 (7 years ago)
doesn't work I get d is undefined error for both.
April 14 (7 years ago)
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.
April 15 (7 years ago)

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



April 15 (7 years ago)
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] ]]
April 15 (7 years ago)

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.

April 15 (7 years ago)

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.
April 15 (7 years ago)

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?

April 15 (7 years ago)

Edited April 15 (7 years ago)

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}}
April 15 (7 years ago)

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?