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)

Sky said: Jerry F. said: This is actually rolling on 2 tables. Try adding [TXT] to your inline table rolls. I think it will get rid of the inline roll background. Like this: [[ [TXT] 1t[TableName]]] Tanks Sky
Sky said: Also, if anyone wants to take over management of PowerCards... please do so. I don't even use it anymore and haven't for the past couple years. But...Powercards are awesome! 
Jerry F. said: Sky said: Jerry F. said: This is actually rolling on 2 tables. Try adding [TXT] to your inline table rolls. I think it will get rid of the inline roll background. Like this: [[ [TXT] 1t[TableName]]] Tanks Sky Can you post the macro code so I can play around with it? Thanks in advance.
Of course, here you go. !power {{  --whisper|GM --corners|10 --format|GM --titlefontshadow|none --name|Random Encounters --Check|~R [[ [TXT] 1t[Random-Encounter]]] ~R ^^Are you going to get something random, roll every hour. --Encounter|~R  [[ [TXT] 1t[Encounters]]]~R }}
Ravenknight said: Sky said: Also, if anyone wants to take over management of PowerCards... please do so. I don't even use it anymore and haven't for the past couple years. But...Powercards are awesome!  Thanks. I think they're pretty cool too... but difficult to get players to learn and use. Especially in one shot games, when drag and drop works so well on the OGL sheet.
1499495681

Edited 1499496259
Sorry to ask but is this still a program to download and make the macro or did it change? not sure where to download it.
There was, but it's so out of date... it wouldn't be useful for the current version of powercards.
Trying to get alternate initiative to work but it won't send to tracker. The rolls work until I add [TRKR]. HELP !power {{ --corners|10 --format|recharge --titlefontshadow|none --tokenid|@{selected|token_id} --emote|@{selected|token_name} is rolling initiative  --name|Initiative Roller --?{Movement|D6,[[1d6]]|Advantage D4,[[1d4]]|None,[[0]]} --?{Ranged Attack|D4,[[1d4]]|Advantage D3,[[1d3]]|None,[[0]]} --?{Melee Attack|D8,[[1d8]]|Advantage D6,[[1d6]]|None,[[0]]} --?{Cast a Spell|D10,[[1d10]]|Advantage D8,[[1d8]]|None,[[0]]} --?{Additional|D3,[[1d3]]|D4,[[1d4]]|D6,[[1d6]]|D8,[[1d8]]|D10,[[1d10]]|None,[[0]]} --**//@{selected|token_name}'s Initiative is//** ~R[[ [TRKR] ?{Movement}+?{Ranged Attack}+?{Melee Attack}+?{Cast a Spell}+?{Additional}]]~R ^^This will be rolled each round. }}
You need to put all the dice into the single inline roll and use [^ID] to display the results elsewhere.
Sky said: You need to put all the dice into the single inline roll and use [^ID] to display the results elsewhere. Well, darn I don't know that one I guess I'll have to learn it.
Ok, I give, I can't figure this out to save my soul.
!power {{ --Roll:|[[ [$Roll] 1d8]] --Result:|[^Roll] }}
1499889086

Edited 1499889236
I just skipped the PowerCard way and added it to the actual sheets initiative_formula, it works great. Kinda sucks I couldn't get it to work as well with a PC. But this will be a pain to update every sheet with it. &{tracker}{{[[?{Movement|None,0|D6,[[1d6]]|D4,[[1d4]]}+?{Ranged|None,0|D4,[[1d4]]|D3,[[1d3]]}+?{Melee|None,0|D8,[[1d8]]|D6,[[1d6]]}+?{Spell|None,0|D10,[[1d10]]|D8,[[1d8]]}+?{Additional actions|None,0|D3,[[1d3]]|D4,[[1d4]]|D6,[[1d6]]|D8,[[1d8]]|D10,[[1d10]]}-@{selected|dexterity_mod}]]}}
1499894263
Phoxounet
Sheet Author
Translator
Hi there ! I would like to use the icons (such as +dazed) in the powercards and have 2 questions about them : 1) is there a list of all icons names I could use ? searched for one but couldn't find one 2) are the icons also displayed on the token when displayed in the powercard ? Regards ! :) 
Phoxounet said: Hi there ! I would like to use the icons (such as +dazed) in the powercards and have 2 questions about them : 1) is there a list of all icons names I could use ? searched for one but couldn't find one 2) are the icons also displayed on the token when displayed in the powercard ? Regards ! :)  There's a list on the Roll20 Wiki with all the icon names. You would need to install a different script to apply the icons to the token.
Phoxounet said: Hi there ! I would like to use the icons (such as +dazed) in the powercards and have 2 questions about them : 1) is there a list of all icons names I could use ? searched for one but couldn't find one 2) are the icons also displayed on the token when displayed in the powercard ? Regards ! :)&nbsp; <a href="https://app.roll20.net/images/statussheet.png" rel="nofollow">https://app.roll20.net/images/statussheet.png</a> "red" "blue" "green" "brown" "purple" "pink" "yellow" "dead" "skull" "sleepy" "half-heart" "half-haze" "interdiction" "snail" "lightning-helix" "spanner" "chained-heart" "chemical-bolt" "death-zone" "drink-me" "edge-crack" "ninja-mask" "stopwatch" "fishing-net" "overdrive" "strong" "fist" "padlock" "three-leaves" "fluffy-wing" "pummeled" "tread" "arrowed" "aura" "back-pain" "black-flag" "bleeding-eye" "bolt-shield" "broken-heart" "cobweb" "broken-shield" "flying-flag" "radioactive" "trophy" "broken-skull" "frozen-orb" "rolling-bomb" "white-tower" "grab" "screaming" "grenade" "sentry-gun" "all-for-one" "angel-outfit" "archery-target"
Phoxounet said: Hi there ! I would like to use the icons (such as +dazed) in the powercards and have 2 questions about them : 1) is there a list of all icons names I could use ? searched for one but couldn't find one 2) are the icons also displayed on the token when displayed in the powercard ? Regards ! :)&nbsp; Tracker Jacker is somewhat outdated but can add and remove icons from tokens. Check it out.
1500109716
Phoxounet
Sheet Author
Translator
Thx all :)
1500115618
Phoxounet
Sheet Author
Translator
Tried to use the Status options (only for the powercard, I'll use TokenMod for Token status icons). The API sandbox crashes because of an error. I have a PowerCard Status List handout having : shield|bolt-shield|put a shield on the target And the following test PowerCard : !power {{ --corners|10 --name|Shield --leftsub|Light Path --rightsub|Defense --Effect:|[+shield]&nbsp; }} and finally, the error I get : TypeError: Cannot read property 'icon' of undefined TypeError: Cannot read property 'icon' of undefined &nbsp; &nbsp; at statusSymbol (apiscript.js:797:50) &nbsp; &nbsp; at RegExp.[Symbol.replace] (native) &nbsp; &nbsp; at String.replace (native) &nbsp; &nbsp; at formatter (apiscript.js:850:18) &nbsp; &nbsp; at doInlineFormatting (apiscript.js:884:11) &nbsp; &nbsp; at apiscript.js:456:23 &nbsp; &nbsp; at Array.forEach (native) &nbsp; &nbsp; at apiscript.js:454:14 &nbsp; &nbsp; at checkFinishedOps (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:150:1), &lt;anonymous&gt;:751:7) &nbsp; &nbsp; at eval (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:150:1), &lt;anonymous&gt;:831:8) Don't know if I made a spelling of syntax mistake or if something's going wrong... Moreover, if I don't use the PowerCard Status List and replace +shield by +bolt-shield in the powercard, I have no error but no status icon displayed in the powercard.
Try adding additional lines into the handout.
1500116945
Phoxounet
Sheet Author
Translator
done. Still errors. shield|bolt-shield|put a shield on the target blinded|bleeding-eye|bind the target for several rounds. blinded|bleeding-eye|bind the target for several rounds. rooted|cobweb|root the target. snare|snail|half speed Tried several of these status in the tested powercard.
Try re-creating the handout from scratch. I have not been able to recreate that bug.
1500133722

Edited 1500133744
Phoxounet
Sheet Author
Translator
Ok. Found out : I put the code tags because of the html code. Copied and pasted it without any tag and the PowerCard Status List is working. However, the status icons only works with this handout. Default system icons seem to not be working. I get no error when using them but the icon actually isn't displayed.
1501990379

Edited 1501990733
Kind of strange bug...I am used the following macro !power {{ --emote|@{character_name} shoots a bolt of fire at @{target|npc_name}! --name|Fire Bolt --format|spell --leftsub|Evocation cantrip --Casting Time:| 1 Action --Range:| 120 ft --Components:| V,S --Duration:| Instantaneous --Attack:|[[ [$Atk] 1d20+@{charisma_mod}+@{pb}]] vs @{target|npc_ac} AC --?? $Atk &lt; @{target|npc_ac} ?? !Missed|**You missed!** --?? $Atk &gt;= @{target|npc_ac} AND $Atk.base &lt;&gt; 20 ?? Hit:| [[ [$Dmg] 1d10]] fire damage --?? $Atk &gt;= @{target|npc_ac} AND $Atk.base &lt;&gt; 20 ?? alterbar1|_target|@{target|token_id} _bar|1 _amount|-[^Dmg] _show|GM --?? $Atk.base == 20 ?? Critical Hit:| [[ [$CritDmg] 2d10]] fire damage --?? $Atk.base == 20 ?? alterbar2|_@{target|token_id} _bar|1 _amount|-[^CritDmg] _show|GM }} Works fine for targeting some enemies, but other tokens from the same type (a bunch of skeletons for instance) throw the error: (From ERROR:) Not a valid token id in the chat. There are none in the API console.&nbsp; Why would it treat one token fine and another token in error? Do some tokens not get good ids?&nbsp; Edited: With a little more research this is happening to the same tokens with anything that does damage. However, Alterbars by itself using @{target|token_id} works perfectly fine. Something about using it inside the power cards might be the issue?
Did you transmogrify anything from one campaign to another? I haven't had time to research it, but someone else said they were getting api script crashes on tokens or character sheets that had been transmogged.
1501995497

Edited 1501995562
I did, but nothing that I'm using here. I mean the target is a monster I pulled from the Compendium in this new game and I just spawned a bunch of tokens (7 to be exact) and 5 of them work fine and two are throwing an error. The character tokens/sheets initiating the power card are also fresh to the game.&nbsp; The API script isn't actually crashing, it's throwing that error up in the chat.&nbsp;
Ah, I bet one of the token id's has two dashes in it.
Is there something that can be done about that? Can I manually reset token IDs or something?
1502007178

Edited 1502007188
Copy and paste. Delete the old one.
Hey,&nbsp; does anyone has an good and easy way to include the crit damage for a sneak attack?&nbsp; What I have so far: !power {{ --titlebackground|none --name|Kurschwert --leftsub|Nahkampfangriff^^ 1 Aktion --rightsub|1m Reichweite --tokenid|@{selected|token_id} --emote|**@{selected|character_name}** [[ [txt] 1t[Nahkampfangriff] ]] --Wurf:|~R [[ [$Atk]?{Angriff|Standard, 1d20r&lt;1+@{selected|dexterity_mod}|Vorteil, 2d20kh1r&lt;1+@{selected|dexterity_mod}|Nachteil, 2d20kl1r&lt;1+@{selected|dexterity_mod}} ]] ~R --?? $Atk &gt;= @{target||ac} ?? soundfx1|_play|Stichangriff --?? $Atk &lt; @{target||ac} ?? !Missed|**Verfehlt!** --?? $Atk &lt; @{target||ac} ?? soundfx2|_play|Miss --?? $Atk &gt;= @{target||ac} AND $Atk.base &lt;&gt; 20 ?? Stichschaden:|~R ?{Hinterhalt?|Nein,[[ [$Dmg] 1d6+@{selected|dexterity_mod} ]]|Ja,[[ [$Dmg] 2d6+@{selected|dexterity_mod} ]] } ~R --?? $Atk &gt;= @{target||ac} AND $Atk.base &lt;&gt; 20 ?? alterbar3|_target|@{target||token_id} _bar|3 _amount|-[^Dmg] ---?? $Atk.base == 20 ?? Kritischer Stichschaden:|~R [[ [$CritDmg] 2d6+@{selected|Strength_mod}]] ~R --?? $Atk.base == 20 ?? soundfx3|_play,delay:1|Krit --?? $Atk.base == 20 ?? alterbar3|_target|@{target||token_id} _bar|3 _amount|-[^CritDmg] }} Translation: Hinterhalt=Sneak Attack So I can chose if I have an dis-/adavantage or not, and then if I do a sneak attack. the damage for the sneak attack works correctly, but I didn't find a good way to do the same, if it is a critical hit.
1502304673

Edited 1502304731
Silvyre
Forum Champion
Maybe something like this: !power {{ --titlebackground|none --name|Kurschwert --leftsub|Nahkampfangriff^^ 1 Aktion --rightsub|1m Reichweite --tokenid|@{selected|token_id} --emote|**@{selected|character_name}** [[ [txt] 1t[Nahkampfangriff] ]] --Wurf:|~R [[ [$Atk] ?{Angriff|Standard, 1d20|Vorteil, 2d20kh1|Nachteil, 2d20kl1}r&lt;1 + @{selected|dexterity_mod} ]] ~R --?? $Atk &gt;= @{target||ac} ?? soundfx1|_play|Stichangriff --?? $Atk &lt; @{target||ac} ?? !Missed|**Verfehlt!** --?? $Atk &lt; @{target||ac} ?? soundfx2|_play|Miss --?? $Atk &gt;= @{target||ac} AND $Atk.base &lt;&gt; 20 ?? Stichschaden:|~R [[ [$Dmg] ?{Hinterhalt?|Nein, 1|Ja, 2}d6 + @{selected|dexterity_mod} ]] } ~R --?? $Atk &gt;= @{target||ac} AND $Atk.base &lt;&gt; 20 ?? alterbar3|_target|@{target||token_id} _bar|3 _amount|-[^Dmg] --?? $Atk.base == 20 ?? Kritischer Stichschaden:|~R [[ [$CritDmg] (?{Hinterhalt?} * 2)d6 + @{selected|Strength_mod} ]] ~R --?? $Atk.base == 20 ?? soundfx3|_play,delay:1|Krit --?? $Atk.base == 20 ?? alterbar3|_target|@{target||token_id} _bar|3 _amount|-[^CritDmg] }}
Brilliant! Thank you very much : )
I was wondering if it was possible to use the result of a roll in another roll. Right now i'm trying to use a roll to determine how many time a table should be rolled. I got something like this, but isn't working :&nbsp; !power {{ --name|Cueillette --format|lucidite --Recherche :| [[ [$rec] ((2d10+2d10+@{selected|KNOWING} + @{selected|Pistage} + @{selected|SAGACITE} + @{selected|PERCEPTION})/2)-(?{Difficulté }) ]] --Butin :|~R[[ (1+[^rec])t[Cueillette] ]]~R ~~~ }} (sorry for the french names of things)
1502402572

Edited 1502402743
Silvyre
Forum Champion
It's not possible, unfortunately.
You can however use the roll in the table roll and display it elsewhere. !power {{ --name|Cueillette --format|lucidite --Recherche:| [^rec] --Butin:|~R[[ (1 + [[ [$rec] ((2d10+2d10+@{selected|KNOWING} + @{selected|Pistage} + @{selected|SAGACITE} + @{selected|PERCEPTION})/2)-(?{Difficulté })]])t[Cueillette] ]]~R ~~~ }}
I've done a few weaks and it's working nice &nbsp;except for the roll ID tat can't be found apparently
Hey again,&nbsp; is there a way to apply multiple damage to multiple targets with alterbar functionality?&nbsp; I tried some things, but none of them worked. I don't know how to say: this damage to this target. !power {{ --titlebackground|none --name|Magisches Geschoss --leftsub|Hervorrufungszauber 1 Grad^^ 1 Aktion --rightsub|36m Reichweite^^Verbal, Gesten^^ Unmittelbar --tokenid|@{selected|token_id} --emote|**@{selected|character_name}**^^ schleudert drei Pfeile aus magischer Energie auf seine Gegner! --target_list|@{target|1st|token_id} | @{target|2nd|token_id} --Wurf#3|~R [[ [$Atk] 1d20+@{selected|ZAB}]] ~R --?? $Atk &gt;= @{target||ac} ?? soundfx1|_play|Magisches Geschoss --?? $Atk &lt; @{target||ac} OR $Atk.base == 1 ?? !Missed|**Verfehlt!** --?? $Atk &lt; @{target||ac} ?? soundfx2|_play|GeschossMiss --?? $Atk &gt;= @{target||ac} AND $Atk.base &lt;&gt; 20 ?? Energieschaden1|~R [[ [$Dmg1] 1d4+1 ]] ~R --?? $Atk &gt;= @{target||ac} AND $Atk.base &lt;&gt; 20 ?? Energieschaden2|~R [[ [$Dmg2] 1d6+1 ]] ~R --?? $Atk &gt;= @{target||ac} AND $Atk.base &lt;&gt; 20 ?? alterbar3|_target|@{target||token_id} _bar|3 _amount|-[^Dmg1] --?? $Atk &gt;= @{target||ac} AND $Atk.base &lt;&gt; 20 ?? alterbar3|_target|@{target||token_id} _bar|3 _amount|-[^Dmg2] --?? $Atk.base == 20 ?? Kritischer Energieschaden:|~R [[ [$CritDmg] ([[round((@{selected|level} + 1) / 6 + 0.5)]]*2)d10 ]] ~R --?? $Atk.base == 20 ?? soundfx3|_play,delay:1|Krit --?? $Atk.base == 20 ?? alterbar3|_target|@{target||token_id} _bar|3 _amount|-[^CritDmg] }} Regards
Not via powercards unfortunately.
Okay, Thank you for the reply.&nbsp;
1502830856

Edited 1502830915
Phoxounet
Sheet Author
Translator
Hi ! I've got some conditional problem. A OR condition seems to not be working and I don't understand why. Here is a part of the powercard (query of skills) --name|Armes à Distance --leftsub|Compétence --rightsub|Risquée --Résultat :| [[ &nbsp;[$Test] 1D20 + @{ADR} [ADResse] + @{DistNiv} [Bonus Compétence] ]] --?? $Test.base == 1 OR $Test.base == 11 ?? Conséquence :| **__Echec Critique !!__** --?? $Test.base ~% 2 ?? Conséquence :| Échec de la prise de risque.~~~**__Résultat Effectif :__** [[ @{ADR} + @{DistNiv} &nbsp;]] --?? $Test.base &lt;&gt; 1 AND $Test.base &lt;&gt; 11 AND $Test.base % 2 ?? Conséquence :| Prise de Risque Réussie ! It is based on the "Choose your Dice" system : take the D10 die and no problem. Take your chance with a D20 die and odd values are considered 0. Skill test is equal to base bonuses then. Everything is ok except the 1st conditional. It is nor working. Here is why I get when I roll a 1 or 11 (critical failures): Armes à Distance Compétence ♦ Risquée Résultat :&nbsp;17 Conséquence :&nbsp;Échec de la prise de risque.Résultat Effectif :&nbsp;6 Conséquence :&nbsp;Échec de la prise de risque.Résultat Effectif :&nbsp;$[[1]] I made another powercards with the D10 die and everything is perfect. Only this conditional seems to not be working.... Any help welcomed. Thx.
1502831885

Edited 1502831966
Silvyre
Forum Champion
--?? $Test.base == 1 OR $Test.base == 11 ?? Conséquence :| --?? $Test.base ~% 2 ?? Conséquence :| PowerCards cannot simultaneously display two tags with identical names. From the OP: Same Name: This tag option is used to enable the use tags with the same name. Unlike repeating tags, the content is unique to each tag of the same name. To use this tag, add an asterisk * followed by a number (cannot use the same numbers). Example: Tag *1|Content Example: Tag *2|Content Also, you can replace $Test.base &lt;&gt; 1 AND $Test.base &lt;&gt; 11 AND $Test.base % 2 with just $Test.base % 2
1502834198
Phoxounet
Sheet Author
Translator
Silvyre said: --?? $Test.base == 1 OR $Test.base == 11 ?? Conséquence :| --?? $Test.base ~% 2 ?? Conséquence :| PowerCards cannot simultaneously display two tags with identical names. From the OP: Same Name: This tag option is used to enable the use tags with the same name. Unlike repeating tags, the content is unique to each tag of the same name. To use this tag, add an asterisk * followed by a number (cannot use the same numbers). Example: Tag *1|Content Example: Tag *2|Content Also, you can replace $Test.base &lt;&gt; 1 AND $Test.base &lt;&gt; 11 AND $Test.base % 2 with just $Test.base % 2 Well, I thought Conditionals were not tags and the 1st OR condition would end the macro.. :( Is there a way to have functioning conditionals having 1 and 11 as critical failure and if not and having an odd die value, a separate displayed value ?
Yes. Use&nbsp; Conséquence : *1 and Conséquence : *2 instead of just&nbsp; Conséquence : twice.
1502834959
Phoxounet
Sheet Author
Translator
Sorry Guys... Just remember I already asked this question in Thread 2 more than a year ago, and you already gave me a solution. Found it. Sorry again ! and thx for your patience and your answers.&nbsp;
Ok, so I'm having a strange problem when having my API interact with powercards. The information that my API pulls from the chat message has different roll results than what's shown in the chat. According to the data pulled from this roll&nbsp; &nbsp;The Damage result should be 4. Here is the data that my API pulled:&nbsp; <a href="https://pastebin.com/geCDNUwN" rel="nofollow">https://pastebin.com/geCDNUwN</a> Any way to fix this?
1503082249
Silvyre
Forum Champion
This could be because PowerCards rerolls inline rolls sent to the Text Chat.
PowerCards ignores all the initial rolls and re-rolls everything after going through all the tags and stuff.
Is there any way to get the rolls that it shows in the chat?
I dunno. Probably, but I'll be honest... I have zero motivation to figure out how.
1503337297

Edited 1503337830
Hey, the following gives a correct chat result but it crashes the api (if I use it with the button, if I copy and paste it in the chat it doesn't do anything but pasting the text in the chat): !power {{ --titlebackground|none --name|Kurze Rast --tokenid|@{selected|token_id} --Heilung|~R [[ [$Dmg] ?{Wieviel Punkte|0|1|2|3|4|5}d@{selected|hitdietype} ]] ~R --alterbar3|_target|@{selected|token_id} _bar|3 _amount|+[^Dmg] }} Error: Firebase.update failed: First argument contains NaN in property 'bar3_value' Error: Firebase.update failed: First argument contains NaN in property 'bar3_value' at Ba (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:9:186) at Ba (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:10:207) at Aa (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:8:462) at Ea (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:10:403) at J.update (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:146:318) at TrackedObj._doSave (/home/node/d20-api-server/api.js:766:27) at Timeout.later [as _onTimeout] (/home/node/d20-api-server/node_modules/underscore/underscore.js:828:25) at ontimeout (timers.js:380:14) at tryOnTimeout (timers.js:244:5) at Timer.listOnTimeout (timers.js:214:5) Any idea what could be the reason? Thx and have a nice day