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
July 07 (7 years ago)
Ravenknight
KS Backer

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! 
July 07 (7 years ago)

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


July 07 (7 years ago)

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.
July 08 (7 years ago)

Edited July 08 (7 years ago)
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.
July 08 (7 years ago)
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.
}}
July 11 (7 years ago)
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.
July 12 (7 years ago)
!power {{
--Roll:|[[ [$Roll] 1d8]]
--Result:|[^Roll]
}}
July 12 (7 years ago)

Edited July 12 (7 years ago)
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}]]}}
July 12 (7 years ago)
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 ! :) 
July 12 (7 years ago)

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 ! :) 

https://app.roll20.net/images/statussheet.png
"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"
July 14 (7 years ago)
Ravenknight
KS Backer

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 ! :) 

Tracker Jacker is somewhat outdated but can add and remove icons from tokens. Check it out.
July 15 (7 years ago)
Phoxounet
Sheet Author
Translator
Thx all :)
July 15 (7 years ago)
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] 
}}
and finally, the error I get :
TypeError: Cannot read property 'icon' of undefined
TypeError: Cannot read property 'icon' of undefined
    at statusSymbol (apiscript.js:797:50)
    at RegExp.[Symbol.replace] (native)
    at String.replace (native)
    at formatter (apiscript.js:850:18)
    at doInlineFormatting (apiscript.js:884:11)
    at apiscript.js:456:23
    at Array.forEach (native)
    at apiscript.js:454: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)

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.
July 15 (7 years ago)
Try adding additional lines into the handout.
July 15 (7 years ago)
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.
July 15 (7 years ago)
Try re-creating the handout from scratch. I have not been able to recreate that bug.
July 15 (7 years ago)

Edited July 15 (7 years ago)
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.
August 06 (7 years ago)

Edited August 06 (7 years ago)
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 < @{target|npc_ac} ?? !Missed|**You missed!**
--?? $Atk >= @{target|npc_ac} AND $Atk.base <> 20 ?? Hit:| [[ [$Dmg] 1d10]] fire damage
--?? $Atk >= @{target|npc_ac} AND $Atk.base <> 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. 

Why would it treat one token fine and another token in error? Do some tokens not get good ids? 

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?

August 06 (7 years ago)
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.
August 06 (7 years ago)

Edited August 06 (7 years ago)
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. 

The API script isn't actually crashing, it's throwing that error up in the chat. 


August 06 (7 years ago)
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?
August 06 (7 years ago)

Edited August 06 (7 years ago)
Copy and paste. Delete the old one.
August 09 (7 years ago)
Hey, 
does anyone has an good and easy way to include the crit damage for a sneak attack? 

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<1+@{selected|dexterity_mod}|Vorteil, 2d20kh1r<1+@{selected|dexterity_mod}|Nachteil, 2d20kl1r<1+@{selected|dexterity_mod}} ]] ~R
--?? $Atk >= @{target||ac} ?? soundfx1|_play|Stichangriff
--?? $Atk < @{target||ac} ?? !Missed|**Verfehlt!**
--?? $Atk < @{target||ac} ?? soundfx2|_play|Miss
--?? $Atk >= @{target||ac} AND $Atk.base <> 20 ?? Stichschaden:|~R ?{Hinterhalt?|Nein,[[ [$Dmg] 1d6+@{selected|dexterity_mod} ]]|Ja,[[ [$Dmg] 2d6+@{selected|dexterity_mod} ]] } ~R
--?? $Atk >= @{target||ac} AND $Atk.base <> 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.

August 09 (7 years ago)

Edited August 09 (7 years ago)
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<1 + @{selected|dexterity_mod} ]] ~R
--?? $Atk >= @{target||ac} ?? soundfx1|_play|Stichangriff
--?? $Atk < @{target||ac} ?? !Missed|**Verfehlt!**
--?? $Atk < @{target||ac} ?? soundfx2|_play|Miss
--?? $Atk >= @{target||ac} AND $Atk.base <> 20 ?? Stichschaden:|~R [[ [$Dmg] ?{Hinterhalt?|Nein, 1|Ja, 2}d6 + @{selected|dexterity_mod} ]] } ~R
--?? $Atk >= @{target||ac} AND $Atk.base <> 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]
}}
August 09 (7 years ago)
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 : 
!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)
August 10 (7 years ago)

Edited August 10 (7 years ago)
It's not possible, unfortunately.
August 10 (7 years ago)
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  except for the roll ID tat can't be found apparently
August 12 (7 years ago)
Hey again, 

is there a way to apply multiple damage to multiple targets with alterbar functionality? 
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 >= @{target||ac} ?? soundfx1|_play|Magisches Geschoss
--?? $Atk < @{target||ac} OR $Atk.base == 1 ?? !Missed|**Verfehlt!**
--?? $Atk < @{target||ac} ?? soundfx2|_play|GeschossMiss
--?? $Atk >= @{target||ac} AND $Atk.base <> 20 ?? Energieschaden1|~R [[ [$Dmg1] 1d4+1 ]] ~R
--?? $Atk >= @{target||ac} AND $Atk.base <> 20 ?? Energieschaden2|~R [[ [$Dmg2] 1d6+1 ]] ~R
--?? $Atk >= @{target||ac} AND $Atk.base <> 20 ?? alterbar3|_target|@{target||token_id} _bar|3 _amount|-[^Dmg1]
--?? $Atk >= @{target||ac} AND $Atk.base <> 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
August 12 (7 years ago)
Not via powercards unfortunately.
August 13 (7 years ago)
Okay, Thank you for the reply. 
August 15 (7 years ago)

Edited August 15 (7 years ago)
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 :| [[  [$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}  ]]
--?? $Test.base <> 1 AND $Test.base <> 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 : 17
Conséquence : Échec de la prise de risque.Résultat Effectif : 6
Conséquence : Échec de la prise de risque.Résultat Effectif : $[[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.
August 15 (7 years ago)

Edited August 15 (7 years ago)
--?? $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 <> 1 AND $Test.base <> 11 AND $Test.base % 2 with just $Test.base % 2
August 15 (7 years ago)
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 <> 1 AND $Test.base <> 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 ?

August 15 (7 years ago)
Yes. Use Conséquence : *1 and Conséquence : *2 instead of just Conséquence : twice.
August 15 (7 years ago)
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. 
August 18 (7 years ago)
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  The Damage result should be 4. Here is the data that my API pulled: https://pastebin.com/geCDNUwN

Any way to fix this?
August 18 (7 years ago)
This could be because PowerCards rerolls inline rolls sent to the Text Chat.
August 18 (7 years ago)
PowerCards ignores all the initial rolls and re-rolls everything after going through all the tags and stuff.
August 18 (7 years ago)
Is there any way to get the rolls that it shows in the chat?
August 19 (7 years ago)
I dunno. Probably, but I'll be honest... I have zero motivation to figure out how.
August 21 (7 years ago)

Edited August 21 (7 years ago)
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