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 2

Thanks GenKitty, those are great suggestions. I will incorporate them.
1421876559
vÍnce
Pro
Sheet Author
OPEN QUESTION: How do you picture using powercards and roll templates together?
I have actually taken the formatting out of PowerCards, atm only using the multi-roll feature, but I intend to also use target charms once I work out where in number of targets input -> target list -> chat result workflow "@{target|...}" works
Regarding the question. I really like Powercards and have a modified 5e sheet, however I think I will see how the roll templates are created for the specific sheet. There is one feature that I really like with Powercards though that doesn't seem to be something the DEV team is going to include in the Roll Templates, and that is the ability to pull in and use the color set by the player. If this feature was added by DEV, I would probably invest time into setting up roll templates.
1421886141
Gen Kitty
Forum Champion
To me, roll templates are something that are entirely GM-side, or 99% so. From what I see, and I haven't been playing around with them on the dev server because $reasons, the only thing a player can do is take the legos given to him/her by the GM and put them together in different orders when making macros, and I'm not even sure how much of that a player can do. Powercards, on the other hand, can be 100% player driven. Players set the formatting, players set the order of elements in a card, players set the emotes and the card prose. All the GM needs to do is make sure they have the right script installed and stand back. So templates are nice, *if*the GM is on the ball *and* willing to go the extra effort *and* willing to work with the players; but I vastly prefer the powercards because as a *player*, my experiences have been that GMs are maybe willing to go to the trouble of installing a script (3 of 5 so far) ... but I can't see *any* of the GMs I've played with willing to go through the extra effort I perceive the roll templates to involve at this point in time, and even if they are, everyone's locked into the same format. Which withers my artistic soul ^_-
1421889957
The Aaron
Forum Champion
API Scripter
Great summary, GenKitty! I'll add that the while the Power Cards and Roll Templates seem very similar, they fill different roles as GenKitty mentioned. They also have different development paths. Power Cards will likely always be pushing the user experience on the leading edge of player desires. Scripters will be adding features they want and trying new things and constantly enhancing the state of the art. Role Templates are fantastic for Chatacter sheet developers and awesome for GMs, but API scripts will be constantly pushing out ahead of them. :)
I'm gonna play around with these. I've been looking for a good solution for games such as Firefly. Not sure these will be the answer, but there are so many options here that I might find something!
1422238295
Chad
Plus
Sheet Author
Personally, I prefer powercards because it puts the players in control and each of them can have a different look to their cards if they like. I am excited about the idea of roll templates, but I really don't want all players ot have to look the same. I'll likely add a template for those people who want them because they are easier, but powercards will always be my favorite.
I'm loving using this script as a quick way to output npc information from macros. Now, I have a token action which spits out the vulnerabilities, resistances and immunities for any given creature. Etc. A couple of questions, though Is it possible to have a subtitle without declaring both a leftsub and a rightsub? I'd like to give subtitles to my cards (creature name on one level, information category on the other level), but right now, I have to enter a dummy value into rightsub to get the information in leftsub to display. Is it possible to set a "default" format in the PowerCards Format journal entry? Thanks for the great work on this, everybody.
1422250551

Edited 1422250663
vÍnce
Pro
Sheet Author
redrick W. said: I'm loving using this script as a quick way to output npc information from macros. Now, I have a token action which spits out the vulnerabilities, resistances and immunities for any given creature. Etc. A couple of questions, though Is it possible to have a subtitle without declaring both a leftsub and a rightsub? I'd like to give subtitles to my cards (creature name on one level, information category on the other level), but right now, I have to enter a dummy value into rightsub to get the information in leftsub to display. Is it possible to set a "default" format in the PowerCards Format journal entry? Thanks for the great work on this, everybody. I think you have to include the other tag ( --rightsub| ), but it can be empty and yes, you can create a default style in a handout called " PowerCard Formats" Change your script to accommodate the default style as well. At least this is what I have. var USE_DEFAULT_FORMAT = true; // Set to true if you want powercards to default formatting
1422296056
vÍnce
Pro
Sheet Author
redrick W. said: I'm loving using this script as a quick way to output npc information from macros. Now, I have a token action which spits out the vulnerabilities, resistances and immunities for any given creature. Etc. A couple of questions, though Is it possible to have a subtitle without declaring both a leftsub and a rightsub? I'd like to give subtitles to my cards (creature name on one level, information category on the other level), but right now, I have to enter a dummy value into rightsub to get the information in leftsub to display. Is it possible to set a "default" format in the PowerCards Format journal entry? Thanks for the great work on this, everybody. Short term bugfix for the subtitle stuff... just replace everything in the script from // CREATE to // BACKGROUND starting at line 146: // CREATE THE SUBTITLES var Diamond = " &" + "#x2666; "; var Subtitle = "<br><span style='font-family: " + PowerCard.subtitlefont + "; font-size: " + PowerCard.subtitlefontsize + "; font-weight: normal;'>"; Subtitle += (PowerCard.leftsub !== undefined) ? PowerCard.leftsub : ""; Subtitle += (PowerCard.leftsub !== undefined && PowerCard.rightsub !== undefined) ? Diamond : ""; Subtitle += (PowerCard.rightsub !== undefined) ? PowerCard.rightsub : ""; Display += doInlineFormatting(Title + Subtitle + "</span></div>", ALLOW_URLS, ALLOW_HIDDEN_URLS); // BACKGROUND IMAGES
I am having trouble sending hidden urls in whispered cards. I get the naked url and some coding language in the power card. (copied from the power card chat output) <a href="http://journal.roll20.net/handout/-JfGEZlwXQmUfLY15PRB" rel="nofollow">http://journal.roll20.net/handout/-JfGEZlwXQmUfLY15PRB</a> ' style='color:#000; text-decoration: underline;'&gt;blindsense The powercard script I am using. !power --whisper|gm --name|@{selected|token_name}'s Perception Check --format| --Roll|[[1d20+11]] --Blindsense|@@journal.roll20.net/handout/-JfGEZlwXQmUfLY15PRB||blindsense@@ The rest of the card is working fine, but the links just aren't working the way they do in a non-whispered card.
1422406550
vÍnce
Pro
Sheet Author
Have to ask. Have you made the changes to the script to allow hidden url's? @@ <a href="http://www.roll20.net@@" rel="nofollow">www.roll20.net@@</a> - Naked url, requires that ALLOW_URLS to be set to true in the script. @@ <a href="http://www.roll20.net||Roll20@@" rel="nofollow">www.roll20.net||Roll20@@</a> - Hidden url, requires that ALLOW_HIDDEN_URLS to be set to true in the script. @@url||text@@ &lt;-- Must have double bars in between the url and the text. In order to prevent issues with the italics text formatting and urls, do not add http:// to the front of your urls. The script will do this when the macro is run in Roll20.
1422406955

Edited 1422407323
Yes, in my post, the http:// was removed from the url and there are || between the url and the text. If I remove the --whisper|gm tag from the !power macro, the hidden urls work. It's only when I have the --whisper tag in the macro that it stops working as a hidden url. If you are asking if I have changed the API script, no, I haven't changed any code in the API. However the lines ALLOW_URLS and ALLOW_HIDDEN_URLS are both set to true.
1422408252
vÍnce
Pro
Sheet Author
Are you using the current version of the script? Are you on the Main or Dev, and what version are you using? I just tested on the DEV with v2.4.1 and it works with --whisper| for me.
I'm using 2.3.4 on the Main server. I understood that was the latest version for the Main (not Dev) servers.
1422413261
vÍnce
Pro
Sheet Author
Trevor D. said: I'm using 2.3.4 on the Main server. I understood that was the latest version for the Main (not Dev) servers. I'm getting the same results as you are on the Main using v2.3.4 I think you've found a bug. --whisper| seems to be interfering with the hidden urls feature. Until HB comes out with a bugfix\update you might have to use the full url... I'm sure we'll get a fix soon.
1422415285

Edited 1422416434
vÍnce
Pro
Sheet Author
Just found a workaround till a fix. Add a space after the @@ BTW, adding the space or multiple spaces doesn't seem to bother newer versions, so I think it's a safe fix that you won't have to change later when a newer version of the script comes out. --URL Link|@@ <a href="http://www.pfsrd.com||LINK@@" rel="nofollow">www.pfsrd.com||LINK@@</a>
Vince said: Just found a workaround till a fix. Add a space after the @@ BTW, adding the space or multiple spaces doesn't seem to bother newer versions, so I think it's a safe fix that you won't have to change later when a newer version of the script comes out. --URL Link|@@ <a href="http://www.pfsrd.com||LINK@@" rel="nofollow">www.pfsrd.com||LINK@@</a> Thank you for that. It works great and now the cards look like I wanted them to. Thanks for troubleshooting and the fast responses.
1422425441
vÍnce
Pro
Sheet Author
NP I think I may have undiagnosed OCD. It causes a lot of problems, but sometimes it solves them as well. lol
any news on the --whisper / URL issue? P.S. HoneyBadger, Powercards is the ONLY reason i paid for a years upgrade from supporter to mentor. next time your in Houston let me buy you a beer. Edit: hmm firefox has me logged in as a dif account, nice brb on chrome
Greatest DM Ever said: any news on the --whisper / URL issue? P.S. HoneyBadger, Powercards is the ONLY reason i paid for a years upgrade from supporter to mentor. next time your in Houston let me buy you a beer. Edit: hmm firefox has me logged in as a dif account, nice brb on chrome This +1 internets
so i have a problem, before i found powercards i made global macros for attacks, saves, ability checks that would reference player and NPC character sheets. My players preferred it when i would "hide" the rolls using /w GM, they told me it helped improve immersion for them. converting the macros for use with power cards has been simple, until i started doing the spell macros, embedding a link to the spells handout inside the title name of the power card. previously this link was just in the body of the non-powercard macro. but now it seems to be broken. below is a few examples of the different types of cards i made. (i broke them apart by tags, i know they have to be on the same line.) Edit: i am using the 5e Character sheets with "@{token_pre} Sir Lady Lord the a an, @{gender1} his her it's,@{gender2} him her it, @{gender3} he she it" custom attributes. // VERSION INFO var PowerCards_Author = "HoneyBadger"; var PowerCards_Version = "2.3.4"; var PowerCards_LastUpdated = "January 9th, 2015 ~ 5:00 am eastern"; &lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt; Spell Card (does not work, keeps breaking, returning classic r20 emotes full or gibberish and a broken link in the card title.) &lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt; !power --tokenid|@{selected|token_id} --emote|@{Selected|token_pre} @{Selected|token_name} uses the tricks of @{Selected|gender1} trade to create a communications link with @{Target|token_pre} @{target|token_name}. --whisper|GM --name|@@journal.roll20.net/handout/-Jc9dORvS5NosfeoX0R||$$#FFFFFF|Message$$@@ (this is a link to a handout in journal tab, with full spell description) --leftsub|Action --rightsub|Transmutation Cantrip --Range|120 feet --Duration|1 Round --Target|@{Target|token_pre} @{Target|Token_name} --!Description|//see handout for details.// &lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt; Melee / Ranged Attack (works fine, used as #Melee1 in a macro on the players ability tab, with "!power --tokenid| --emote|" tags, one size fits all) &lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt; --whisper|GM --name|@{Selected|meleeweaponname1} vs @{target|token_pre} @{target|token_name} --leftsub|Action --rightsub|Melee Attack --^1Attack *1|[[1d20 + @{selected|meleetohit1} [To Hit] + (@{selected|global_melee_attack_bonus}) [Active Melee Attack Bonus] ]] | [[1d20 + @{selected|meleetohit1} [To Hit] + (@{selected|global_melee_attack_bonus}) [Active Melee Attack Bonus] ]] --^2vs AC|[[@{target|AC}]] --On Hit *1|[[@{selected|meleedmg1} [Base damage] + @{selected|meleedmgbonus1} [Damage Bonus] + (@{selected|global_melee_damage_bonus}) [Active Melee Damage Bonus] + 0d0 [Bugfix 0] ]] //@{selected|meleedmgtype1}// --!^2 Crit *1|(On Crit Add [[@{selected|meleedmg1}]]) &lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt; Ability check / saving throw (works fine) &lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt; !power --charid|@{Target|character_id} --whisper|GM --name|@{Target|token_name} ♦ Strength --leftsub|Skill Check --rightsub|Saving Throw --Str Check|[[1d20 + @{Target|basic_Strength_check_mod} [Strength Mod] + (@{Target|global_check_bonus}) [Active Check Bonus] ]] | [[1d20 + @{Target|basic_Strength_check_mod} [Strength Mod] + (@{Target|global_check_bonus}) [Active Check Bonus] ]] --Str Save|[[1d20 + @{Target|Strength_save_mod} [Stat Mod and Proficiency] + (@{Target|global_saving_bonus}) [Active Save Bonus] ]] | [[1d20 + @{Target|Strength_save_mod} [Stat Mod and Proficiency] + (@{Target|global_saving_bonus}) [Active Save Bonus] ]] &lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt; End Examples &lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt; i dont know why the first example (Spell card) keeps breaking when the others work fine, i believe i filled them in properly but it still keeps breaking and often times crashing the API itself. any advice or if you notice any errors in my macros please let me know. P.S. i wasnt sure if it was possible, but i put some tags with commonly used content, into macros and call them from inside the card with #macroname like hte melee1 example above.
1423032988

Edited 1423033038
vÍnce
Pro
Sheet Author
Have you tried adding a space after @@ and before your link(url)? --name|@@ journal.roll20.net/handout/-Jc9dORvS5NosfeoX0R||$$#FFFFFF|Message$$@@ (this is a link to a handout in journal tab, with full spell description)
Vince said: Have you tried adding a space after @@ and before your link(url)? i did no such luck T.T
1423072282
vÍnce
Pro
Sheet Author
--!Description|//see handout for details.// That ! in front of Description would indicate running a script...
1423076347

Edited 1423076616
oh, i thought it was to hide the tag but show content of tag in italics Hidden : Adding an exclamation mark ! at the start of a tag will hide that tag and not display it in the power card, but it will show the contents of the tag in the power card. This is useful for adding blocks of text without a tag. Example: --!Tag|Content the handout is accessed by clicking the title of hte power card, the section i have the URL link in (without http://)
1423077340
vÍnce
Pro
Sheet Author
My bad Iskoaya.
1423077493
vÍnce
Pro
Sheet Author
My only guess is to break down your macro and run it a piece at a time. Keep adding until you get the error to isolate the issue.
1423083014
vÍnce
Pro
Sheet Author
I think the whisper is causing the problem with tokenid. Should have have been fixed with the v2.3.3 update. I can remove whisper and your spell macro works. Maybe HB can have a look.
the space workaround works for a lot of them, so does adding a % (space character) to content = content.replace("@@", " well damn i cant even link that part of the api script.. but anyhoo the section that replaces the @@ withthe html part has a % added after //
1423089724
I just want to praise HoneyBadger and company on all the work in this arena. Powercards are amazing implements that make all my adventures so much nicer...and FASTER encounters! Thanks again!
1423090897

Edited 1423092745
Disclaimer: I'm using the powercard script trough Iskoaya's campaign. Few intro things: Since we already have all the spells as handouts, we wanted a quick way to reference to the full description while keeping the cards relatively small. We wanted to be able to set a global setting that will govern if the body of the card will be public or private (/w gm) We are not on the dev server so we use v2.3.4 What we did: 1. We used HIDDEN_URLS on the --name tag like --name|@@journal.roll20.net/handout/xxxxxxxxxxxxxxxxxxxx||SPELL_NAME@@ 2. We setup a global macro called "powercard" and set it as !power --tokenid|@{selected|token_id} for general/default use, which we can change to !power --tokenid|@{selected|token_id} --whisper|gm for private use. We invoke the powercards starting our macros with this code #powercard What was/is the problem: The problem begin when we enable the global whisper macro (or using --whisper in general). Given how the whispers are send, (not using the /direct command that allows HTML formatting) the HIDDEN_URLS parsning (source lines 335-346) is not appropriate. Vince gave a proposition above , that while I cannot explain why, seems to work. His solution creates the &lt;a href='http://%20journal.roll20.net/handout/xxxxxxxxxxxxxxxxxxxx style='color:#000; text-decoration: underline;'&gt;SPELL_NAME&lt;/a&gt; code. Notice the %20 between the http:// and the actual URL. It seems that roll20 autolinks correctly such a link (try it here on a forum post if you don't believe me). I would really like an explanation. To compensate (and since we already had allot of the cards ready) we edited source line 340 to read content = content.replace("@@", "&lt;a href='http:// "); That edit solved the broken link format in the body of the cards. When we started to test the cards we had already we came across an error like Zepth's above . This bug was supposed to be fixed in v2.2.0 ( Bugfix : Using --whisper with custom emotes broke the emote badly). The thing was that we encountered this problem only in some cards. After some debugging we deducted that we had this problem to the cards that did not include inline rolls. Back to the code, and we see that the sendChat() function is implemented differently if there are (source lines 223-257) or not (source lines 259-283). During revision 2.2.0 (I don't know how to link to a specific git revision) changes were made to sendChat() while there are inline rolls but when there are absent the old bug remains. So what I did was to replace the source lines 265-267 with the same code as in source lines 234-240. 265 - if (PowerCard.whisper !== undefined && PowerCard.whisper !== "no") { 266 - if (PowerCard.emote !== undefined) sendChat("", "/emas " + PowerCard.emote); 267 - sendChat(msg.who, "/w " + PowerCard.whisper + " " + Display); 265 + if (PowerCard.whisper !== undefined) { 266 + if (PowerCard.emote !== undefined) { 267 + if (PowerCard.charid !== undefined || PowerCard.tokenid !== undefined) { 268 + sendChat("", "/desc "); 269 + sendChat("", "/direct " + PowerCard.emote); 270 + } else sendChat("", "/emas " + PowerCard.emote); 271 + } 272 + sendChat(msg.who, "/w " + PowerCard.whisper + " " + Display); Thad edit corrected our problems (so far). The problem was that since we do have the --tokenid tag through our macro, sending the image using /emas is not going to work. We need to send the emote using /direct. This edit was done for when the card contains an inline roll but was neglected for when we have no inline rolls. Our edit corrects exactly that. If Vince or HoneyBadger wants, I can upload a whole copy of our edited script for them to diff with the master. Thank you again for this great script and we are looking forward to more goodies from you guys. Chris
i love my Co-GM! MINE u cant has my precious!!
1423169256
Hopefully the Update of Holding will hit the production servers soon and there won't be a need for using older and/or forked versions. I'm going to dinner and a movie with my fiancée here in a little bit, but I will spend some time tonight sorting through all the issues and re-doing the original post to reflect the dev/production server differences and such.
1423170337
The Aaron
Forum Champion
API Scripter
WB HB! =D
1423170436
vÍnce
Pro
Sheet Author
Who Dat?
1423219831

Edited 1423219871
Update: February 6th, 2015 ~ 6:00 am eastern Version: 2.3.5 (Production Servers) Script Link: gist.github.com/Sky-Captain-13/afebf0c21f5ea1200bdc Version: 2.4.3 (Dev Server) Script Link: gist.github.com/Sky-Captain-13/452330a3d926b32da49c Bugfix: Additional fixes to whispers and custom emotes. Whispered cards without any inline rolls should now work properly. Bugfix: Using leftsub or rightsub by itself will work properly now, showing only that content... centered without a diamond. Bugfix: Fixed URL parsing in whispers. Minor Change: Removed built-in URL formatting (black text, underlined). Use inline formatting to alter the appearance of URLS such as... Example: @@www google com||__$$#00F|Search Google$$__@@ Minor Change: Removed the addition of a colon after each tag. This was removed to try and give users more flexibility when creating their powercard macros and not use as much scripted formatting.
1423244953
vÍnce
Pro
Sheet Author
Welcome back. Thanks for the updates!
Completely new to this whole API thing. I pasted the script into the API section, then tried copying multiple different macros that I found in this thread into the campaign. And every single time it comes out like this. Any idea what I might be doing wrong?
Nevermind, figured it out. Shoulda done some more searching before I posted. Sorry!
1423469947
That problem will go away when the next dev update hits the production servers. :)
1423485602
Gonna start working on helpers like what roll templates have. I had been intending to do so for some time, but never got around to it. I'm not sure how I'm gonna implement it though. Gotta try and find a way that isn't too difficult. Here's a short list of helpers I'm gonna work on: Show if a crit is rolled Show if a hit is rolled Show if a miss is rolled Show if a crit miss is rolled
1423489451
Gen Kitty
Forum Champion
I'm not sure hit/miss should be included, honestly. There's too many places where a GM or player could miscalculate the bonuses and penalties involved, so you need to decide what happens when they goof, as they inevitably will. The simple, wrong, answer is "Everything is rerolled", but that's the wrong approach IMO because what we really want is the ability to retrieve the 'hit' info if a 'miss' was mistakenly made. I don't think that's something the Devs are taking into account for roll-templates. The Aaron said something, in another thread, about storing/replaying dice rolls being easy but I can't remember. Maybe he'll chime in here?
1423491053
Maybe I can finagle a way to make show/hide helpers that are still there but have to be clicked on to show.
1423493005
Gen Kitty
Forum Champion
*earperk* Now THAT would be neat!!!
1423494347
It would be neat, but does not seem possible with inline styled css only, since we have no access to create classes and ids in a stylesheet. ; _ ;
1423494526
Gen Kitty
Forum Champion
*eardroop* Well, Aaron's idea of being able to replay dice rolls (with new modifiers) sounded good, in that other thread. I'm sure he will chime in here when he gets a chance. ^_^
Hello everyone, i have discovered another problem (T_T) but i found a work around, so just FYI about Roll20 handout links. i was making a power card for a character that had leveled up to 4 last Saturday session. he gained a new spell Fog Cloud. editing the current power card where i store each characters spell list, i ran into a problem when i tried to create a link to the spells handout in the power card: the handout for Fog cloud spell is: journal.roll20.net/handout/-Jc9WaWRAyIS__LrKzMl (note the two underscores in the address.) trying to link this handout into the card's spell list with the other 7 spells, ended up with me being redirected to an error page, instead of popping up the handout in my campaign. to make sure it was the link and not just my power card macro, i deleted the link to Fog Cloud handout and inserted different spell handout links. all of the other links would work for my power card macro, but Fog Cloud's handout link would not. i then recreated the "Fog Cloud" spell handout ending up with: journal.roll20.net/handout/-JhmRr4o-416MEJNunuC as "Fog Cloud (cardfix)" handout. inserting this new link fixed my Fog Cloud power card macro, and popped the handout as normal, not redirecting me to an error page. i do not know how Roll20 names the links to the handouts, but i am sure the two __'s are the culprit for breaking my macro. if anyone knows how to edit the address of a current handout please let me know, since creating duplicate handouts for spells whose address includes __ might suck and create a lot of work for me that could be solved by changing the link address.
1423558360
Yeah, I use __ to start/end the inline formatting for underlined text. I'm a hack when it comes to using regex to solve these problems though. So you'll just have to use the work around.