Thanks GenKitty, those are great suggestions. I will incorporate them.
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.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.
var USE_DEFAULT_FORMAT = true; // Set to true if you want powercards to default formatting
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.
// 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
@@www.roll20.net@@ - Naked url, requires that ALLOW_URLS to be set to true in the script.
@@www.roll20.net||Roll20@@ - Hidden url, requires that ALLOW_HIDDEN_URLS to be set to true in the script.
@@url||text@@ <-- 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.
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.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.
--URL Link|@@ www.pfsrd.com||LINK@@
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|@@ www.pfsrd.com||LINK@@
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
--name|@@ journal.roll20.net/handout/-Jc9dORvS5NosfeoX0R||$$#FFFFFF|Message$$@@ (this is a link to a handout in journal tab, with full spell description)
--!Description|//see handout for details.//That ! in front of Description would indicate running a script...
--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|gmfor private use.
#powercard
<a href='http://%20journal.roll20.net/handout/xxxxxxxxxxxxxxxxxxxx style='color:#000; text-decoration: underline;'>SPELL_NAME</a>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.
content = content.replace("@@", "<a href='http:// ");That edit solved the broken link format in the body of the cards.
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.