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

1424726745
>_<
1424735550
Mihdi said: What is the maximum number of targets the target_list can handle? It seems to cap out at 9 for me. Every target past 9 just shows the %%token_name%% charm instead of the tokens actual name every time I try to target more than 9. Are you using target_list|@{target|1|token_id} | 2-9 | @{target|10|token_id}? You have to add as many of the @{target calls as you want for the number of targets. It's a limitation of how @{target works and there's not much I can do to get around it.
This may be a strange request... but I am wondering if there is a way to tie into the look/formatting of the roll templates to allow Powercards to mimic the look of the character sheets roll templates? For example Actoba has created some very nice roll templates with a "ribbon-style" title bar, it would be interesting for the game to be able to mimic the look with Powercards just for consistency sake. Anyway just a thought.
1424737492
Gen Kitty
Forum Champion
The roll-templates are mimicking the lookof powercards :> No, seriously, trying to make powercards mimic every roll-template out there is a futile effort, IMO, because every GM with css skills is going to be making their own look. But I could be wrong, maybe it's easy to change the header design so players and GMs can do their own graphics.
1424738444
I continue to get the following error when trying to execute a simple "Bite" attack macro. Any help would be greatly appreciated! For reference, the error message generated was: SyntaxError: Expected "(", ".", "[", "abs(", "ceil(", "d", "floor(", "round(", "t", "{", [ |\t], [+|\-] or [0-9] but "A" found.
1424738709
vÍnce
Pro
Sheet Author
Jordon said: I continue to get the following error when trying to execute a simple "Bite" attack macro. Any help would be greatly appreciated! For reference, the error message generated was: SyntaxError: Expected "(", ".", "[", "abs(", "ceil(", "d", "floor(", "round(", "t", "{", [ |\t], [+|\-] or [0-9] but "A" found. Hi Jordan. Can you post your macro?
If the effort is too much, then obviously it isn't worth it, and I agree that Powercards really seem to have inspired roll templates, no question there. I know several others out there prefer not using character sheets, however I do find them invaluable. I currently run a 5e sheet where I replaced every button with a powercard and very well may do that again. However, I figured there was no harm in asking if the css used in the sheets could be reused (maybe as part of a default template journal entry?), allowing for a seamless look and approach, but obviously I do not know css well personally so it very well could be silly question.
1424739402
vÍnce
Pro
Sheet Author
How, or, are you planning on integrating powercards and roll templates into the same sheet and your ability macros Kevin? I'm thinking both have their benefits, but it seems they are mutually exclusive. Thoughts?
1424739996

Edited 1424740192
I am a stickler for consistency, which means that I generally have two options. Take the sheet and replace all the roll buttons to make them Powercards (which is what I have done in the past, and may still do). Or make the Powercards look like the roll templates of the sheet that I am using. So I am not looking for one to replace the other, I am simply wanting a consistent look and feel from all of the output... consistency in style I guess. This would allow my players to make simple macros using existing buttons on the sheet or for more advanced users seamlessly use Powercards for things that the sheet does not do... all while maintaining a consistent style. Honest part of the problem (which is no fault of Powercards) is that the API has been rather unstable and been disruptive to several game sessions over the last few weeks. If I replace all of the rolls on the sheet with powercards and the API goes down... well the game completely stops, where at least if I had the sheet rolls we could still continue.
1424740763
Vince said: Jordon said: I continue to get the following error when trying to execute a simple "Bite" attack macro. Any help would be greatly appreciated! For reference, the error message generated was: SyntaxError: Expected "(", ".", "[", "abs(", "ceil(", "d", "floor(", "round(", "t", "{", [ |\t], [+|\-] or [0-9] but "A" found. Hi Jordan. Can you post your macro? Whoops! Sorry, I meant to include that with my first post. Here is it: !power --tokenid|@{selected|token_id} --target_list|@{target||token_id} --emote|The Fire Beetle tries to bite its enemy. --format|atwill --name|Bite --leftsub|Action --rightsub|Reach 5 ft --Attack|[[1d20+1]] | [[1d20+1]] vs %%AC%% AC ^^**Target:** %%token_name%% --Hit|[[1d6-1]] slashing damage
1424744375

Edited 1424747847
vÍnce
Pro
Sheet Author
Jordan, are you using the PF sheet? I think the issue is with %%AC%% That's an auto-calculated field on the PF sheet so it's formula is being called which breaks the --target_list| tag. That's my guess. Update/Edit: if you link AC to one of the token's bars, you can use that ex. use %%bar1%% instead of %%AC%% apologies if that isn't cause of your error.
1424747866

Edited 1424748200
Hmm....I should be using the D&D 5E Sheet. I will double check and if not, I'll just remove the %%AC%% tags and try again. Edit: Just checked - Yeah, I'm using the D&D 5E sheet. I will remove the %%AC%% tags and try again. It's weird though, the macros worked just fine a few weeks ago with 5E sheet and the same format I listed above. Bummer 2nd Edit: Okay....wow. I'm glad you pointed out the 'AC' attribute for the Target. Turns out the Target didn't have the 'AC' attribute listed. That was throwing the error. Such a simple mistake. Thanks for the help! All is working as expected now!
If the target is using the NPC sheet, it won't have anything in the AC field, hence the error. The NPC sheet's AC is actually npc_AC. As Vince pointed out, the best way to make it work universally is to set one of the bars as the AC for characters and NPCs. In our case, we set bar3 to AC, ac_no_armour, or npc_AC so we can set one tag %%bar3%% and never have to edit anything out differently.
1424749691
vÍnce
Pro
Sheet Author
cool beans
1424754823
Kevin said: I am a stickler for consistency, which means that I generally have two options. Take the sheet and replace all the roll buttons to make them Powercards (which is what I have done in the past, and may still do). Or make the Powercards look like the roll templates of the sheet that I am using. So I am not looking for one to replace the other, I am simply wanting a consistent look and feel from all of the output... consistency in style I guess. This would allow my players to make simple macros using existing buttons on the sheet or for more advanced users seamlessly use Powercards for things that the sheet does not do... all while maintaining a consistent style. Honest part of the problem (which is no fault of Powercards) is that the API has been rather unstable and been disruptive to several game sessions over the last few weeks. If I replace all of the rolls on the sheet with powercards and the API goes down... well the game completely stops, where at least if I had the sheet rolls we could still continue. Roll Templates are more flexible in creation, since they have access to a cascading style sheet, which includes classes, pseudo-classes, and such. Things I cannot do with inline css. PowerCards on the other hand are more flexible when crafting macros. If you post a screenshot of one of Actoba's roll templates, there may be a way to mimic that aspect of the roll template.
1424757793

Edited 1424759912
vÍnce
Pro
Sheet Author
I'm not gonna' lie, those do look pretty damn slick.
1424762289
There's quite a bit more I could do if I had access to selectors and classes. :(
1424784759
The Aaron
Forum Champion
API Scripter
HoneyBadger said: There's quite a bit more I could do if I had access to selectors and classes. :( Would you have access to the selectors and classes defined in the character sheet CSS?
1424787106
Tried that already. Doesn't work.
HoneyBadger said: Mihdi said: What is the maximum number of targets the target_list can handle? It seems to cap out at 9 for me. Every target past 9 just shows the %%token_name%% charm instead of the tokens actual name every time I try to target more than 9. Are you using target_list|@{target|1|token_id} | 2-9 | @{target|10|token_id}? You have to add as many of the @{target calls as you want for the number of targets. It's a limitation of how @{target works and there's not much I can do to get around it. I figured out was was happening. There was an extra space in there that was breaking the list somehow. It works fine now that I found and deleted that extra space.
1424858580
Bugfix & Minor Update: February 25th, 2015 ~ 5:00 am eastern (Both Servers) Version: 2.3.7 (Production Servers) Script Link: gist.github.com/Sky-Captain-13/afebf0c21f5ea1200bdc Version: 2.4.5 (Dev Server) Script Link: gist.github.com/Sky-Captain-13/452330a3d926b32da49c Bugfix: Applied URL fix from TheAaron to correct issue with url's without http or https at the beginning. Minor Update: Added a notification in the API log that the script is loaded.
1424889818
Gen Kitty
Forum Champion
Thank you, HB. I adore you :>
1424898707
Dusky
KS Backer
Possibly outside the scope of this API, but is there any way to have a whispered powercard not show that dice are rolling? I have a macro set up to roll secret perception checks for each party member and whisper the powercard to myself; however even though the card isn't visible to the players, they can see that dice are being rolled, and the rolled results. Anyway to disable this short of turning off 3d dice whenever I wish to use the macro?
1424900111
The Aaron
Forum Champion
API Scripter
Not using this script directly, but if you read my post a ways up: <a href="https://app.roll20.net/forum/post/1463736/#post-16" rel="nofollow">https://app.roll20.net/forum/post/1463736/#post-16</a>... That script will let you roll on the server side, which doesn't trigger the 3d dice. Some limitations apply, of course. You'd have to set up separate whisper macros like this: !pcpp --whisper|GM --name|Whispered perception --perception| [#[ @{selected|perception} + 1d20 ]#] (Note the !pcpp at the front, and the [#[ ]#] syntax for inline rolls on the server side.)
1424900550
Gen Kitty
Forum Champion
There needs to be a way for the API to tell the server 'SUPER SEKRIT DICE ROLLS' and it won't show the dice rolling. I turned off 3d dice across the campaign for just this reason.
1424901071
The Aaron
Forum Champion
API Scripter
Or perhaps at least have it only show the rolled dice on the clients who would see the whisper...
1424901174
The Aaron
Forum Champion
API Scripter
Actually, it probably already does that for /w and /gr It's likely just by virtue of the API commands not having an indicator for whisper that it doesn't do that for them.
1424902755

Edited 1424905057
Dusky
KS Backer
Aaron, your script is ideal! I've hit a snag with it, however. I have the modifiers manually entered (we don't really use the Roll20 sheets), which works fine unless 2 modifiers are the same. !pcpp --whisper|GM --format|GM --name|Perception --Konrad:|[#[1d20+9]#] --Natari:|[#[1d20-1]#] --Seridas:|[#[1d20+14]#] --Tabbris:|[#[1d20-1]#] That's my code, which gives me strange results since Natari and Tabbris are both "1d20-1". The second card is when I change Tabbris to 1d20-2. Any idea on a way to rectify it? EDIT: Having said that, making it 1d20-1+0 fixes it. Feels a little rough, though XD
1424908101
The Aaron
Forum Champion
API Scripter
Ah, interesting. I'll endevor to find a way to fix that! In the interim, you could also put a unique label in each. [#[ 1d20+2 [Tabbris] ]#]
1424913949
Dusky
KS Backer
D'oh, I didn't think to use a label. That works, much appreciated! I have another query that is likely outside the scope of the API, but I'll ask! I made up a hypothetical "Full Attack" powercard for a swordsman to attack with. !power --format|Monster --name|Full Attack --leftsub|Swordsman --rightsub|Longsword --Attack|[[1d20+6]] | [[1d20+1]] vs AC --Damage|[[1d8+2]] | [[1d8+2]] Slashing Which produces this output: In an attempt to keep everything together and minimise clutter, I've put the entire action onto one powercard. My question is: is there any way to pause or otherwise hide the results of the 2nd attack so that they may be resolved in steps? I ask for two reasons: The results of the first attack could change whether or not the Swordsman does a second (eg killing his foe). Secondly, my players have abilities that they must activate in response to an attack, but must be done before the attack roll is made. Being able to see the result of the 2nd roll would greatly influence their decision. Of course I could simply resolve the attacks seperately, but I ask in the long shot such a thing is possible =p
1424929963
The Aaron
Forum Champion
API Scripter
It would take a fair bit of programming. You'd basically have to queue up all the attacks and only show them one at a time, with a button to show the next attack, and another to discard the rest of them. Effectively, it would be writing a bunch of code to let you do something that you can do right now by just pushing the attack button multiple times.
1424967886
Dusky
KS Backer
I thought that might be the case. Attacking multiple times works plenty fine. Thanks for the help!
1425243784
Gen Kitty
Forum Champion
Query: Can the on-ready statement also include a timestamp? Being able to see how many times the sandbox spins up in a X minute period might be useful to the devs. :/
1425245028

Edited 1425245503
PrincessFairy
Plus
Marketplace Creator
API script is down again on Sunday. 1 Hour and half till game, and script just isn't active at all.
1425245554
Gen Kitty
Forum Champion
It's not just this script. ALL my scripts are halted. See my thread in the bug report forum
1425246477
PrincessFairy
Plus
Marketplace Creator
Vince said: I really like this setup and the concept for the new Powercard 2 setup but I don't see the actually script that is used for the new powercards. Is there a completed API script? I am interested to try this out. Also is the inline roll format to show all rolls without highlighting part of the powercard 2 API if so that would be great, if not where can I find the API to fix that?
1425248176
Steve K.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
The Dragon said: I really like this setup and the concept for the new Powercard 2 setup but I don't see the actually script that is used for the new powercards. Is there a completed API script? I am interested to try this out. Also is the inline roll format to show all rolls without highlighting part of the powercard 2 API if so that would be great, if not where can I find the API to fix that? These are Roll Templates , coming to everyone with the Update of Holding. You can access Actoba's 5E sheet with Roll Templates from his Mentor forum post .
1425248544
GenKitty said: Query: Can the on-ready statement also include a timestamp? Being able to see how many times the sandbox spins up in a X minute period might be useful to the devs. :/ I should be able to add that.
1425249083

Edited 1425249281
vÍnce
Pro
Sheet Author
The Dragon said: I really like this setup and the concept for the new Powercard 2 setup but I don't see the actually script that is used for the new powercards. Is there a completed API script? I am interested to try this out. Also is the inline roll format to show all rolls without highlighting part of the powercard 2 API if so that would be great, if not where can I find the API to fix that? The API script for PowerCards 2 and the instructions are located at the top of this thread. There are currently 2 versions of the script, v2.4.5 for the Dev and v2.3.7 for Main/Production server. Make sure you install the correct version. The images you saw are from Actoba's D&D 5e sheet using roll templates. Although they look similar, they are two different ways of formatting the output to chat. As Steve mentioned, roll templates are going to get integrated into character sheets and the Main/Prod server in the upcoming Update of Holding.
1425249867
PrincessFairy
Plus
Marketplace Creator
Nice, anyone know when the Update of Holding goes live? I know its soon.
1425250324
vÍnce
Pro
Sheet Author
Q1...so by the end of the month.
1425322173
@Dragon Saw the output you output for the Spells with level. What script did you use and how would you recommend I insert it?
1425328426
The Aaron
Forum Champion
API Scripter
Den G. said: @Dragon Saw the output you output for the Spells with level. What script did you use and how would you recommend I insert it? Those are Roll Templates in the 5e sheet, probably better to checkout this thread: <a href="https://app.roll20.net/forum/post/1639078/5e-sheet-roll-template-updates#post-1666787" rel="nofollow">https://app.roll20.net/forum/post/1639078/5e-sheet-roll-template-updates#post-1666787</a>
Quick question: how do I embed a whisper to the GM within a call to the PowerCard script?
1425341271
Aaron, I am using the <a href="https://github.com/beeke01/Powercard5ECharSheet" rel="nofollow">https://github.com/beeke01/Powercard5ECharSheet</a> ....I am knew to the scripting and Roll20, so I can get more easily confused than most. How does the info interact with one vice the other?...All I need is to screw things up by combining stuff.
1425342004
PrincessFairy
Plus
Marketplace Creator
I know a lot of people have powercards but I thought a few powercards that are used by me would help others. Here is a whisper to GM Powercard, Also its a base power card with all the damage rolls into one so you can save macro space on the bottom. !power --whisper|GM --name|Multiple Damage Rolls --1d2|[[1d2+?{modifier|Bonus Dmg}]] added Bonus [[?{modifier|Bonus Dmg}]] --1d4|[[1d4+?{modifier|Bonus Dmg}]] added Bonus [[?{modifier|Bonus Dmg}]] --1d6|[[1d6+?{modifier|Bonus Dmg}]] added Bonus [[?{modifier|Bonus Dmg}]] --1d8|[[1d8+?{modifier|Bonus Dmg}]] added Bonus [[?{modifier|Bonus Dmg}]] --1d10|[[1d10+?{modifier|Bonus Dmg}]] added Bonus [[?{modifier|Bonus Dmg}]] --1d12|[[1d12+?{modifier|Bonus Dmg}]] added Bonus [[?{modifier|Bonus Dmg}]] --2d6|[[2d6+?{modifier|Bonus Dmg}]] added Bonus [[?{modifier|Bonus Dmg}]] --3d6|[[3d6+?{modifier|Bonus Dmg}]] added Bonus [[?{modifier|Bonus Dmg}]] --4d6|[[4d6+?{modifier|Bonus Dmg}]] added Bonus [[?{modifier|Bonus Dmg}]] --6d6|[[6d6+?{modifier|Bonus Dmg}]] added Bonus [[?{modifier|Bonus Dmg}]] I also added another simple addition for players who wish to use a one powercard spell macro. Yes you have to put a lot of information in but it will save from having hundreds of spell cards for basic information. When Multiplier comes up it is designed for spells with metamagic feats who multiple spell damage. !power --name|?{reason|Name} --DC|?{modifier 1|DC} ?{reason 2|Save} --Damage|[[(?{modifier 2|First Die}d?{modifier 3|2nd Die})*?{modifier 4|Multiplier}]] ?{reason 3|Dmg Type} This is another Macro that helps with players having simple rolls attached to power cards. I make this a token activated and available for all players. !power --name|Open Roll --Details|My ?{reason|no reason} roll is [[1d20+?{modifier}]]
@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.