This post has been closed. You can still view previous posts, but you can't post any new replies.

[Script] PowerCards 3 (Thread 3)

1459341467
Ziechael
Pro
Sheet Author
That was the way i went originally (which makes me happy) but I wanted to keep the flexible name and emote that Matthew was hoping for. As the master of all we survey is around I'll ask my burning question... you use query based conditionals with spaces in the result or using <>? ie. ?? ?{test} == test test ?? or ?? ?{test} <> test ?? it seems to be == or bust?
1459342077
Sky
Pro
No spaces in conditionals. I suck at regex and such, which is what would be needed to allow spaces.
To both of you, thank you thank you thank you! I think this is enough to get me off and running. Its not confusion of each piece - a roll id, a condition, a tag - but how you mix and match.  These examples are magnificent, thanks!!
I used to be quite good with regex in Perl before i retired, altho thats the kind of stuff you quickly forget if not using.  Maybe I can take a stab at looking at the code to try and contribute instead of just bombarding w questions
1459342949
Sky
Pro
Bad DM [Matthew P.] said: Jeez i feel like a Kindergartener at College Master MJ how did you get those Slowed and Unconscious lines with icons into your powercard?  I do not see anything like that on my allowed tag list.  I am dumb. This is a recent addition. You first need to create a handout in your campaign named PowerCard Status List  or PowerCards Status List  (either will work). Then you can go about defining status icons, how to access them, and what information they have. In the handout main section, not the GM Notes section, you can add the information like this... statusname|icon name|Status information. Then you can add the status info to your powercards by putting in [+statusname] in the content of a tag. blinded|bleeding-eye|You grant combat advantage. You can’t see any target (your targets have total concealment). You take a −10 penalty to Perception checks. You can’t flank an enemy.
1459343042
Ziechael
Pro
Sheet Author
Anytime Matthew, power cards rock (all praise be to HB) and they open up a whole world of opportunities for a dedicated gamer ;) HoneyBadger said: No spaces in conditionals. I suck at regex and such, which is what would be needed to allow spaces. So would ?? ?{test} <> test ?? be an option so that if you had a query with two options ('test' and 'another test') you could use the does not equal to identify the query result with the space by proxy? (apologies for the confusing wording, thats my cross to bear sadly!)
1459356304

Edited 1459356403
Silvyre
Roll20 Mod Team
Samuel Penn said: Secondly, can I define the number of repeating tags as a variable? e.g. "--Missile#[^Number]|It does [[d4+1]] damage". I don't think so, for the reasons HB provided. However, this would work until PowerCards supports the above: --hroll|[[ [$N] {floor(@{CL} / 2), 10}kl1 + 0d0 ]] --!Effects|The [^N] missiles strike one creature doing [[ [NH] [[{floor(@{CL} / 2), 10}kl1]]d4 + {floor(@{CL} / 2), 10}kl1 ]] damage, then up to [^N] further creatures no more than 30ft away. Each creature can only be hit by one missile. -- The first missile| does [[ [NH] d4 + 1 ]] force damage -- ?? $N >= 2 ?? The second missile| does [[ [NH] d4 + 1 ]] force damage -- ?? $N >= 3 ?? The third missile| does [[ [NH] d4 + 1 ]] force damage -- ?? $N >= 4 ?? The fourth missile| does [[ [NH] d4 + 1 ]] force damage -- ?? $N >= 5 ?? The fifth missile| does [[ [NH] d4 + 1 ]] force damage -- ?? $N >= 6 ?? The sixth missile| does [[ [NH] d4 + 1 ]] force damage -- ?? $N >= 7 ?? The seventh missile| does [[ [NH] d4 + 1 ]] force damage -- ?? $N >= 8 ?? The eighth missile| does [[ [NH] d4 + 1 ]] force damage -- ?? $N >= 9 ?? The ninth missile| does [[ [NH] d4 + 1 ]] force damage -- ?? $N >= 10 ?? The tenth missile| does [[ [NH] d4 + 1 ]] force damage
1459363529
Sky
Pro
Ziechael said: Anytime Matthew, power cards rock (all praise be to HB) and they open up a whole world of opportunities for a dedicated gamer ;) HoneyBadger said: No spaces in conditionals. I suck at regex and such, which is what would be needed to allow spaces. So would ?? ?{test} <> test ?? be an option so that if you had a query with two options ('test' and 'another test') you could use the does not equal to identify the query result with the space by proxy? (apologies for the confusing wording, thats my cross to bear sadly!) No, because queries are replaced before being sent to the api scripts. So... ?{Test} becomes "test test" and the spacing would screw up the conditional.
1459390627
Hey guys, have a question for a code that I can't figure out. One of my players has an ability called "reliable Talent" which whenever you make an ability check that uses proficiency bonus, they can treat a d20 roll of 9 or lower as a 10. I can't for the life of me figure out how to write this as a code that I can use. Here is a copy of the code that will be changed to allow the new ability: !power {{ --charid|@{character_id} --emote|**@{selected|token_name}** attempts to **?{To...Description}** (Acrobatics) --hroll|[[ [$RL]  --name|Acrobatics --!Roll STD ADV/D-ADV|~C[[d20+@{DEX} [Dexterity Mod] + @{Proficiency} [Proficiency] ]] | [[d20+@{DEX} [Dexterity Mod] + @{Proficiency} [Proficiency] ]]~C }} Any help would be appreciated. :-)
1459391115

Edited 1459406107
Silvyre
Roll20 Mod Team
You can use a Keep / Drop function to accomplish this; replace d20 with {d20, 10 + 0d0}kh1
HoneyBadger said: Bad DM [Matthew P.] said: Jeez i feel like a Kindergartener at College Master MJ how did you get those Slowed and Unconscious lines with icons into your powercard?  I do not see anything like that on my allowed tag list.  I am dumb. This is a recent addition. You first need to create a handout in your campaign named PowerCard Status List  or PowerCards Status List  (either will work). Then you can go about defining status icons, how to access them, and what information they have. In the handout main section, not the GM Notes section, you can add the information like this... statusname|icon name|Status information. Then you can add the status info to your powercards by putting in [+statusname] in the content of a tag. blinded|bleeding-eye|You grant combat advantage. You can’t see any target (your targets have total concealment). You take a −10 penalty to Perception checks. You can’t flank an enemy. thank you!!
Sorry for the remedial questions but its 3am and i cant figure out why this does absolutely nothing !power {{ --name|Favorite color? ?{Favorite Color|Blue|Red} --?? ?{Favorite Color} == Blue ?? !color1|You picked Blue --?? ?{Favorite Color} == Red ?? !color2|You picked Red }} No sandbox errors
1459413955
Sky
Pro
Don't know. Worked for me.
1459415418
Ziechael
Pro
Sheet Author
HoneyBadger said: No, because queries are replaced before being sent to the api scripts. So... ?{Test} becomes "test test" and the spacing would screw up the conditional. Fair enough, It was an attempt to get around the spacing issue by having the conditional look at a value that doesn't contain a space and say 'if what i've received isn't this  then it is ok to go ahead'... niche case and easily avoided so i'm happy either way. Thanks for explaining it :)
1459436028
For what it's worth, this works: !power {{ -- ?? ?{test|1,test&amp;nbsp;test|...} == test&nbsp;test ?? !|?{test} }}
1459437322

Edited 1459464919
Ziechael
Pro
Sheet Author
Silvyre said: For what it's worth, this works: !power {{ -- ?? ?{test|1,test&nbsp;test|...} == test&nbsp;test ?? !|?{test} }} So it does!! Those html entities are very useful at times, thanks. Old news by now but my recommendation for Matthew would now be: !power {{ --tokenid|@{selected|token_id} --emote|@{selected|token_name} attacks with a ?{Attacks With?|Bite|Claw}! --name|@{selected|token_name} ?{Power Attack?|No,Attacks|Yes,Power&nbsp;Attacks}! --?? ?{Power Attack?} == Attacks ?? !Attack1|**Attack:** [[1d20 + 17]] --?? ?{Power Attack?} == Power&nbsp;Attacks ?? !Attack2|**Attack:** [[1d20 + 14]] --?? ?{Attacks With?} == Bite AND ?{Power Attack?} == Attacks ?? !damage1|**Damage:** [[ [$dmg] 1d8+7 ]] --?? ?{Attacks With?} == Bite AND ?{Power Attack?} == Power&nbsp;Attacks ?? !damage1|**Damage:** [[ [$dmg] 1d8+13 ]] --?? ?{Attacks With?} == Claw AND ?{Power Attack?} == Attacks ?? !damage2|**Damage:** [[ [$dmg2] 1d6+7 ]] --?? ?{Attacks With?} == Claw AND ?{Power Attack?} == Power&nbsp;Attacks ?? !damage2|**Damage:** [[ [$dmg2] 1d6+13 ]] }}  To allow for the dynamic emote and name output with only 2 queries to answer :)
1459444767
Sky
Pro
Does that really work... only specifying the query itself and not the options? ?{What color|Red|Green|Blue|Purple} ?{What color} Test... and yes... whoa... I've been using queries all wrong.
1459488191

Edited 1459488726
I keep getting this error when trying to show a status icon in the power card.  Any ideas? Your scripts are currently disabled due to an error that was detected. Please make appropriate changes to your scripts and click the "Save Script" button and we'll attempt to start running them again. More info... For reference, the error message generated was:  TypeError: Cannot read property 'weakened' of undefined at statusSymbol (evalmachine.<anonymous>:926:42) at String.replace (native) at formatter (evalmachine.<anonymous>:979:18) at doInlineFormatting (evalmachine.<anonymous>:1001:11) at evalmachine.<anonymous>:581:23 at Array.forEach (native) at evalmachine.<anonymous>:579:14 at checkFinishedOps ( Here is the simple marco I am using. !power {{ --emote|@{selected|token_name} ♦ @{Selected|RACE} @{Selected|CLASS} --format|atwill --name|EXHAUSTION RAY --leftsub|At-Will --rightsub|Standard Action --Keywords|Necrotic --Range|Ranged 8 --Target|One creature --target_list|@{target| |token_id} --Attack|[[1d20+10]] vs **FORT:%%FORT%%** (%%token_name%%) --Hit|[[1d8 + 4]] necrotic damage, and the target is weakened (save ends). --Weakened|[+weakened] }} Here is what I have listed in PowerCards Status List. red|red blue|blue green|green brown|brown purple|purple pink|pink yellow|yellow dead|dead dying|skull unconscious|sleepy bloodied|half-heart open1|half-haze grantingcombatadvantage|interdiction slowed|snail reflexbonus|lightning-helix open2|spanner inspiringword|chained-heart dazed|chemical-bolt helpless|death-zone fortitudepenalty|drink-me alldefensespenalty|edge-crack hidden|ninja-mask turnordercounter|stopwatch restrained|fishing-net open3|overdrive fortitudebonus|strong willbonus|fist open4|padlock petrified|three-leaves open5|fluffy-wing weakened|pummeled immobilized|tread prone|arrowed powerpointcount|aura stunned|back-pain open6|black-flag blinded|bleeding-eye armorclassbonus|bolt-shield ongoingdamage|broken-heart reflexpenalty|cobweb armorclasspenalty|broken-shield open7|flying-flag diseased|radioactive open8|trophy willpenalty|broken-skull actionpoints|frozen-orb deafened|rolling-bomb alldefensesbonus|white-tower grabbed|grabdominated|screaming open9|grenade readiedaction|sentry-gun attackbonus|all-for-one height|angel-outfit attackpenalty|archery-target
1459489064
Ok, that was strange.  I just remade the PowerCard Status List handout and now it is working???
1459489290
Sky
Pro
Master MJ said: Ok, that was strange.  I just remade the PowerCard Status List handout and now it is working??? ¯\_(ツ)_/¯
1) Thank you all! 2) Master MJ, i have had just the first line of my PowerCard Format handout work, then suddenly stop.  lines 2 - nth always work. I either re-create it, or add a new first line like "thisisfiller: <etc>". no clue why 3) Ziechael, why are you using this --?? ?{Attacks With?} == Bite AND ?{Power Attack?} == Power Attacks ?? !damage1|**Damage:** [[ [$dmg] 1d8+13 ]] instead of just --?? ?{Attacks With?} == Bite AND ?{Power Attack?} == Power Attacks ?? !damage1|**Damage:** [[1d8+13]] Is that $dmg required or just good practice to save the result of the roll in case its needed later? and 4) I discovered why my angry 3am simple conditional experiment failed - I was looking at the API log for the version of same roll20 on dev, so did not see the API log on the roll20 i was actually running the test in had had some error along the way and turned off powercards.  woops.  Just restarting the sandbox (on the correct roll20 cough) and yes, that simple conditional worked.  Im embarrassed how long i spent on that haha! Woops  
1459510213
Ziechael
Pro
Sheet Author
That gets us all at some point lol... as for the $dmg, your original question had it in so i left it since you might have wanted to use it for some other condition later on, certainly not required for the roll as it stands :)
Ziechael said: That gets us all at some point lol... as for the $dmg, your original question had it in so i left it since you might have wanted to use it for some other condition later on, certainly not required for the roll as it stands :) Fantastic, thank you - i will need it later - but it is good to know i was right that it was optional.  Progress!   thanks again all~
1459527962
Bad DM [Matthew P.] said: Master MJ, i have had just the first line of my PowerCard Format handout work, then suddenly stop.  lines 2 - nth always work. I either re-create it, or add a new first line like "thisisfiller: <etc>". no clue why I think mine had something to do with when I made a copy of my campaign to a new campaign, I had to redo all the scripts and handouts to make PowerCards work again...  Odd.
1459542715
Sky
Pro
Ah, yes. The new campaign would not have had an on:change:handout event trigger powercards to save the data from the handout into the state object.
1459545799
Holy hell... I haven't been in here for so long because I've been powering through the six classes I'm taking this semester. Been a few changes I'll have to look at over the next few weeks.
1459565865

Edited 1459565903
Clint G. said: I figured it out.  Apparently it wont nest a macro created in the Abilities Tab of the character sheet.  You need to use the "Macros" section of your settings tab.  I also needed to add the "selected" to the attribute. My attack Macro is  +@{selected|bab} +@{selected|StrMod} +@{selected|closecon} +@{selected|Ramming} +@{selected|wep1foc} +@{selected|wep1enh} +@{selected|pwratt} My PowerCard is now power {{ --charid|@{character_id} --emote|Rhah rams his shield into @{target|token_name} --format|Clint --title|Successful Hit on target with Shield Bash activates Shield Slam feat – gives free bull rush.  ^^^^ Bull Rush target activates Spiked Destroyer feat – triggers Armor Spike as swift action. ^^^^ Bull Rush into Solid object activates Slam. --tokenid|@{selected|token_id}  --name|Shield Bash  --leftsub|Lethal  --rightsub|Standard Action  --Shield Bash:|?{Attack type?| First Charge, [[ [$Atk] 1d20cs>20 #attack +2 [charge] ]] vs AC | First Attack No Charge, [[ [$Atk] 1d20cs>20 #attack ]] vs AC | Second, [[ [$Atk] 1d20cs>20 #attack -5 ]] vs AC //second//} --?? $Atk.base == 1 OR $Atk.total < @{target|bar2} ?? !Miss 1:|You missed. --?? $Atk.total >= @{target|bar2} AND $Atk.base <> 1 ?? Damage *1:|[[ [NH]2d6 +@{pwratt|max} +@{wep1dmgstat}  +@{closecon|max} +@{wep1spc} +@{ramming} +@{wep1enh} ]] Shield Bash --?? $Atk.total >= @{target|bar2} AND $Atk.base <> 1 ?? Armor Spike:|[[ [$Atk3] 1d20cs>20 #attack ]] vs AC --?? $Atk3.total >= @{target|bar2} AND $Atk3.base <> 1 ?? Damage *2:|[[ [NH] 1d6 +@{pwratt|max} +@{StrMod} +@{closecon|max} +@{wep2enh} ]] Armor Spike  --?? $Atk.total >= @{target|bar2} AND $Atk.base <> 1 ?? Bull Rush:|~C ?{Bull Rush Into Object?| No, [[1d20 +@{tabcmb}]] vs CMD| Yes, Slam [[ [NH] 1d20 +@{tabcmb} ]] vs CMD [[ [NH] 8d6 +@{StrMod}*3 ]] Damage} ~C --?? $Atk.base >= 20 ?? Roll to Confirm Shield:|[[ [$Atk2] 1d20 + 15]] ^^^^**CRIT** damage x2 --?? $Atk3.base >= 20 ?? Roll to Confirm Spike:|[[ [$Atk4] 1d20 + 15]] ^^^^**CRIT** damage x2 }} Reading over these, I just thought I'd let you know that PowerCards will nest a macro from the Abilities tab. I use it all the time for my mother's Paladin (posting full macro so you can see where it calls, etc.): !power {{ @{format} --charid|@{character_id} --emote|@{selected|token_name} doesn't like the way things are looking at her. --name|@{selected|token_name} Attack --leftsub|Attack Action --rightsub|Melee --hroll|[[ [$Attack] ?{Number of Attacks?|2|1} + 0d0 ]] [[ [$Smite] ?{Smite?|No,0|Level 1,1|Level 2,2|Level 3,3|Level 4,4|Level 5,5} + 0d0 ]] [[ [$Undead] ?{Undead or Fiend?|No,0|Yes,1} + 0d0 ]] [[ [$OtherSmite] ?{Other Smite?|No,0|Searing Smite,1|Thunderous Smite,2|Wrathful Smite,3|Branding Smite,4|Blinding Smite,5} + 0d0 ]] --Bonus transfered to AC:|~R [! ?{Transfer to AC?|0|1|2|3} !] ~R --?? $Smite <> 0 ?? Smite Spell Slot|~R [[ ?{Smite?} +0d0 ]] ~R --Target *1:|$$#990000|@{target|Target 1|token_name}$$ --^1Attack *1:|~R [[ [$Atk1] @{Adv} + [[@{selected|repeating_meleeweapon_-K8kjHYpFjoBc-D5LJc2_meleetohit} - ?{Transfer to AC?} [Melee Bonus] ]] ]] ~R --?? $Atk1.total < @{target|Target 1|bar3} AND $Atk1.base == 1 ?? !Miss *1:|You missed horribly: ^^^^ $$#ff0000|**[[ 1t[Critical-Miss] [txt] ]]**$$ --?? $Atk1.total < @{target|Target 1|bar3} AND $Atk1.base <> 1 ?? !Miss *1:|~C $$#ff0000|**Missed.**$$ ~C  --?? $Smite == 0 AND $Atk1.total >= @{target|Target 1|bar3} ?? ^1Damage *1:|~R[[@{selected|repeating_meleeweapon_-K8kjHYpFjoBc-D5LJc2_meleedmg} - ?{Transfer to AC?} + [[@{repeating_meleeweapon_-K8kjHYpFjoBc-D5LJc2_meleedmgbonus}]] ]]~R --?? $Smite <> 0 AND $Atk1.total >= @{target|Target 1|bar3} ?? ^1Damage *1:|~R[[@{selected|repeating_meleeweapon_-K8kjHYpFjoBc-D5LJc2_meleedmg} - ?{Transfer to AC?} + [[@{repeating_meleeweapon_-K8kjHYpFjoBc-D5LJc2_meleedmgbonus}]] + [[ {floor(?{Smite?}+1),5}kl1 ]]d8 [Radiant] +?{Undead or Fiend?}d8 [Undead/Fiend] +0d0 ]]~R --?? $Smite == 0 AND $Atk1.total >= @{target|Target 1|bar3} ?? ^1Damage Type *1:|@{selected|repeating_meleeweapon_-K8kjHYpFjoBc-D5LJc2_meleedmgtype} --?? $Smite <> 0 AND $Atk1.total >= @{target|Target 1|bar3} ?? ^1Damage Type *1:|@{selected|repeating_meleeweapon_-K8kjHYpFjoBc-D5LJc2_meleedmgtype} & Radiant --?? $Smite == 0 AND $Atk1.base == 20 ?? ^2Crit *1:|~R[[@{selected|repeating_meleeweapon_-K8kjHYpFjoBc-D5LJc2_meleedmg}]]~R --?? $Smite <> 0 AND $Atk1.base == 20 ?? ^2Crit *1:|~R[[@{selected|repeating_meleeweapon_-K8kjHYpFjoBc-D5LJc2_meleedmg} + [[ {floor(?{Smite?}+1),5}kl1 ]]d8 [Radiant] +?{Undead or Fiend?|No,0|Yes,1}d8 +0d0 ]]~R --?? $Attack == 2 ?? !Second|~C **$$#fff|Second Attack$$** ~~~ ~C --?? $Attack == 2 ?? Target *2:|$$#990000|@{target|Target 2|token_name}$$ --?? $Attack == 2 ?? ^1Attack *2:|~R [[ [$Atk2] @{Adv} + [[@{selected|repeating_meleeweapon_-K8kjHYpFjoBc-D5LJc2_meleetohit} - ?{Transfer to AC?} [Melee Bonus] ]] ]] ~R --?? $Attack == 2 AND $Atk2.total < @{target|Target 2|bar3} AND $Atk2.base == 1 ?? !Miss *2:|You missed horribly: ^^^^ $$#ff0000|**[[ 1t[Critical-Miss] [txt] ]]**$$ --?? $Attack == 2 AND $Atk2.total < @{target|Target 2|bar3} AND $Atk2.base <> 1 ?? !Miss *2:|~C $$#ff0000|**Missed.**$$ ~C  --?? $Attack == 2 AND $Smite == 0 AND $Atk2.total >= @{target|Target 2|bar3} ?? ^1Damage *2:|~R[[@{selected|repeating_meleeweapon_-K8kjHYpFjoBc-D5LJc2_meleedmg} - ?{Transfer to AC?} + [[@{repeating_meleeweapon_-K8kjHYpFjoBc-D5LJc2_meleedmgbonus}]] ]]~R --?? $Attack == 2 AND $Smite <> 0 AND $Atk2.total >= @{target|Target 2|bar3} ?? ^1Damage *2:|~R[[@{selected|repeating_meleeweapon_-K8kjHYpFjoBc-D5LJc2_meleedmg} - ?{Transfer to AC?} + [[@{repeating_meleeweapon_-K8kjHYpFjoBc-D5LJc2_meleedmgbonus}]] + [[ {floor(?{Smite?}+1),5}kl1 ]]d8 [Radiant] +?{Undead or Fiend?}d8 [Undead/Fiend] +0d0 ]]~R --?? $Attack == 2 AND $Smite == 0 AND $Atk2.total >= @{target|Target 2|bar3} ?? ^1Damage Type *2:|@{selected|repeating_meleeweapon_-K8kjHYpFjoBc-D5LJc2_meleedmgtype} --?? $Attack == 2 AND $Smite <> 0 AND $Atk2.total >= @{target|Target 2|bar3} ?? ^1Damage Type *2:|@{selected|repeating_meleeweapon_-K8kjHYpFjoBc-D5LJc2_meleedmgtype} & Radiant --?? $Attack == 2 AND $Smite == 0 AND $Atk2.base == 20 ?? ^2Crit *2:|~R[[@{selected|repeating_meleeweapon_-K8kjHYpFjoBc-D5LJc2_meleedmg}]]~R --?? $Attack == 2 AND $Smite <> 0 AND $Atk2.base == 20 ?? ^2Crit *2:|~R[[@{selected|repeating_meleeweapon_-K8kjHYpFjoBc-D5LJc2_meleedmg}+ [[ {floor(?{Smite?}+1),5}kl1 ]]d8 [Radiant] +?{Undead or Fiend?|No,0|Yes,1}d8 +0d0 ]]~R >>>>>>>>>>>>>>>>>Begin Relevant Code<<<<<<<<<<<<<<<<<< --?? $OtherSmite == 1 ?? !Searing Smite|%{selected|SearingSmite} --?? $OtherSmite == 2 ?? !Thunderous Smite|%{selected|ThunderousSmite} --?? $OtherSmite == 3 ?? !Wrathful Smite|%{selected|WrathfulSmite} --?? $OtherSmite == 4 ?? !Branding Smite|%{selected|BrandingSmite} --?? $OtherSmite == 5 ?? !Blinding Smite|%{selected|BlindingSmite} >>>>>>>>>>>>>>>>>End Relevant Code<<<<<<<<<<<<<<<<<< }} !slot @{character_id} spell_slots_l?{Smite?} 1 One of the smites she calls looks like this: ~C **$$#fff| @H@ Searing Smite @H@ $$** ~~~ ~C --?? $OtherSmite == 1 AND $Atk1.total >= @{target|Target 1|bar3} OR $Atk2.total >= @{target|Target 2|bar3} ?? ^1Damage *3:|~R [[ 1d6 ]] ~R --?? $OtherSmite == 1 AND $Atk1.total >= @{target|Target 1|bar3} OR $Atk2.total >= @{target|Target 2|bar3} ?? ^1Damage Type *3:|Fire --?? $OtherSmite == 1 AND $Atk1.base == 20 OR $Atk2.base == 20 ?? ^2Crit *3:|~R[[ 1d6 ]]~R It can take some work to figure out what you need to do, but it does work fine.
I have a player that has an interesting item and it has me stumped. It gives a +1 bonus to healing per 1d6 rolled except when you roll a 6.  He is rolling 7d6 for his healing touch.  Can you check a single dice roll inside a multi roll like that?  Im stuck, im trying to get his powercard finished but this has me scratching my head. Thanks for any help
SeanOG said: Reading over these, I just thought I'd let you know that PowerCards will nest a macro from the Abilities tab. I use it all the time for my mother's Paladin (posting full macro so you can see where it calls, etc.): May I say, that is the most inspiring thing I've read this week?  Because it is.  
I'm running 5e. Making a tweak to the Carousing variant homebrew ruling for people who game the downtime systems As a general Rule - 1 week of more than 8 hours a day working More than 4 weeks of 8 hours a day labor Make the Character make a wisdom save (base DC 10 ), they continue to press ; raise the DC by 2 for every 36 hours worked, and have them save again at the end of the next week. For every 4 points the save is failed by, they spend 1 day Carousing. !power {{ --emote|@{selected|token_name} is struck with an itch socially. --whisper|GM --name|Carousing! --leftsub|Resist --rightsub|Save --RESIST | [[1d20+@{target|constitution_check_mod_formula}]] | [[1d20+@{target|constitution_check_mod_formula}]] vs DC [[8+?{Negative Modifier|—, 0|2|4|6|8|10|12|14}]] --Rolled a|[[ [$R] 1d100 + @{selected|level} - ({Negative Modifer}) ]] -- ?? $R <= 10 ?? |@{selected|name} is jailed for [[2d4+{Negative Modifier}]] Day, at the end of the Carousing. Pay a find of 10gp*days to be released. -- ?? $R <= 20 ?? |@{selected|name} regains conciousness in a very strange place, with no memory of how they go there, robbed of [[3d6*5]]gp in coins or equipment. -- ?? $R <= 30 ?? |@{selected|name} makes an enemy. This person is now -35 RP with them. DM determines the Group, Player Determines the Infraction. -- ?? $R <= 40 ?? |@{selected|name} Is caugth in a whirlwind romance. SUBROLL based off d20.  -- ?? $R <= 80 ?? |@{selected|name} earns your lifesytle costs for the time spent carousing. -- ?? $R <= 90 ?? |@{selected|name} earns gaining your lifestyle costs and [[1d20*4]]gp. -- ?? $R >= 90 ?? |@{selected|name} makes a small fortune gambling.  Recuperate your lifestyle expenses for this Month (to date), and gain [[4d6*10]]gp. @{selected|name}'s Exploits are now legend and urban myth. }} I'm trying to capture the save and compare it for the difference to know how many days the play goes carousing. I'm believe I'm close to completed, but I don't see how to do that capture and comparison... and the comparison I've already done seems 'iffy'
1459659699

Edited 1459699434
Silvyre
Roll20 Mod Team
Try this out: !power {{ --emote|@{selected|token_name} is struck with an itch socially. --whisper|GM --name|Carousing! --leftsub|Resist --rightsub|Save --Results:|[! [^Save] !] vs. DC [[ 8 + ?{Negative Modifier|—, 0|2|4|6|8|10|12|14} ]] -- ?? $Days <= 0 ?? !Success|@{selected|token_name} wastes no time carousing. -- ?? $Days >= 1 ?? !Failure|@{selected|token_name} spends [[ [$Days] floor(( 8 + ?{Negative Modifier} - ([$Save] 1d20 + @{selected|wisdom_save_mod_formula}) ) / 4) ]] day(s) carousing!     -- ?? $Days >= 1 ?? Rolled a|[[ [$R] 1d100 + @{selected|level} - ?{Negative Modifier} ]]     -- ?? $Days >= 1 AND $R <= 10 ?? |@{selected|token_name} is jailed for [[ 2d4 + ?{Negative Modifier} ]] Day, at the end of the Carousing. Pay a find of 10gp*days to be released.     -- ?? $Days >= 1 AND $R > 10 AND $R <= 20 ?? |@{selected|token_name} regains conciousness in a very strange place, with no memory of how they go there, robbed of [[ 3d6 * 5 ]]gp in coins or equipment.     -- ?? $Days >= 1 AND $R > 20 AND $R <= 30 ?? |@{selected|token_name} makes an enemy. This person is now -35 RP with them. DM determines the Group, Player Determines the Infraction.     -- ?? $Days >= 1 AND $R > 30 AND $R <= 40 ?? |@{selected|token_name} Is caugth in a whirlwind romance. SUBROLL based off d20.     -- ?? $Days >= 1 AND $R > 40 AND $R <= 80 ?? |@{selected|token_name} earns your lifesytle costs for the time spent carousing.     -- ?? $Days >= 1 AND $R > 80 AND $R <= 90 ?? |@{selected|token_name} earns gaining your lifestyle costs and [[ 1d20 * 4 ]]gp.     -- ?? $Days >= 1 AND $R > 90 ?? |@{selected|token_name} makes a small fortune gambling.  Recuperate your lifestyle expenses for this Month (to date), and gain [[ 4d6 * 10 ]]gp. @{selected|token_name}'s Exploits are now legend and urban myth. }} PowerCards can't do math using referenced Rolls IDs yet, so you have to work around that using tricks as above.
Thank you again !
Power Cards seems to be generating an error when the sandbox spins up. SyntaxError: Unexpected identifier If I disable PowerCards the sandbox spins up normally with no errors.
1459979131
Silvyre
Roll20 Mod Team
michael g. said: If I disable PowerCards the sandbox spins up normally with no errors. Try a fresh install of the script . If that doesn't help, try adding a ; on a new line at the end of the PowerCards script.
1460007172

Edited 1460007522
Silvyre said: michael g. said: If I disable PowerCards the sandbox spins up normally with no errors. Try a fresh install of the script . If that doesn't help, try adding a ; on a new line at the end of the PowerCards script. adding the ; worked, thank you. wasn't getting the error until I did a fresh install of the script, I had deleted the old powercards script I had running then created a new one to copy/paste the code into then saved and then started with the error. But it is spinning up with no errors now with the addition of the ; to the end but before the // END FUNCTIONS /////////////////////////////////////////////////////////////// on the very last line. scratch that it was still producing the error till I moved the ; to the VERY last line after the // END FUNCTIONS //// bit. I have reloaded and refresh the game multiple times and it does not error anymore, so I think I actually got it now. 
1460178597

Edited 1460178616
Josh
Pro
Is there a way to pad the inside of the card to get the text a little more away from the edges?  Thanks for the help.  Keep up the awesome work!
1460179423
Sky
Pro
Josh said: Is there a way to pad the inside of the card to get the text a little more away from the edges?  Thanks for the help.  Keep up the awesome work! Not without editing the script itself.  Also fyi everyone, changed name here on Roll20.
1460179743

Edited 1460179850
Josh
Pro
SkyCaptainXIII said: Josh said: Is there a way to pad the inside of the card to get the text a little more away from the edges?  Thanks for the help.  Keep up the awesome work! Not without editing the script itself.  Also fyi everyone, changed name here on Roll20. Which lines need to be edited?  It's just a matter of changing the CSS a bit right?
1460180507
Sky
Pro
Yeah, but you'd have to remember to re-do that each time the script updates. I'll see about adding overall padding to the list of options when I create a configuration handout option.
1460181314
Josh
Pro
SkyCaptainXIII said: Yeah, but you'd have to remember to re-do that each time the script updates. I'll see about adding overall padding to the list of options when I create a configuration handout option. That would be awesome.  Thanks. 
1460211836
SkyCaptainXIII said: Also fyi everyone, changed name here on Roll20. But... but.... HoneyBadger so perfectly fit you :)
1460212247
Sky
Pro
GenKitty said: SkyCaptainXIII said: Also fyi everyone, changed name here on Roll20. But... but.... HoneyBadger so perfectly fit you :) Yeah, but I'm trying to consolidate names across services and sites. :)
1460221292
The Aaron
Pro
API Scripter
It's like you just painted Abe Lincoln's house plaid. There should be a "historical name" marker that prevents changing of names with historical significance on Roll20.  =D
1460226313
Sky
Pro
Lincoln probably would have liked plaid. ;D
But but...  triskaidekaphobia!!!
1460230070
Sky
Pro
Modnar Wylde said: But but...  triskaidekaphobia!!! Heh. Thirteen is my favorite number.
1460336810
Silvyre said: You can use a Keep / Drop function to accomplish this; replace d20 with {d20, 10 + 0d0}kh1 Tried this last week, it didn't work. Any other suggestions?
1460337876

Edited 1460337958
Silvyre
Roll20 Mod Team
Arthur B. said: Silvyre said: You can use a Keep / Drop function to accomplish this; replace d20 with {d20, 10 + 0d0}kh1 Tried this last week, it didn't work. Could you post what you tried, and let us know why you felt it did not work? It should work fine, at least technically.
1460339901
Silvyre said: Arthur B. said: Silvyre said: You can use a Keep / Drop function to accomplish this; replace d20 with {d20, 10 + 0d0}kh1 Tried this last week, it didn't work. Could you post what you tried, and let us know why you felt it did not work? It should work fine, at least technically. Nevermind, I think we were looking at in all wrong last week. I just tried it again (to get some samples) and it seems to be working fine. Sorry for the confusion.
1460584310
Modnar Wylde said: SeanOG said: Reading over these, I just thought I'd let you know that PowerCards will nest a macro from the Abilities tab. I use it all the time for my mother's Paladin (posting full macro so you can see where it calls, etc.): May I say, that is the most inspiring thing I've read this week?  Because it is.   :) My parents raised us on Dungeons and Dragons. I started playing when I was about 7 or 8 in the 80s. We play 5e every other week on Roll20 because we are spread out all over geographically. Our group is my mother and father, myself, younger brother, cousin and cousin's friend. I had two other brothers and a sister that also played, but work schedules on weekends ended that.