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

I don't want the entire PowerCard to be whispered, just a portion. For instance, a PowerCard for a player that has a small note that is whispered to the GM (reminder or whatever). Is that possible?
1425349926
PrincessFairy
Marketplace Creator
!power --whisper|GM --name|Message to GM --Message|?{reason|Message} This should allow the player to type a 1 or 2 short sentence in the pop up box that will appear like a text in the message.
1425351095
vÍnce
Pro
Sheet Author
Marko said: I don't want the entire PowerCard to be whispered, just a portion. For instance, a PowerCard for a player that has a small note that is whispered to the GM (reminder or whatever). Is that possible? Use two !power inside one macro. One that uses the --whisper|GM and the other that doesn't. I do this for attacks. The enemy token's stats (AC, HP, etc.) get whispered to me, while the attack rolls are "on the table".
1425351583
PrincessFairy
Marketplace Creator
Vince said: Marko said: I don't want the entire PowerCard to be whispered, just a portion. For instance, a PowerCard for a player that has a small note that is whispered to the GM (reminder or whatever). Is that possible? Use two !power inside one macro. One that uses the --whisper|GM and the other that doesn't. I do this for attacks. The enemy token's stats (AC, HP, etc.) get whispered to me, while the attack rolls are "on the table". Yeah that only works if the taken stats are set up on the bar and you know the order, and/or the tokens have sheets in the journal tab.
1425356146
Gen Kitty
Forum Champion
The Dragon said: Yeah that only works if the taken stats are set up on the bar and you know the order, and/or the tokens have sheets in the journal tab. *tongue in cheek* Is there any other way? Seriously, if you're going to the trouble of using powercards, go the extra few yards to have journals with the most basic of information you need for making the elementary macros you'll need for running the monsters. Each of my monsters for an encounter has HP/Defenses/Init attributes, plus the specific macros needed for their attacks.
1425411138

Edited 1425411565
GenKitty said: *tongue in cheek* Is there any other way? Seriously, if you're going to the trouble of using powercards, go the extra few yards to have journals with the most basic of information you need for making the elementary macros you'll need for running the monsters. Each of my monsters for an encounter has HP/Defenses/Init attributes, plus the specific macros needed for their attacks. i made full character sheets for them, macros, spell lists, links to spell description handouts, the works... now all i have to do to setup an encounter is.. pull the tokens of the journal page (possibly rename the token if it is a VIP NPC) and... poof go 1-2 mins tops! on roll20 and even at your home table... prep is needed almost to the point of being required, the more you do (generally) the more fun can be had, and the less time it takes. period... end of story... the end! i look back that the many "LFG Tool" games i have joined before turning around and saying "nope"... and most just make me... facedesk... Edit: Aaron i have a question about the !pcpp option, can i use it to setup individual bonuses and penalties inside the macro to be rid of the floor(someLongSpamHere) mouseover descriptions?
1425411828

Edited 1425411963
The Aaron
Pro
API Scripter
If I understand what you're saying correctly, maybe? You want to see the result of the formula, not the formula itself in the hover text? !power --name|Test --attack|[[1d20+@{selected|formula_hell}]] results in something in the hover like "1d20+1+floor(stat/2)-5+3+1+0+0+0+0 = ..." !pcpp --name|Test --attack|[#[1d20+[=[@{selected|formula_hell}]=]]#] Might work? Depends on the order of evaluation of that [=[ ]=] construct. Certainly, if it's first it should work. If it DOESN'T work, I bet I can fix it. =D Edit : ok, it doesn't work currently, but I should be able to fix that (as soon as GenKitty lets me!!).
1425412301
Gen Kitty
Forum Champion
*raspberries T'Aaron**
1425412505
The Aaron
Pro
API Scripter
heheheheheh
1425412581
vÍnce
Pro
Sheet Author
The Aaron said: formula_hell Going to have to steal that one Aaron.
1425414865
The Aaron
Pro
API Scripter
Ha. Common programming term. "Callback hell" "Exception hell" "Abstraction hell" "Thread hell" To paraphrase Big Trouble in Little China: "Programmers got a lot of hells..." =D
1425424161
PrincessFairy
Marketplace Creator
Is there anyway to custom shape the powercard feature to give out the similar look that it does for the 5th edition dnd? I play pathfinder and there is no option for sweet powercards. Quote: Nothing like having some Artwork for you game. Checkout: Marketplace Artwork
1425426005
vÍnce
Pro
Sheet Author
The info at the top of the thread has the information about formatting powercards. Basically, you can format the colors of text, background and borders. Change the border size, radius, and drop-shadow. Some inline css. Fonts. You can toggle player colors in the header. Add emotes with avatars. I think that's about it. I don't think you can insert background images or images, period. At least I haven't tried. There isn't an option for powercards built-in for any community sheet since it's an API feature. You can modify a character sheet to use powercard's formating on sheet rolls/macros, and that's what many people do.
1425431967
Gen Kitty
Forum Champion
The graphics stuff (like the ribbon) used in roll-templates is there because roll-templates are done via CSS (cascading style sheets) and you can specify such things, it's HTML code. Powercards use Javascript-esque coding and I haven't heard anyone say yet whether you can do graphics in API as easily as you can do them in CSS.
If I had access to css selectors and classes and pseduo-elements, through a css sheet... I could easily do the same ribbon Actoba uses for the 5e sheet. Background images can be added pretty easilly and are on the list for PowerCards 3. I'm waiting for the Update Of HOlding to come out before ibstart serious work in that. PC3 will also include hit, miss , and crit helpers.
Kevin said: @Den G. - You are using the sheet I created that uses Powercards. What is described above are Roll Templates, they are a new feature in the upcoming update. They are completely separate entities and the sheet that Actoba has is still being developed and tweaked at this point. Thanks Kevin, that cleared up alot. Appreciate the clarification.
Hmmmm... I hadn't noticed this before because I was testing other portions, but apparently with the version for Dev (on live now), indenting does not work when using charms. I have had this set up in my customized 5e sheet, and it worked perfectly previously, indenting the specific lines of the charms. I'm really quite confused as to why being able to indent for charms stopped working for me. Does it work for anyone else?
Sean G. said: Hmmmm... I hadn't noticed this before because I was testing other portions, but apparently with the version for Dev (on live now), indenting does not work when using charms. I have had this set up in my customized 5e sheet, and it worked perfectly previously, indenting the specific lines of the charms. I'm really quite confused as to why being able to indent for charms stopped working for me. Does it work for anyone else? Can you post a sample of the macro you use that is having problems?
1426006914

Edited 1426009131
Sure. The ~† is just a formatting I added that allowed me to mimic an inline roll for bar3, while the ]_[ was added to add a horizontal rule so I could organize it better and cleaner. Both codes are added to my PowerCards 2.4.5 script (and they work), and both worked on the 2.3.7 edition for the (previous) live server prior to the update of holding. Other than those being added, everything is stock here. And yes, I did try this without those tags using ^^ in place of ]_[ and completely removing ~† altogether, still no dice. This complete code worked perfectly prior to this update. The problem seems to be that with the charms, they now don't seem to indent using ^1 or ^*: (edit: It's weird that a basic charm macro, works with indenting -- just tested it -- but for some reason, this long one is having difficulty. I even tested it with my additional markups, and it works fine, for a small macro) !power @{format} --charid|@{character_id} --emote|@{spellemotetext} --name|@{spellname} --leftsub|@{spellcasttime} --rightsub|@{spellrange} --Prepared?|@{spellisprepared} --Concentration?|@{spellconcentration} --Ritual?|@{spellritual} --Components|@{spellcomponents} --Duration|@{spellduration} --target_list|@{spelltarget} --Target#?{Number of targets|1}|**$$#cf0000|%%token_name%%$$** ]_[^1**Attack:**~~[[1d20 + @{attackstat} [Attack stat mod] + @{PB} [Proficiency Bonus] + @{global_spell_attack_bonus} [Active Spell Attack Bonus] ]] | [[1d20 + @{attackstat} [Attack stat mod] + @{PB} [Proficiency Bonus] + @{global_spell_attack_bonus} [Active Spell Attack Bonus] ]]~~ ]_[^1**AC:**~†%%bar3%%~† ]_[^1**Damage:**~~[[@{damage} [Base Spell Damage] + @{damagestatbonus} + @{damagemiscbonus} + @{global_spell_damage_bonus} [Active Spell Damage Bonus] + (0d0)) [Bugfix 0]]]~~ ]_[^1**Damage Type:**@{damagetype} @{spellcrittext} --Higher Spell Effect|@{spellhighersloteffect} --Description|@{spelldescription}
Hrm, if indenting in the middle of a text block worked like that before, it was an unintended effect. !power --name|Test --!Text|Line 1 ^^ ^1 Line 2 That shouldn't have worked. ^# is used to indent the tag and the contents of the entire tag. ^* can be used inside the content to indent the first line.
1426010041

Edited 1426010300
(seemed to have figured it out about the same time as you) Okay, problem is solved... the problem was twofold: Initially, the macro read in the charms' lines as: ]_[^***Attack:** When that wasn't working, I changed it to: ^^^1**Attack:** The problem from the changeover from 2.3.7 to 2.4.5 (which I never caught before because I wasn't testing this part), was that you must have a space in between the indent and the linebreak/horizontal rule (for good measures, I added one after ^* just to ensure the ** bold tag wouldn't cause problems as well). This space wasn't necessary in 2.3.7. Once the space was added in between, it works fine:
Looks good. Can you post the code you added for the horizontal rule? I'll add it to the next update.
1426027543

Edited 1426027790
Sure. I used ]_[ for it because I had already used ~~ for an align right, †† for center and †~ for mimicking an inline roll (and align right) for our %%bar3%%. I have OCD, so I like things to be organized a certain way. Hehe. .replace(/\]\_\[/g,"<hr style='border: 0; height: 0; border-top: 1px solid rgba(0, 0, 0, 0.1); border-bottom: 1px solid rgba(255, 255, 255, 0.3); margin-bottom: 4px; margin-top: 4px;'/>")
1426040392
The Aaron
Pro
API Scripter
I'm surprised the rgba() is working for you. Usually the chat processor strips out functions style css bits.
1426040756
Gen Kitty
Forum Champion
Sooooo.... when does the dev version get cleared for use on production servers? ^_^
1426041728
The Aaron
Pro
API Scripter
Should work there now.
The Aaron said: I'm surprised the rgba() is working for you. Usually the chat processor strips out functions style css bits. rgba does work using /direct css/html. It just doesn't work in anything else which would be fuckin' awesome. If we could use rgba on tints and auras, it would drastically increase the flexibility of those two options.
GenKitty said: Sooooo.... when does the dev version get cleared for use on production servers? ^_^ Yeah, it should work. If I weren't so dead tired right now, I would consolidate the two versions and what not. Maybe in the morning or afternoon before work.
Aaron, I'm a beast at hacking code. ;) HB, I also wish I could use RGBA throughout because I prefer that over hexadecimal. I love making gradients with CSS, even if a subtle 2 tone, just because it can something stand out. I despise needing to use transparent imagery to make a gradient because of distortion.
GenKitty said: Sooooo.... when does the dev version get cleared for use on production servers? ^_^ As Aaron and HB said, it does work, at least -- I have had it working all day, and had only that small hiccup, which turned into a formatting issue on my part. Other than that, it's working superbly.
1426107511
Gen Kitty
Forum Champion
*hyperbounce* I love [XPND]!!!!!!!!! I need to test it in a game with auto-calc'd formulas, but it looks really really good to me and it sums everything!!!!! Thank you, HoneyBadger!! Now to go play with the other features, and ponder how to talk my 13th Age GM into using this script....
1426111169
Gen Kitty
Forum Champion
Random notes for 2.4.5 Documentation in the original post needs a once-over to reflect changes from the Dev-fork style of doing things, such as LR/HR being deprecated, but still needing CR/NH. [[ [CR2|4]1d5]] doesn't highlight on 2 or 4; am I doing something wrong?
1426112366
Gen Kitty
Forum Champion
Bug? [[ [XPND] 1d6 + 1d6 ]] crashes the sandbox SyntaxError: Unexpected end of input at processRoll (evalmachine.<anonymous>:1745:22) at evalmachine.<anonymous>:1668:14 at Array.forEach (native) at buildInline (evalmachine.<anonymous>:1667:26) at Object.PowerCard.Process (evalmachine.<anonymous>:1466:13) at evalmachine.<anonymous>:1271:11 at eval (
Use cs and cf instead now. As a normal roll20 dice roll. [[1d5cf<2cs>4]] NH and XPND are the only inline tags now. XPND is still very rough though. HR, LR, and CR will be removed entirely with the next update Since cs and cf are standard.
1426131990
Gen Kitty
Forum Champion
[[1d5cf<2cs>4]] did it, though the mouseover doesn't show the whole string, it clips out the middle portion. Which i don't care about, much, but you might like to know.
Miss portion? Can you post a screenshot please?
1426157880
Gen Kitty
Forum Champion
1426158757

Edited 1426159049
Huh... weird. I wonder if it does that in chat, not through an api.
GenKitty said: Bug? [[ [XPND] 1d6 + 1d6 ]] crashes the sandbox SyntaxError: Unexpected end of input at processRoll (evalmachine.<anonymous>:1745:22) at evalmachine.<anonymous>:1668:14 at Array.forEach (native) at buildInline (evalmachine.<anonymous>:1667:26) at Object.PowerCard.Process (evalmachine.<anonymous>:1466:13) at evalmachine.<anonymous>:1271:11 at eval ( Figured out this bug, but don't have a fix for it yet. Hopefully this weekend. Worked last night and will work tonight. No big plans this weekend aside from a D&D game Saturday, so I'll try to spend some time updating stuff and fixing bugs.
1426170962
The Aaron
Pro
API Scripter
HoneyBadger said: Huh... weird. I wonder if it does that in chat, not through an api. Seems to work fine through chat: { "content": "!msg $[[0]]", "inlinerolls": [ { "expression": "1d5cf4", "results": { "resultType": "sum", "rolls": [ { "dice": 1, "mods": { "customFumble": [ { "comp": "==", "point": 4 } ] }, "results": [ { "v": 4 } ], "sides": 5, "type": "R" } ], "total": 4, "type": "V" }, "rollid": "-JkDPCD4PSsp0gRs1RFb", "signature": "272a3a8f3a0697b6572dd7317894740690c6809ff80085d888f683b8be6c93dc0f42159f60ceca1cd2f839d73238bb58a0c58ab2294842cece17baa7aac7ff57" } ], "playerid": "-JS3qKxIUPHLzSbK24ve", "type": "api", "who": "The Aaron (GM)" }
1426193461
Gen Kitty
Forum Champion
Aaron, when using the dice equation [[1d5cf<2cs>4]] in a powercard, they roll correctly, as seen in my earlier screenshot. It's the mouseover that's funky.
1426205890
The Aaron
Pro
API Scripter
Yeah, I had a screenshot of the mouse over being correct along with good formatting, but it seems to have been corrupted. I'll fix it when I get on my laptop.
GenKitty said: [[1d5cf<2cs>4]] did it, though the mouseover doesn't show the whole string, it clips out the middle portion. Which i don't care about, much, but you might like to know. I bet this has something to do with html. Since it has <2cs> in there.
1426256132
Lithl
Pro
Sheet Author
API Scripter
HoneyBadger said: GenKitty said: [[1d5cf<2cs>4]] did it, though the mouseover doesn't show the whole string, it clips out the middle portion. Which i don't care about, much, but you might like to know. I bet this has something to do with html. Since it has <2cs> in there. That's a good theory. Try [[1d5cs>4cf<2]] instead.
1426272044
PrincessFairy
Marketplace Creator
Expended [[ [XPND] 1d6 + 1d6 ]] roll will not show up on the production server as of yet. A really nice feature would love to see it in production server.
1426277748
Gen Kitty
Forum Champion
I figured multi-dice XPND would be a 'down the road' thing, I just wanted to note that attempting it crashes things loudly. :>
1426277868
Gen Kitty
Forum Champion
[[1d5cs>4cf<2]] works perfectly; thanks for the workaround (which should have been obvious to me x.x)
The Dragon said: Expended [[ [XPND] 1d6 + 1d6 ]] roll will not show up on the production server as of yet. A really nice feature would love to see it in production server. It doesn't work on the dev server either, lol. I know what the bug is, just need to figure out how to make it work.
1426287654
Gen Kitty
Forum Champion
New Bug: [[2d4cf0cs100]] works as expected outside API, acting as the functional equivalent of [NH]. Inside powercards, however, it doesn't work as expected. It highlights 1 & 4 as if I never used a CF/CS. I don't really mind adjusting my macros, but it would be nice if I could use the same dice equations for my powercards that I do for their backup macros -- and I'm curious WHY it doesn't work. :> (Backup macros: Due to the flakiness of API at times, and to reduce the snark from GMs who think this script is 'a lot of work for a few numbers', I have backup macros for every powercard I have. Le Sigh.)