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

HB are you going to be adding this to conditionals?  Example: --?? $Atk.total >= @{target| |bar3} AND $Atk.base <= 20 ?? Hit|~R[[ [NH] d8 +@{STR} ]] ~R /fx missile-blood @{target|Destination|token_id} Or, would that be too much automation?
1457689794
Ziechael
Forum Champion
Sheet Author
API Scripter
Arthur B. said: Ziechael said: No problem, i've just been through ALL of my spell macros adding sound effect calls, special effects and API button based saves for quick access during play... my players won't know what hit 'em... nor will they likely appreciate the time and effort it took lol. How do you add sound effects? I have a simple, clumsy and ultimately ill-advised little script that calls sounds for me, so my powercards generally have another couple of lines outside of the powercard that adds sound, fx and a save button when needed. I would recommend using  Matt's script if you decide to go down that route as mine works for me but i wouldn't dare inflict it on others! Or, on topic for this thread, you could beg HB for sound support ;)
Maybe.
1457704554
DK Heinrich
Marketplace Creator
Sheet Author
@Ziechael - are your sounds and FX 'going off' each time use no matter the actual result of the action/attack/spell? 
1457710419
Ziechael
Forum Champion
Sheet Author
API Scripter
Yeah, my script is so basic that it even has interesting effects when having a playlist in the background. My players love it though so i just leave it. MY sound effects are all non-circumstance specific anyway. A bladed attack is a sword swoosh, a blunt attack is a splat, a bow has a string 'twang' etc. While more complex conditional based sounds would be great i'm just happy not having to remember to add zombie groans all the time manually :)
1457710608
Phoxounet
Sheet Author
Translator
Hi here ! Few times ago, I came here about adjusting initiative in powercards. the trkr command was correctly functioning, but not the adjustment of initiative. Now, it is the opposite : only the adjustment is functioning, whatever the conditional result and my tokens are sent to the tracker but with an incorrect value (always 10, never the die result). !power {{ --charid|@{character_id} --emote|**@{character_name}** fait son jet de Domination ! --name|Combat --rightsub|Domination --Capacité Hors Combat :|[[ [$Atk|TRKR] 1D10cf<0cs>11 ]] --?? $Atk.base <= @{CHC} ?? Réussite :| @{character_name} réussit son test de Domination ! --?? $Atk.base > @{CHC} ?? Echec :| @{character_name} échoue **__lamentablement__** [[10 &{tracker:-}]] ! }} Here is the powercard. (cs and cf options are here so that the inline roll always have the same result color (not critical successes or failures). Thx and regards :)
1457710630
DK Heinrich
Marketplace Creator
Sheet Author
ok, cool - that is about where I got when testing with someones version of sound I hijacked. I am about to start adding in the FX but really wanted to have options based on 'hit' or 'miss' or 'crit' etc so I will wait to see if HB jumps on that crazy train or if I have to be happy with one FX per spell :) 
Arthur B. said: Ziechael said: No problem, i've just been through ALL of my spell macros adding sound effect calls, special effects and API button based saves for quick access during play... my players won't know what hit 'em... nor will they likely appreciate the time and effort it took lol. How do you add sound effects? I use Matt's excellent script:&nbsp;<a href="https://app.roll20.net/forum/post/2923208/slug%7D" rel="nofollow">https://app.roll20.net/forum/post/2923208/slug%7D</a>
Phoxounet said: Hi here ! Few times ago, I came here about adjusting initiative in powercards. the trkr command was correctly functioning, but not the adjustment of initiative. Now, it is the opposite : only the adjustment is functioning, whatever the conditional result and my tokens are sent to the tracker but with an incorrect value (always 10, never the die result). !power {{ --charid|@{character_id} --emote|**@{character_name}** fait son jet de Domination ! --name|Combat --rightsub|Domination --Capacité Hors Combat :|[[ [$Atk|TRKR] 1D10cf&lt;0cs&gt;11 ]] --?? $Atk.base &lt;= @{CHC} ?? Réussite :| @{character_name} réussit son test de Domination ! --?? $Atk.base &gt; @{CHC} ?? Echec :| @{character_name} échoue **__lamentablement__** [[10 &{tracker:-}]] ! }} Here is the powercard. (cs and cf options are here so that the inline roll always have the same result color (not critical successes or failures). Thx and regards :) It's working properly, but the issue here is that Roll20 sees the -10 first and does that... and then the message is sent to the API to get parsed through by the powercards script. Powercards then sets the initiative to the 1d10 roll. Also, you can use NH to stop rolls from highlighting crit fails/crit successes like this: [[ [$Atk|TRKR|NH] 1d10]] [[ [NH] 1d4 ]] etc. Easier than doing [[1d4cf&lt;0cs&gt;5]]
Ziechael said: Or, on topic for this thread, you could beg HB for sound support ;) HB, consider this begging :-D
1457776416

Edited 1457776576
Phoxounet
Sheet Author
Translator
HoneyBadger said: Phoxounet said: Hi here ! Few times ago, I came here about adjusting initiative in powercards. the trkr command was correctly functioning, but not the adjustment of initiative. Now, it is the opposite : only the adjustment is functioning, whatever the conditional result and my tokens are sent to the tracker but with an incorrect value (always 10, never the die result). !power {{ --charid|@{character_id} --emote|**@{character_name}** fait son jet de Domination ! --name|Combat --rightsub|Domination --Capacité Hors Combat :|[[ [$Atk|TRKR] 1D10cf&lt;0cs&gt;11 ]] --?? $Atk.base &lt;= @{CHC} ?? Réussite :| @{character_name} réussit son test de Domination ! --?? $Atk.base &gt; @{CHC} ?? Echec :| @{character_name} échoue **__lamentablement__** [[10 &{tracker:-}]] ! }} Here is the powercard. (cs and cf options are here so that the inline roll always have the same result color (not critical successes or failures). Thx and regards :) It's working properly, but the issue here is that Roll20 sees the -10 first and does that... and then the message is sent to the API to get parsed through by the powercards script. Powercards then sets the initiative to the 1d10 roll. Also, you can use NH to stop rolls from highlighting crit fails/crit successes like this: [[ [$Atk|TRKR|NH] 1d10]] [[ [NH] 1d4 ]] etc. Easier than doing [[1d4cf&lt;0cs&gt;5]] Thx for the NH tips. However, it is not working. I removed the [[10 &{tracker:-}]] part. Tokens are not added to the turn order in my game :( With the&nbsp;[[10 &{tracker:-}]], tokens are added with initiative set at 10, and each time I run the powercard, 10 is substracted. Without the&nbsp;[[10 &{tracker:-}]] option, nothing happens in the turn order. :(
Send me an invite to your game and I'll try to pop in at some point this weekend.
1457897355

Edited 1457897734
Just now trying to load this script and I think i did it right but any time I try even one of the examples listed at the top of this thread, I get nothing in the chat. not an error, nada. Any help troubleshooting? all i did was on the api page, rename untitled.js to powercard.js and drop in the script from the github link.&nbsp; Edit: Roll20 says my scripts are currently disabled due to an error that was detected. But underneath where it says the error, it's blank. "For reference, the error message generated was: "&nbsp; And there's nothing there. I'm running D&D5e with the Community contributed character sheets that have their own built in power cards. Could that be causing an issue?
1457897916

Edited 1457898257
Silvyre
Forum Champion
Try opening the Raw link , selecting everything (Ctrl-A), then copying and pasting it into the script editor. I'm running D&D5e with the Community contributed character sheets that have their own built in power cards . What you're referring to is a Roll Template ; it has no bearing on this.
Thanks, Silvyre! That got it done. Much appreciated.
Is there a good way to get docs? &nbsp;My attempt to print was a disaster, all images came out as gigantic URLs not images...
Silvyre said: Try opening the Raw link , selecting everything (Ctrl-A), then copying and pasting it into the script editor. I'm running D&D5e with the Community contributed character sheets that have their own built in power cards . What you're referring to is a Roll Template ; it has no bearing on this. Roll Templates just wish they could be POWER CARDS! Muhahaha.... ahem... uh. I'm good. -exits stage left-
Bad DM [Matthew P.] said: Is there a good way to get docs? &nbsp;My attempt to print was a disaster, all images came out as gigantic URLs not images... What do you mean by docs?
Well basically your initial post with all of the commands and attributes, examples of usage and such. &nbsp;I went ahead and just printed it - i thought it was spamming me with URLs *instead* of the images, but upon closer inspection its spamming the URLs but then also showing the images, so its usable. &nbsp;PowerCards is a lot to learn but wow am I looking forward to this, thank all contributors and authors so much for this amazing script
A bit off topic but I cannot find this answer - in the old days, players had to be Mentors to use API commands in their macros. &nbsp;I keep seeing references implying this is no longer true now that they changed the sub system. &nbsp;Do players need to be Plus membership lvl to use powercards or say !ammo or !pic?&nbsp;
The creator of a campaign has to have a Pro account to install api scripts. That lets any players that join their campaign to use those scripts.
Hey HB, just wanted to check and see what your opinions are on sound support. I know I just posted last week, but I also know I'm not the only one who wants to know if you are thinking of adding that. Inquiring minds want to know! &lt;&lt;&lt;&lt;-------On hands and knees begging the All-Powerful Script Writer
I haven't had time to work on scripting lately between work and preparing for a face to face D&D campaign. If I do... I will probably look at the other sound script and see if it's possible to hook directly into that instead of starting from scratch.
HoneyBadger said: I haven't had time to work on scripting lately between work and preparing for a face to face D&D campaign. If I do... I will probably look at the other sound script and see if it's possible to hook directly into that instead of starting from scratch. Cool beans, good to know. Thanks for letting us know.
Hey all, &nbsp;Having another problem that I can't seem to figure out. &nbsp;For some reason the Header on the PowerCard is not coming out correctly and it's using the same roll for all attacks. Here is the code: !power {{ --charid|@{character_id} --emote|**@{character_name}** //shoots [[3]] eye rays at random!// --title|Eye Ray: [[ [$Eye] 1d10 ]] --name|Eye Rays --leftsub|Action --rightsub|Range 120' --?? $Eye == 1 ?? Attack *1|^* //Charm Ray: **@{target|1st|token_name}** must succeed on a WIS [[@{DC}]] DC Save or be Charmed for 1 Hour, or until the **@{character_name}** harms them!// --?? $Eye == 2 ?? Attack *1|^* //Paralyzing Ray: **@{target|1st|token_name}** must succeed on a CON [[@{DC}]] DC Save or be Paralyzed for 1 Minute. The target can repeat the saving throw at the end of each of its turns, ending the effect on a success.// --?? $Eye == 3 ?? Attack *1|^* //Fear Ray: **@{target|1st|token_name}** must succeed on a WIS [[@{DC}]] DC Save or be Frightened for 1 Minute. The target can repeat the saving throw at the end of its turns, ending the effect on a success.// --?? $Eye == 4 ?? Attack *1|^* //Slowing Ray: **@{target|1st|token_name}** must succeed on a DEX [[@{DC}]] DC Save or your speed is halved for 1 Minute. In addition target can't take reactions, and can take //either// an action or a bonus action on their turn, but not both. The target can repeat the saving throw at the end of each of its turns, ending the effect on a success.// --?? $Eye == 5 ?? Attack *1|^* //Enervation Ray: **@{target|1st|token_name}** must succeed on a CON [[@{DC}]] DC Save or take [[ [nh] 8d8]] Necrotic damage on a failed save, or 1/2 damage on a success.// --?? $Eye == 6 ?? Attack *1|^* //Telekinetic Ray: **@{target|1st|token_name}** must succeed on a CON [[@{DC}]] DC Save or the beholder moves it up to 30' in any direction. It is Restrained by the ray's telekinetic grip until the start of the beholder's next turn.// --?? $Eye == 7 ?? Attack *1|^* //Sleep Ray: **@{target|1st|token_name}** must succeed on a WIS [[@{DC}]] DC Save or fall asleep and remain unconscious for 1 Minute. The target awakens if it takes damage or another creature takes an action to wake it.// --?? $Eye == 8 ?? Attack *1|^* //Petrification Ray: **@{target|1st|token_name}** must succeed on a DEX [[@{DC}]] DC Save or be turned to stone and it is Restrained. The target must repeat the saving throw at the end of its next turn. On a success the effect ends, on a failure the target is petrified until freed by a **Greater Restoration** spell or other magic.// --?? $Eye == 9 ?? Attack *1|^* //Disintegration Ray:**@{target|1st|token_name}** must succeed on a DEX [[@{DC}]] DC Save or take [[ [nh] 10d8 ]] Force damage. If this damage reduces the creature to 0 HP, it's body becomes a pile of fine gray dust!// --?? $Eye == 10 ?? Attack *1|^* //Death Ray: **@{target|1st|token_name}** must succeed on a DEX [[@{DC}]] DC Save or take [[ [nh] 10d10 ]] Necrotic damage. the target dies if the ray reduces it to 0 HP!// --!Blank1|~~~ --?? $Eye == 1 ?? Attack *2|^* //Charm Ray: **@{target|2nd|token_name}** must succeed on a WIS [[@{DC}]] DC Save or be Charmed for 1 Hour, or until the **@{character_name}** harms them!// --?? $Eye == 2 ?? Attack *2|^* //Paralyzing Ray: **@{target|2nd|token_name}** must succeed on a CON [[@{DC}]] DC Save or be Paralyzed for 1 Minute. The target can repeat the saving throw at the end of each of its turns, ending the effect on a success.// --?? $Eye == 3 ?? Attack *2|^* //Fear Ray: **@{target|2nd|token_name}** must succeed on a WIS [[@{DC}]] DC Save or be Frightened for 1 Minute. The target can repeat the saving throw at the end of its turns, ending the effect on a success.// --?? $Eye == 4 ?? Attack *2|^* //Slowing Ray: **@{target|2nd|token_name}** must succeed on a DEX [[@{DC}]] DC Save or your speed is halved for 1 Minute. In addition target can't take reactions, and can take //either// an action or a bonus action on their turn, but not both. The target can repeat the saving throw at the end of each of its turns, ending the effect on a success.// --?? $Eye == 5 ?? Attack *2|^* //Enervation Ray: **@{target|2nd|token_name}** must succeed on a CON [[@{DC}]] DC Save or take [[ [nh] 8d8]] Necrotic damage on a failed save, or 1/2 damage on a success.// --?? $Eye == 6 ?? Attack *2|^* //Telekinetic Ray: **@{target|2nd|token_name}** must succeed on a CON [[@{DC}]] DC Save or the beholder moves it up to 30' in any direction. It is Restrained by the ray's telekinetic grip until the start of the beholder's next turn.// --?? $Eye == 7 ?? Attack *2|^* //Sleep Ray: **@{target|2nd|token_name}** must succeed on a WIS [[@{DC}]] DC Save or fall asleep and remain unconscious for 1 Minute. The target awakens if it takes damage or another creature takes an action to wake it.// --?? $Eye == 8 ?? Attack *2|^* //Petrification Ray: **@{target|2nd|token_name}** must succeed on a DEX [[@{DC}]] DC Save or be turned to stone and it is Restrained. The target must repeat the saving throw at the end of its next turn. On a success the effect ends, on a failure the target is petrified until freed by a **Greater Restoration** spell or other magic.// --?? $Eye == 9 ?? Attack *2|^* //Disintegration Ray:**@{target|2nd|token_name}** must succeed on a DEX [[@{DC}]] DC Save or take [[ [nh] 10d8 ]] Force damage. If this damage reduces the creature to 0 HP, it's body becomes a pile of fine gray dust!// --?? $Eye == 10 ?? Attack *2|^* //Death Ray: **@{target|2nd|token_name}** must succeed on a DEX [[@{DC}]] DC Save or take [[ [nh] 10d10 ]] Necrotic damage. the target dies if the ray reduces it to 0 HP!// --!Blank2|~~~ --?? $Eye == 1 ?? Attack *3|^* //Charm Ray: **@{target|3rd|token_name}** must succeed on a WIS [[@{DC}]] DC Save or be Charmed for 1 Hour, or until the **@{character_name}** harms them!// --?? $Eye == 2 ?? Attack *3|^* //Paralyzing Ray: **@{target|3rd|token_name}** must succeed on a CON [[@{DC}]] DC Save or be Paralyzed for 1 Minute. The target can repeat the saving throw at the end of each of its turns, ending the effect on a success.// --?? $Eye == 3 ?? Attack *3|^* //Fear Ray: **@{target|3rd|token_name}** must succeed on a WIS [[@{DC}]] DC Save or be Frightened for 1 Minute. The target can repeat the saving throw at the end of its turns, ending the effect on a success.// --?? $Eye == 4 ?? Attack *3|^* //Slowing Ray: **@{target|3rd|token_name}** must succeed on a DEX [[@{DC}]] DC Save or your speed is halved for 1 Minute. In addition target can't take reactions, and can take //either// an action or a bonus action on their turn, but not both. The target can repeat the saving throw at the end of each of its turns, ending the effect on a success.// --?? $Eye == 5 ?? Attack *3|^* //Enervation Ray: **@{target|3rd|token_name}** must succeed on a CON [[@{DC}]] DC Save or take [[ [nh] 8d8]] Necrotic damage on a failed save, or 1/2 damage on a success.// --?? $Eye == 6 ?? Attack *3|^* //Telekinetic Ray: **@{target|3rd|token_name}** must succeed on a CON [[@{DC}]] DC Save or the beholder moves it up to 30' in any direction. It is Restrained by the ray's telekinetic grip until the start of the beholder's next turn.// --?? $Eye == 7 ?? Attack *3|^* //Sleep Ray: **@{target|3rd|token_name}** must succeed on a WIS [[@{DC}]] DC Save or fall asleep and remain unconscious for 1 Minute. The target awakens if it takes damage or another creature takes an action to wake it.// --?? $Eye == 8 ?? Attack *3|^* //Petrification Ray: **@{target|3rd|token_name}** must succeed on a DEX [[@{DC}]] DC Save or be turned to stone and it is Restrained. The target must repeat the saving throw at the end of its next turn. On a success the effect ends, on a failure the target is petrified until freed by a **Greater Restoration** spell or other magic.// --?? $Eye == 9 ?? Attack *3|^* //Disintegration Ray:**@{target|3rd|token_name}** must succeed on a DEX [[@{DC}]] DC Save or take [[ [nh] 10d8 ]] Force damage. If this damage reduces the creature to 0 HP, it's body becomes a pile of fine gray dust!// --?? $Eye == 10 ?? Attack *3|^* //Death Ray: **@{target|3rd|token_name}** must succeed on a DEX [[@{DC}]] DC Save or take [[ [nh] 10d10 ]] Necrotic damage. the target dies if the ray reduces it to 0 HP!// }} And here is the output: Any help would be appreciated. :-)
If it's always going to be three rays... remove the roll from the title. Inline roll id's don't work in the title box anyway. That's processed before the rest of the card. You should do three eye rolls in --hroll like this: --hroll| [[ [$Eye1] 1d10 ]] [[ [$Eye3] 1d10 ]] [[ [$Eye3] 1d10 ]] --?? $Eye1 == 1 ?? Attack *1 etc... --?? $Eye2 == 1 ?? Attack *2 etc... --?? $Eye3 == 1 ?? Attack *3 etc...
Thanks HB, that helped loads. I tried to use the --hroll| tag but didn't try it with the 3 [[ [@Eye] 1d10 ]] tags. Did I ever mention that you are an awesome person? (Rhetorical question, we all know you are!!) :-)
1458740056

Edited 1458740116
I have a game on the Dev server with Powercards - doesn't have a problem with it active. Another on production, same code and it's giveing an error, and - not being self depricating,&nbsp;melerly objective - I am too ignorant on what is happening to fix it myself. &nbsp; What can I provide to help me describe the problem better for troubleshooting.&nbsp;
1458748938
Silvyre
Forum Champion
Try a fresh install using the RAW link (i.e. Select All, Copy, Paste, Save Scripts) <a href="https://gist.githubusercontent.com/Sky-Captain-13/452330a3d926b32da49c/raw/" rel="nofollow">https://gist.githubusercontent.com/Sky-Captain-13/452330a3d926b32da49c/raw/</a> Otherwise, let us know what error you're getting.
I have cut and paste from RAW, and from the Dev.&nbsp; It's&nbsp;an Unexpected token * which - from what I understand means I cut and pasted it wrong.. but I've done this like 8 times so ... I'm... really expressing how ignorant I am. (Yes this is me trying to code the wild surge and show my DM it works) It seems. and I know PowerCards is contained (from the Forum - those were the words, but I don't know what that means), but it seems&nbsp; SpeechBalloons when they are both active it causes Powercards to fail (On Production).&nbsp;
1458752332
Silvyre
Forum Champion
Try adding a ; to the end of PowerCards' code, on a new line.
1458752588

Edited 1458752632
Ziechael Fixed the issue - it wasn't "an interaction" is was the order of the scripts- and the whole one long script, so one of the other scripts was causing the problem because of an additional * on a previous script Sorry.&nbsp;
1459186982

Edited 1459188595
Maybe a simple fix, but I keep having this happen and can not figure out how to prevent it. I have the USE_TIMESTAMPS set to false, but keep getting a : every once in a while in chat. &nbsp;Any ideas on how to prevent this??? // POWERCARD PowerCard.Process = function(msg, player_obj) { &nbsp; &nbsp; // USER CONFIGURATION &nbsp; &nbsp; var ALLOW_URLS = false; // Allows players to include full urls in powercards &nbsp; &nbsp; var ALLOW_HIDDEN_URLS = false; // Allows players to hide urls as a link instead &nbsp; &nbsp; var CUSTOM_EMOTES = true; // Set to true to use custom emotes instead of Roll20 emotes &nbsp; &nbsp; var SHOW_AVATAR = true; // Set to false to hide character sheet avatar in custom emotes &nbsp; &nbsp; var USE_DEFAULT_FORMAT = false; // Set to true if you want powercards to default formatting &nbsp; &nbsp; var USE_PLAYER_COLOR = false; // Set to true to override all color formatting &nbsp; &nbsp; var USE_TIMESTAMPS = false; // Set to false to turn off time stamps in chat
Nope. It's part of that issue with Roll20's chat system that puts the avatar/chat name into chat every six/seven lines. I usually just enter a line in chat to break up the current count with a new name and that helps somewhat.
1459258181

Edited 1459258202
March 29th, 2016 ~ 10:00 am eastern Version: 3.2.18 Link: gist.github.com/Sky-Captain-13/452330a3d926b32da49c Minor Update: Added RPND which is a reverse of XPND. [[ [rpnd] 1d20 + 4 ]] will show up as Total = Roll + Mods instead of Roll + Mods = Total. (YAGKR... =^_^= ) Minor Update: Added PowerCards Status List as an allowed name for the handout used to define status icon names and information. (YAGKR... =^_^= )
1459265649
Gen Kitty
Forum Champion
I'll test out the RPND as soon as practical, thanks HB!
Is there a way to do a max() or min() operation on values in the inline roll (either natively, or in PowerCards)? There are a lot of spell effects in D&D which have capped effects, such as &nbsp;1d6/caster level, max 20d6. I can think of some hacky ways of getting around this, but I'd like to just do it in the inline roll referencing the character's @{CL}.
1459268554

Edited 1459268629
Silvyre
Forum Champion
Samuel Penn said: Is there a way to do a max() or min() operation on values in the inline roll (either natively, or in PowerCards)? Roll20's&nbsp; Keep / Drop functions work well for this. e.g. [[ [[{@{casterlevel}, 20}kl1]]d6 ]]
That works great, thanks.
I'm now seeing something strange in the Power Cards output. I have two characters with exactly the same attributes (cut and pasted - oh for OO inheritance), and one of them is not displaying the character's avatar image in the emote, but is instead putting 'MV' as the first line of the power card output (after the title block). Screenshot here: For the first character it works, for the second, it doesn't. The character does have an image (and seems to get displayed okay by other scripts I have which display it inline in the chat. All PowerCards for this character have started exhibiting this behaviour. An example for the above screen shot is below: !power {{ --format|magic --name|Destruction --charid|@{character_id} --emote|~L The **@{selected|token_name}** calls on the Spider Queen to utterly destroy one who has offended her. --leftsub|Spell 7th --rightsub|Necromancy [Death] --Range|[[ [TXT]d0+ 25 + floor(@{CL}/2)*5]]ft --Targets|One creature --Spell Penetration|[[d20 + @{Penetration}]] --Save|Fortitude [[ [TXT]d0+17 + @{SpellStat}]] partial --!Effects|Unless the target makes their saving throw, they are utterly destroyed leaving behind no remains except for their possessions. On success, the target takes [[ [NH]10d6]] damage. --!Link|@@<a href="http://www.d20srd.org/srd/spells/destruction.htm||SRD@@" rel="nofollow">http://www.d20srd.org/srd/spells/destruction.htm||SRD@@</a> }} Any idea what could be causing this?
I've managed to fix it, though still no idea why there was a problem or why it is fixed. I duplicated the character, changed it's picture, and then editing the GM Notes of the token got it to work. All three steps seemed to be needed. I then changed the picture back to the original one, and it is still working. At least for now.
Samuel Penn said: I've managed to fix it, though still no idea why there was a problem or why it is fixed. I duplicated the character, changed it's picture, and then editing the GM Notes of the token got it to work. All three steps seemed to be needed. I then changed the picture back to the original one, and it is still working. At least for now. It was probably the character ID. Duplicating it should have been enough to fix the problem. It's rare, but it happens occasionally.&nbsp;
Thanks HoneyBadger. For my next question,&nbsp;I'm trying to combine maximum rolls, variables and multiple actions, and running into problems. I have a spell, Chain Missile , which creates 1 missile per two caster levels (maximum 10), each doing 1d4+1 damage. Then each missile rebounds onto a different target. So I need to roll Xd4+X, then make X 1d4+1 rolls. Firstly, I've tried creating a variable with '--hroll' so I don't have to repeat the same equation multiple times. Though I can reference that variable as text using [^Number], I can't figure out how to insert this into an inline roll, e.g. [[ [^Number]d4 + [^Number] ]]. Is this possible, and if so, what is the correct syntax? Secondly, can I define the number of repeating tags as a variable? e.g. "--Missile#[^Number]|It does [[d4+1]] damage". I can stick a basic attribute in there (such as "--Missile#@{CL}|It does [[d4+1]]"), but again can't figure out the syntax for either an equation or a variable. The interesting part of my macro is currently this: --hroll|[[ [$Number] [[ {floor(@{CL}/2),10}kl1 ]]d1 ]] --!Effects|The [^Number] missiles strike one creature doing [[ [NH] [[ {floor(@{CL}/2),10}kl1 ]]d4 + [[ {floor(@{CL}/2),10}kl1 ]] ]] damage, then up to [^Number] further creatures no more than 30ft away. Each creature can only be hit by one missile. --Missile#10| does [[ [NH]d4+1]] force damage Currently I'm having to repeat the calculation for number of missiles several times, which I don't like. I've also hard coded the number of missiles to 10 for the repeating part for now, but it would be good for this to be worked out correctly. btw, I don't need/want to be able to actually select targets by clicking on them - just a simple list of the right number of damages is all I'm after. Thanks, Sam.
Conditionals can't be used as variabless like that. I'll take a closer look at your macro in the morning. Am at work right now.
Jeez i feel like a Kindergartener at College Master MJ how did you get those Slowed and Unconscious lines with icons into your powercard? &nbsp;I do not see anything like that on my allowed tag list. &nbsp;I am dumb.
1459330543

Edited 1459330632
Also I am seeing people use code that i find documented nowhere. &nbsp;Off the top of my head: - setting variables using $ &nbsp;- hroll? &nbsp;where is this documented? combining the two i see something like&nbsp; --hroll|[[ [$Whatever] @{selected|someAttribute} + 0d0 ]] so ive gathered from context that hroll means hidden roll, and that you can slap a $ in front of a keyword to create a variable, and that adding 0d0 makes it into a numeric, but this has taken me a day and i still have a ton more questions. Is there some guide I am missing? &nbsp; <a href="https://wiki.roll20.net/Macros" rel="nofollow">https://wiki.roll20.net/Macros</a> doesnt explain any of this - it doesnt even explain conditionals. &nbsp;I feel like there is some major guide i have missed. &nbsp;Any help?
1459333576

Edited 1459334285
Here is a more concrete example of what I am trying to do. &nbsp;Id love a generic attack macro, but am setting for a Gug (Pathfinder) based one. - it might bite or claw - it might Power Attack or not. &nbsp; - skip the rest of its powers for now &nbsp;- sure if it full attacks it is simpler but i am trying to learn - sure i could make a separate button for claw or bite but im trying to learn !power {{ --tokenid|@{selected|token_id} --emote|//@{selected|token_name} attacks with a ?{Attacks With?|Bite, [$weap] = "Bite"]|Claw, [$weap] = "Claw"}!// --name|@{selected|token_name}&nbsp;?{Power Attack?|No, "Attacks!" [$PA] = 0|Yes, "Power Attacks!" [$PA] = 1} --?? $weap == "Bite ?? [$dmg] = "1d8+7" --?? $weap == "Claw" ?? [$dmg] = "1d6+7" --Attack|[[1d20 + 17]] --Hit|[[ [$dmg] + 0d0 ]] P or S --?? $PA == 1 ?? Subtract -3 from attack and add +6 to damage for Power Attack }}
1459336679
Ziechael
Forum Champion
Sheet Author
API Scripter
Hi Matthew, the&nbsp; OP discusses the myriad of ways that PowerCards can enhance your life, including the use of conditional roll ids [$...], hroll tags and the condition symbology etc. I HIGHLY recommend taking a look through the entire first post. Then I would recommend starting small and working your way up to more complex powercards. While you'll certainly get help here and even get your problems solved for you the key to flexible powercarding is self sustainability... with that in mind i'm now going to take a look at your desired card and see if can help get you started... but make sure to read that OP!! :)
1459339779

Edited 1459340854
Ziechael
Forum Champion
Sheet Author
API Scripter
Ok, this is a good start... the power attack is limited by not being able to compare against query results with spaces in them or using &lt;&gt; to compare to the single word query result (i may be wrong so putting it out there for correction!): !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}! --?? ?{Power Attack?} == Attacks ?? !Attack1|**Attack:** [[1d20 + 17]] --?? ?{Power Attack?} == Power ?? !Attack2|**Attack:** [[1d20 + 14]] --?? ?{Attacks With?} == Bite AND ?{Power Attack?} == Attacks ?? !damage1|**Damage:** [[ [$dmg] 1d8+7 ]] --?? ?{Attacks With?} == Bite AND ?{Power Attack?} == Power ?? !damage1|**Damage:** [[ [$dmg] 1d8+13 ]] --?? ?{Attacks With?} == Claw AND ?{Power Attack?} == Attacks ?? !damage2|**Damage:** [[ [$dmg2] 1d6+7 ]] --?? ?{Attacks With?} == Claw AND ?{Power Attack?} == Power ?? !damage2|**Damage:** [[ [$dmg2] 1d6+13 ]] }} To talk you through it line by line (apart from the obvious): --emote|@{selected|token_name} attacks with a ?{Attacks With?|Bite|Claw}! -- You can insert the attack type query without a roll id as we'll use the query to do the comparison --name|@{selected|token_name} ?{Power Attack?|No,Attacks|Yes,Power}!&nbsp;-- You can insert the attack type query without a roll id as we'll use the query to do the comparison --?? ?{Power Attack?} == Attacks ?? !Attack1|**Attack:** [[1d20 + 17]] -- looks at the query to determine if this is a power attack or not --?? ?{Power Attack?} == Power ?? !Attack2|**Attack:** [[1d20 + 14]] -- as above --?? ?{Attacks With?} == Bite AND ?{Power Attack?} == Attacks ?? !damage1|**Damage:** [[ [$dmg] 1d8+7 ]] -- looks to see if the attack was a bite and whether it is a power attack or not. --?? ?{Attacks With?} == Bite AND ?{Power Attack?} == Power ?? !damage1|**Damage:** [[ [$dmg] 1d8+13 ]] -- as above --?? ?{Attacks With?} == Claw AND ?{Power Attack?} == Attacks ?? !damage2|**Damage:** [[ [$dmg2] 1d6+7 ]] -- as above --?? ?{Attacks With?} == Claw AND ?{Power Attack?} == Power ?? !damage2|**Damage:** [[ [$dmg2] 1d6+13 ]] -- as above Key things to note: Tags should be unique so sometimes you need to make fake tags using the ! prefix and beginning the row contents with a bolded (**...***) tag name (see above for examples). Your hard coded values can be attribute calls/calculations for a dynamic powercard that increases the bonuses as you level. Disclaimer: there are better Power Carders out there, if one of them contradicts me in any way listen to them... i will be ;) Also the name tag will look weird until someone shows me a way to use query results with spaces in them ;)
Personally, I would use one Roll ID for the attack type and use a roll query and some multiplication for the power attack modifiers. Using this method, you could make the power attack value variable even by changing it to a single query instead of a dropdown. Such as... ?{Power Attack|0} instead of ?{Power Attack|No, 0|Yes, 6} !power {{ --tokenid|@{selected|token_id} --hroll|[[ [$AtkType] ?{Attack|w/Bite, 1|w/Claws, 2} + 0d0]] --name:|Attack! --Attack:| [[ 1d20 + 17 - [[ floor((1 * ?{Power Attack|No, 0|Yes, 6}) / 2) ]] ]] vs AC --?? $AtkType == 1 ?? Bite:| [[ 1d8 + 7 + [[?{Power Attack|No, 0|Yes, 6}]] [Power Attack] ]] damage --?? $AtkType == 2 ?? Claw:| [[ 1d6 + 7 + [[?{Power Attack|No, 0|Yes, 6}]] [Power Attack] ]] damage }}